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 final
:
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() override
;
49 virtual css::uno::Reference
< css::accessibility::XAccessible
> SAL_CALL
50 getAccessibleChild(sal_Int32 nIndex
) override
;
52 virtual css::uno::Reference
< css::accessibility::XAccessibleStateSet
> SAL_CALL
53 getAccessibleStateSet() override
;
55 virtual OUString SAL_CALL
getImplementationName() override
;
59 virtual ::sal_Int32 SAL_CALL
getAccessibleActionCount() override
;
61 virtual sal_Bool SAL_CALL
doAccessibleAction(sal_Int32 nIndex
) override
;
63 virtual OUString SAL_CALL
getAccessibleActionDescription(sal_Int32 nIndex
) override
;
65 virtual css::uno::Reference
< css::accessibility::XAccessibleKeyBinding
> SAL_CALL
66 getAccessibleActionKeyBinding(sal_Int32 nIndex
) override
;
70 virtual css::uno::Any SAL_CALL
queryInterface(
71 css::uno::Type
const & rType
) override
;
73 virtual void SAL_CALL
acquire() throw () override
;
74 virtual void SAL_CALL
release() throw () override
;
80 virtual tools::Rectangle
GetBoundingBoxOnScreen() const override
;
82 virtual tools::Rectangle
GetBoundingBox() const override
;
84 bool isSelected() const;
85 void updateStateSet();
87 css::uno::Reference
< css::accessibility::XAccessibleStateSet
> mxStateSet
;
89 VclPtr
<ScMenuFloatingWindow
> mpWindow
;
90 size_t const mnMenuPos
;
95 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */