1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef INCLUDED_SC_INC_ACCESSIBLEFILTERMENUITEM_HXX
21 #define INCLUDED_SC_INC_ACCESSIBLEFILTERMENUITEM_HXX
23 #include "AccessibleContextBase.hxx"
24 #include <cppuhelper/implbase1.hxx>
26 #include <com/sun/star/accessibility/XAccessibleAction.hpp>
27 #include <vcl/vclptr.hxx>
29 class ScMenuFloatingWindow
;
31 typedef ::cppu::ImplHelper1
<
32 css::accessibility::XAccessibleAction
> ScAccessibleFilterMenuItem_BASE
;
34 class ScAccessibleFilterMenuItem
:
35 public ScAccessibleContextBase
,
36 public ScAccessibleFilterMenuItem_BASE
39 explicit ScAccessibleFilterMenuItem(
40 const css::uno::Reference
< css::accessibility::XAccessible
>& rxParent
,
41 ScMenuFloatingWindow
* pWin
, const OUString
& rName
, size_t nMenuPos
);
43 virtual ~ScAccessibleFilterMenuItem() override
;
45 /// XAccessibleContext
47 virtual sal_Int32 SAL_CALL
getAccessibleChildCount()
48 throw (css::uno::RuntimeException
, std::exception
) override
;
50 virtual css::uno::Reference
< css::accessibility::XAccessible
> SAL_CALL
51 getAccessibleChild(sal_Int32 nIndex
)
52 throw (css::uno::RuntimeException
, css::lang::IndexOutOfBoundsException
, std::exception
) override
;
54 virtual css::uno::Reference
< css::accessibility::XAccessibleStateSet
> SAL_CALL
55 getAccessibleStateSet()
56 throw (css::uno::RuntimeException
, std::exception
) override
;
58 virtual OUString SAL_CALL
getImplementationName()
59 throw (css::uno::RuntimeException
, std::exception
) override
;
63 virtual ::sal_Int32 SAL_CALL
getAccessibleActionCount()
64 throw (css::uno::RuntimeException
, std::exception
) override
;
66 virtual sal_Bool SAL_CALL
doAccessibleAction(sal_Int32 nIndex
)
67 throw (css::lang::IndexOutOfBoundsException
, css::uno::RuntimeException
, std::exception
) override
;
69 virtual OUString SAL_CALL
getAccessibleActionDescription(sal_Int32 nIndex
)
70 throw (css::lang::IndexOutOfBoundsException
, css::uno::RuntimeException
, std::exception
) override
;
72 virtual css::uno::Reference
< css::accessibility::XAccessibleKeyBinding
> SAL_CALL
73 getAccessibleActionKeyBinding(sal_Int32 nIndex
)
74 throw (css::lang::IndexOutOfBoundsException
, css::uno::RuntimeException
, std::exception
) override
;
78 virtual css::uno::Any SAL_CALL
queryInterface(
79 css::uno::Type
const & rType
)
80 throw (css::uno::RuntimeException
, std::exception
) override
;
82 virtual void SAL_CALL
acquire() throw () override
;
83 virtual void SAL_CALL
release() throw () override
;
87 void setEnabled(bool bEnabled
);
91 virtual Rectangle
GetBoundingBoxOnScreen() const
92 throw (css::uno::RuntimeException
, std::exception
) override
;
94 virtual Rectangle
GetBoundingBox() const
95 throw (css::uno::RuntimeException
, std::exception
) override
;
98 bool isSelected() const;
99 void updateStateSet();
102 css::uno::Reference
< css::accessibility::XAccessibleStateSet
> mxStateSet
;
104 VclPtr
<ScMenuFloatingWindow
> mpWindow
;
111 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */