Version 6.1.4.1, tag libreoffice-6.1.4.1
[LibreOffice.git] / accessibility / inc / standard / vclxaccessibletabcontrol.hxx
blob8f248466bce99df0a27be81c3ad659df66710281
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 .
20 #ifndef INCLUDED_ACCESSIBILITY_INC_STANDARD_VCLXACCESSIBLETABCONTROL_HXX
21 #define INCLUDED_ACCESSIBILITY_INC_STANDARD_VCLXACCESSIBLETABCONTROL_HXX
23 #include <toolkit/awt/vclxaccessiblecomponent.hxx>
24 #include <com/sun/star/accessibility/XAccessibleSelection.hpp>
25 #include <vcl/vclptr.hxx>
27 #include <vector>
29 class TabControl;
32 // class VCLXAccessibleTabControl
35 typedef ::cppu::ImplHelper1 <
36 css::accessibility::XAccessibleSelection > VCLXAccessibleTabControl_BASE;
38 class VCLXAccessibleTabControl final : public VCLXAccessibleComponent,
39 public VCLXAccessibleTabControl_BASE
41 private:
42 typedef std::vector< css::uno::Reference< css::accessibility::XAccessible > > AccessibleChildren;
44 AccessibleChildren m_aAccessibleChildren;
45 VclPtr<TabControl> m_pTabControl;
47 css::uno::Reference< css::accessibility::XAccessible > implGetAccessibleChild( sal_Int32 i );
48 bool implIsAccessibleChildSelected( sal_Int32 nChildIndex );
51 void UpdateFocused();
52 void UpdateSelected( sal_Int32 i, bool bSelected );
53 void UpdatePageText( sal_Int32 i );
54 void UpdateTabPage( sal_Int32 i, bool bNew );
56 void InsertChild( sal_Int32 i );
57 void RemoveChild( sal_Int32 i );
59 virtual void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) override;
60 virtual void ProcessWindowChildEvent( const VclWindowEvent& rVclWindowEvent ) override;
61 virtual void FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet ) override;
63 // XComponent
64 virtual void SAL_CALL disposing() override;
66 public:
67 VCLXAccessibleTabControl( VCLXWindow* pVCLXWindow );
69 // XInterface
70 DECLARE_XINTERFACE()
72 // XTypeProvider
73 DECLARE_XTYPEPROVIDER()
75 // XServiceInfo
76 virtual OUString SAL_CALL getImplementationName() override;
77 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
79 // XAccessibleContext
80 virtual sal_Int32 SAL_CALL getAccessibleChildCount( ) override;
81 virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleChild( sal_Int32 i ) override;
82 virtual sal_Int16 SAL_CALL getAccessibleRole( ) override;
83 virtual OUString SAL_CALL getAccessibleName( ) override;
85 // XAccessibleSelection
86 virtual void SAL_CALL selectAccessibleChild( sal_Int32 nChildIndex ) override;
87 virtual sal_Bool SAL_CALL isAccessibleChildSelected( sal_Int32 nChildIndex ) override;
88 virtual void SAL_CALL clearAccessibleSelection( ) override;
89 virtual void SAL_CALL selectAllAccessibleChildren( ) override;
90 virtual sal_Int32 SAL_CALL getSelectedAccessibleChildCount( ) override;
91 virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getSelectedAccessibleChild( sal_Int32 nSelectedChildIndex ) override;
92 virtual void SAL_CALL deselectAccessibleChild( sal_Int32 nChildIndex ) override;
96 #endif // INCLUDED_ACCESSIBILITY_INC_STANDARD_VCLXACCESSIBLETABCONTROL_HXX
98 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */