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 ::com::sun::star::accessibility::XAccessibleAction
> ScAccessibleFilterMenuItem_BASE
;
34 class ScAccessibleFilterMenuItem
:
35 public ScAccessibleContextBase
,
36 public ScAccessibleFilterMenuItem_BASE
39 explicit ScAccessibleFilterMenuItem(
40 const ::com::sun::star::uno::Reference
<
41 ::com::sun::star::accessibility::XAccessible
>& rxParent
, ScMenuFloatingWindow
* pWin
, const OUString
& rName
, size_t nMenuPos
);
43 virtual ~ScAccessibleFilterMenuItem();
45 /// XAccessibleContext
47 virtual sal_Int32 SAL_CALL
getAccessibleChildCount()
48 throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
50 virtual ::com::sun::star::uno::Reference
<
51 ::com::sun::star::accessibility::XAccessible
> SAL_CALL
52 getAccessibleChild(sal_Int32 nIndex
)
53 throw (::com::sun::star::uno::RuntimeException
, ::com::sun::star::lang::IndexOutOfBoundsException
, std::exception
) SAL_OVERRIDE
;
55 virtual ::com::sun::star::uno::Reference
<
56 ::com::sun::star::accessibility::XAccessibleStateSet
> SAL_CALL
57 getAccessibleStateSet()
58 throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
60 virtual OUString SAL_CALL
getImplementationName()
61 throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
65 virtual ::sal_Int32 SAL_CALL
getAccessibleActionCount()
66 throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
68 virtual sal_Bool SAL_CALL
doAccessibleAction(sal_Int32 nIndex
)
69 throw (::com::sun::star::lang::IndexOutOfBoundsException
, ::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
71 virtual OUString SAL_CALL
getAccessibleActionDescription(sal_Int32 nIndex
)
72 throw (::com::sun::star::lang::IndexOutOfBoundsException
, ::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
74 virtual ::com::sun::star::uno::Reference
<
75 ::com::sun::star::accessibility::XAccessibleKeyBinding
> SAL_CALL
76 getAccessibleActionKeyBinding(sal_Int32 nIndex
)
77 throw (::com::sun::star::lang::IndexOutOfBoundsException
, ::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
81 virtual ::com::sun::star::uno::Any SAL_CALL
queryInterface(
82 ::com::sun::star::uno::Type
const & rType
)
83 throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
85 virtual void SAL_CALL
acquire() throw () SAL_OVERRIDE
;
86 virtual void SAL_CALL
release() throw () SAL_OVERRIDE
;
90 void setEnabled(bool bEnabled
);
94 virtual Rectangle
GetBoundingBoxOnScreen() const
95 throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
97 virtual Rectangle
GetBoundingBox() const
98 throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
101 bool isSelected() const;
102 bool isFocused() const;
103 void updateStateSet();
106 ::com::sun::star::uno::Reference
< ::com::sun::star::accessibility::XAccessibleStateSet
> mxStateSet
;
108 VclPtr
<ScMenuFloatingWindow
> mpWindow
;
115 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */