Version 6.1.4.1, tag libreoffice-6.1.4.1
[LibreOffice.git] / accessibility / inc / extended / accessibletabbarpagelist.hxx
blob5866bad6f2e33428dd4b41ae72b9d53ee4fe2cf3
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_EXTENDED_ACCESSIBLETABBARPAGELIST_HXX
21 #define INCLUDED_ACCESSIBILITY_INC_EXTENDED_ACCESSIBLETABBARPAGELIST_HXX
23 #include <com/sun/star/accessibility/XAccessible.hpp>
24 #include <com/sun/star/accessibility/XAccessibleSelection.hpp>
25 #include <com/sun/star/lang/XServiceInfo.hpp>
26 #include <cppuhelper/implbase3.hxx>
27 #include <extended/accessibletabbarbase.hxx>
29 #include <vector>
31 namespace utl {
32 class AccessibleStateSetHelper;
36 namespace accessibility
40 // class AccessibleTabBarPageList
43 typedef ::cppu::ImplHelper3<
44 css::accessibility::XAccessible,
45 css::accessibility::XAccessibleSelection,
46 css::lang::XServiceInfo > AccessibleTabBarPageList_BASE;
48 class AccessibleTabBarPageList final : public AccessibleTabBarBase,
49 public AccessibleTabBarPageList_BASE
51 private:
52 typedef std::vector< css::uno::Reference< css::accessibility::XAccessible > > AccessibleChildren;
54 AccessibleChildren m_aAccessibleChildren;
55 sal_Int32 m_nIndexInParent;
57 void UpdateShowing( bool bShowing );
58 void UpdateSelected( sal_Int32 i, bool bSelected );
59 void UpdatePageText( sal_Int32 i );
61 void InsertChild( sal_Int32 i );
62 void RemoveChild( sal_Int32 i );
63 void MoveChild( sal_Int32 i, sal_Int32 j );
65 virtual void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) override;
66 void FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet );
68 // OCommonAccessibleComponent
69 virtual css::awt::Rectangle implGetBounds( ) override;
71 // XComponent
72 virtual void SAL_CALL disposing() override;
74 public:
75 AccessibleTabBarPageList( TabBar* pTabBar, sal_Int32 nIndexInParent );
77 // XInterface
78 DECLARE_XINTERFACE()
80 // XTypeProvider
81 DECLARE_XTYPEPROVIDER()
83 // XServiceInfo
84 virtual OUString SAL_CALL getImplementationName() override;
85 virtual sal_Bool SAL_CALL supportsService( const OUString& rServiceName ) override;
86 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
88 // XAccessible
89 virtual css::uno::Reference< css::accessibility::XAccessibleContext > SAL_CALL getAccessibleContext( ) override;
91 // XAccessibleContext
92 virtual sal_Int32 SAL_CALL getAccessibleChildCount( ) override;
93 virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleChild( sal_Int32 i ) override;
94 virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleParent( ) override;
95 virtual sal_Int32 SAL_CALL getAccessibleIndexInParent( ) override;
96 virtual sal_Int16 SAL_CALL getAccessibleRole( ) override;
97 virtual OUString SAL_CALL getAccessibleDescription( ) override;
98 virtual OUString SAL_CALL getAccessibleName( ) override;
99 virtual css::uno::Reference< css::accessibility::XAccessibleRelationSet > SAL_CALL getAccessibleRelationSet( ) override;
100 virtual css::uno::Reference< css::accessibility::XAccessibleStateSet > SAL_CALL getAccessibleStateSet( ) override;
101 virtual css::lang::Locale SAL_CALL getLocale( ) override;
103 // XAccessibleComponent
104 virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleAtPoint( const css::awt::Point& aPoint ) override;
105 virtual void SAL_CALL grabFocus( ) override;
106 virtual sal_Int32 SAL_CALL getForeground( ) override;
107 virtual sal_Int32 SAL_CALL getBackground( ) override;
109 // XAccessibleExtendedComponent
110 virtual css::uno::Reference< css::awt::XFont > SAL_CALL getFont( ) override;
111 virtual OUString SAL_CALL getTitledBorderText( ) override;
112 virtual OUString SAL_CALL getToolTipText( ) override;
114 // XAccessibleSelection
115 virtual void SAL_CALL selectAccessibleChild( sal_Int32 nChildIndex ) override;
116 virtual sal_Bool SAL_CALL isAccessibleChildSelected( sal_Int32 nChildIndex ) override;
117 virtual void SAL_CALL clearAccessibleSelection( ) override;
118 virtual void SAL_CALL selectAllAccessibleChildren( ) override;
119 virtual sal_Int32 SAL_CALL getSelectedAccessibleChildCount( ) override;
120 virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getSelectedAccessibleChild( sal_Int32 nSelectedChildIndex ) override;
121 virtual void SAL_CALL deselectAccessibleChild( sal_Int32 nChildIndex ) override;
125 } // namespace accessibility
128 #endif // INCLUDED_ACCESSIBILITY_INC_EXTENDED_ACCESSIBLETABBARPAGELIST_HXX
130 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */