tdf#130857 qt weld: Implement QtInstanceWidget::strip_mnemonic
[LibreOffice.git] / chart2 / source / controller / accessibility / AccessibleChartElement.hxx
blobe2a94bf69ff8c27e720e1acd7e349014fe2aa436
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 #pragma once
21 #include <AccessibleBase.hxx>
22 #include <com/sun/star/accessibility/XAccessibleExtendedComponent.hpp>
24 namespace com::sun::star::accessibility { class XAccessible; }
25 namespace com::sun::star::accessibility { class XAccessibleContext; }
26 namespace com::sun::star::awt { class XFont; }
28 namespace chart
30 class AccessibleTextHelper;
32 /** Base class for all Chart Accessibility objects except the root node (see AccessibleChartView)
34 This class contains a reference to the ChartModel, thus, components can easily access all core functionality.
36 Usage Instructions:
38 <ul>
39 <li>define the getAccessibleName() method of XAccessibleContext</li>
40 <li>set the ChartModel using SetChartModel() for the first node before
41 creating any children</li>
42 <li>override UpdateChildren()</li>
43 </ul>
46 namespace impl
48 typedef ::cppu::ImplInheritanceHelper<
49 AccessibleBase,
50 css::accessibility::XAccessibleExtendedComponent
51 > AccessibleChartElement_Base;
54 class AccessibleChartElement :
55 public impl::AccessibleChartElement_Base
57 public:
58 AccessibleChartElement( const AccessibleElementInfo & rAccInfo,
59 bool bMayHaveChildren );
60 virtual ~AccessibleChartElement() override;
62 // ________ AccessibleBase ________
63 virtual bool ImplUpdateChildren() override;
64 virtual css::uno::Reference< css::accessibility::XAccessible >
65 ImplGetAccessibleChildById( sal_Int64 i ) const override;
66 virtual sal_Int64 ImplGetAccessibleChildCount() const override;
68 // ________ XAccessibleContext ________
69 virtual OUString SAL_CALL getAccessibleName() override;
70 virtual OUString SAL_CALL getAccessibleDescription() override;
72 // ________ XAccessibleExtendedComponent ________
73 virtual OUString SAL_CALL getTitledBorderText() override;
74 virtual OUString SAL_CALL getToolTipText() override;
76 // the following interface is implemented in AccessibleBase, however it is
77 // also a (non-virtual) base class of XAccessibleExtendedComponent Thus
78 // these methods have to be overridden and forward to AccessibleBase
80 // ________ XAccessibleComponent ________
81 virtual sal_Bool SAL_CALL containsPoint( const css::awt::Point& aPoint ) override;
82 virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleAtPoint( const css::awt::Point& aPoint ) override;
83 virtual css::awt::Rectangle SAL_CALL getBounds() override;
84 virtual css::awt::Point SAL_CALL getLocation() override;
85 virtual css::awt::Point SAL_CALL getLocationOnScreen() override;
86 virtual css::awt::Size SAL_CALL getSize() override;
87 virtual void SAL_CALL grabFocus() override;
88 virtual sal_Int32 SAL_CALL getForeground() override;
89 virtual sal_Int32 SAL_CALL getBackground() override;
91 // ________ XServiceInfo ________
92 virtual OUString SAL_CALL getImplementationName() override;
94 private:
95 bool m_bHasText;
96 rtl::Reference< ::chart::AccessibleTextHelper >
97 m_xTextHelper;
99 void InitTextEdit();
102 } // namespace chart
104 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */