nss: upgrade to release 3.73
[LibreOffice.git] / starmath / inc / AccessibleSmElement.hxx
blob202de669089932f8e8d9b8a7defb28e86eaef5a1
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 .
19 #ifndef INCLUDED_STARMATH_INC_ACCESSIBLESMELEMENT_HXX
20 #define INCLUDED_STARMATH_INC_ACCESSIBLESMELEMENT_HXX
22 #include <com/sun/star/accessibility/XAccessible.hpp>
23 #include <com/sun/star/accessibility/XAccessibleAction.hpp>
24 #include <com/sun/star/accessibility/XAccessibleComponent.hpp>
25 #include <com/sun/star/accessibility/XAccessibleContext.hpp>
26 #include <com/sun/star/accessibility/XAccessibleStateSet.hpp>
27 #include <com/sun/star/awt/Rectangle.hpp>
28 #include <com/sun/star/lang/XServiceInfo.hpp>
29 #include <cppuhelper/implbase3.hxx>
30 #include <comphelper/accessiblecomponenthelper.hxx>
31 #include <sal/types.h>
32 #include <vcl/vclptr.hxx>
34 class SmElementsControl;
36 typedef ::cppu::ImplHelper3<css::lang::XServiceInfo, css::accessibility::XAccessible,
37 css::accessibility::XAccessibleAction>
38 AccessibleSmElement_BASE;
40 class AccessibleSmElement final : public comphelper::OAccessibleComponentHelper,
41 public AccessibleSmElement_BASE
43 SmElementsControl* m_pSmElementsControl;
44 const sal_Int32 m_nIndexInParent; ///< index in the parent XAccessible
45 const sal_uInt16 m_nItemId; ///< index in the SmElementsControl
46 bool m_bHasFocus;
47 sal_Int16 m_nRole;
49 ~AccessibleSmElement() override;
50 void SAL_CALL disposing() override;
51 css::awt::Rectangle implGetBounds() override;
53 void testAction(sal_Int32) const;
55 public:
56 explicit AccessibleSmElement(SmElementsControl* pSmElementsControl, sal_uInt16 nItemId,
57 sal_Int32 nIndexInParent);
59 void SetFocus(bool _bFocus);
60 sal_uInt16 itemId() const { return m_nItemId; }
62 DECLARE_XINTERFACE()
63 DECLARE_XTYPEPROVIDER()
65 // XAccessible
66 css::uno::Reference<css::accessibility::XAccessibleContext>
67 SAL_CALL getAccessibleContext() override;
69 // XServiceInfo
70 OUString SAL_CALL getImplementationName() override;
71 sal_Bool SAL_CALL supportsService(const OUString& rServiceName) override;
72 css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override;
74 // XAccessibleContext
75 sal_Int32 SAL_CALL getAccessibleChildCount() override;
76 css::uno::Reference<css::accessibility::XAccessible>
77 SAL_CALL getAccessibleChild(sal_Int32 i) override;
78 css::uno::Reference<css::accessibility::XAccessible> SAL_CALL getAccessibleParent() override;
79 sal_Int32 SAL_CALL getAccessibleIndexInParent() override;
80 sal_Int16 SAL_CALL getAccessibleRole() override;
81 OUString SAL_CALL getAccessibleDescription() override;
82 OUString SAL_CALL getAccessibleName() override;
83 css::uno::Reference<css::accessibility::XAccessibleRelationSet>
84 SAL_CALL getAccessibleRelationSet() override;
85 css::uno::Reference<css::accessibility::XAccessibleStateSet>
86 SAL_CALL getAccessibleStateSet() override;
88 // XAccessibleComponent
89 css::uno::Reference<css::accessibility::XAccessible>
90 SAL_CALL getAccessibleAtPoint(const css::awt::Point& aPoint) override;
91 void SAL_CALL grabFocus() override;
92 sal_Int32 SAL_CALL getForeground() override;
93 sal_Int32 SAL_CALL getBackground() override;
95 // XAccessibleAction
96 sal_Int32 SAL_CALL getAccessibleActionCount() override;
97 sal_Bool SAL_CALL doAccessibleAction(sal_Int32 nIndex) override;
98 OUString SAL_CALL getAccessibleActionDescription(sal_Int32 nIndex) override;
99 css::uno::Reference<css::accessibility::XAccessibleKeyBinding>
100 SAL_CALL getAccessibleActionKeyBinding(sal_Int32 nIndex) override;
103 #endif // INCLUDED_STARMATH_INC_ACCESSIBLESMELEMENT_HXX
105 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */