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>
28 class ScMenuFloatingWindow
;
30 typedef ::cppu::ImplHelper1
<
31 ::com::sun::star::accessibility::XAccessibleAction
> ScAccessibleFilterMenuItem_BASE
;
33 class ScAccessibleFilterMenuItem
:
34 public ScAccessibleContextBase
,
35 public ScAccessibleFilterMenuItem_BASE
38 explicit ScAccessibleFilterMenuItem(
39 const ::com::sun::star::uno::Reference
<
40 ::com::sun::star::accessibility::XAccessible
>& rxParent
, ScMenuFloatingWindow
* pWin
, const OUString
& rName
, size_t nMenuPos
);
42 virtual ~ScAccessibleFilterMenuItem();
44 /// XAccessibleContext
46 virtual sal_Int32 SAL_CALL
getAccessibleChildCount()
47 throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
49 virtual ::com::sun::star::uno::Reference
<
50 ::com::sun::star::accessibility::XAccessible
> SAL_CALL
51 getAccessibleChild(sal_Int32 nIndex
)
52 throw (::com::sun::star::uno::RuntimeException
, ::com::sun::star::lang::IndexOutOfBoundsException
, std::exception
) SAL_OVERRIDE
;
54 virtual ::com::sun::star::uno::Reference
<
55 ::com::sun::star::accessibility::XAccessibleStateSet
> SAL_CALL
56 getAccessibleStateSet()
57 throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
59 virtual OUString SAL_CALL
getImplementationName()
60 throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
64 virtual ::sal_Int32 SAL_CALL
getAccessibleActionCount()
65 throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
67 virtual sal_Bool SAL_CALL
doAccessibleAction(sal_Int32 nIndex
)
68 throw (::com::sun::star::lang::IndexOutOfBoundsException
, ::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
70 virtual OUString SAL_CALL
getAccessibleActionDescription(sal_Int32 nIndex
)
71 throw (::com::sun::star::lang::IndexOutOfBoundsException
, ::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
73 virtual ::com::sun::star::uno::Reference
<
74 ::com::sun::star::accessibility::XAccessibleKeyBinding
> SAL_CALL
75 getAccessibleActionKeyBinding(sal_Int32 nIndex
)
76 throw (::com::sun::star::lang::IndexOutOfBoundsException
, ::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
80 virtual ::com::sun::star::uno::Any SAL_CALL
queryInterface(
81 ::com::sun::star::uno::Type
const & rType
)
82 throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
84 virtual void SAL_CALL
acquire() throw () SAL_OVERRIDE
;
85 virtual void SAL_CALL
release() throw () SAL_OVERRIDE
;
89 void setEnabled(bool bEnabled
);
93 virtual Rectangle
GetBoundingBoxOnScreen() const
94 throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
96 virtual Rectangle
GetBoundingBox() const
97 throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
100 bool isSelected() const;
101 bool isFocused() const;
102 void updateStateSet();
105 ::com::sun::star::uno::Reference
< ::com::sun::star::accessibility::XAccessibleStateSet
> mxStateSet
;
107 ScMenuFloatingWindow
* mpWindow
;
115 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */