Gtk-WARNING gtktreestore.c:1047: Invalid column number 1 added to iter
[LibreOffice.git] / accessibility / inc / standard / vclxaccessibletabcontrol.hxx
blob5dfa69d3cd93a8e343627656a1e4c161b66b2977
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 #pragma once
22 #include <com/sun/star/accessibility/XAccessibleSelection.hpp>
23 #include <cppuhelper/implbase.hxx>
24 #include <vcl/accessibility/vclxaccessiblecomponent.hxx>
25 #include <vcl/tabctrl.hxx>
26 #include <vcl/vclptr.hxx>
28 #include <vector>
30 class VCLXAccessibleTabPage;
33 class VCLXAccessibleTabControl final : public cppu::ImplInheritanceHelper<
34 VCLXAccessibleComponent,
35 css::accessibility::XAccessibleSelection>
37 private:
38 typedef std::vector< rtl::Reference< VCLXAccessibleTabPage > > AccessibleChildren;
40 AccessibleChildren m_aAccessibleChildren;
41 VclPtr<TabControl> m_pTabControl;
43 css::uno::Reference< css::accessibility::XAccessible > implGetAccessibleChild( sal_Int64 i );
44 bool implIsAccessibleChildSelected( sal_Int32 nChildIndex );
47 void UpdateFocused();
48 void UpdateSelected( sal_Int32 i, bool bSelected );
49 void UpdatePageText( sal_Int32 i );
50 void UpdateTabPage( sal_Int32 i, bool bNew );
52 void InsertChild( sal_Int32 i );
53 void RemoveChild( sal_Int32 i );
55 virtual void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) override;
56 virtual void ProcessWindowChildEvent( const VclWindowEvent& rVclWindowEvent ) override;
57 virtual void FillAccessibleStateSet( sal_Int64& rStateSet ) override;
59 // XComponent
60 virtual void SAL_CALL disposing() override;
62 public:
63 VCLXAccessibleTabControl(vcl::Window* pWindow);
65 // XServiceInfo
66 virtual OUString SAL_CALL getImplementationName() override;
67 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
69 // XAccessibleContext
70 virtual sal_Int64 SAL_CALL getAccessibleChildCount( ) override;
71 virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleChild( sal_Int64 i ) override;
72 virtual sal_Int16 SAL_CALL getAccessibleRole( ) override;
73 virtual OUString SAL_CALL getAccessibleName( ) override;
75 // XAccessibleSelection
76 virtual void SAL_CALL selectAccessibleChild( sal_Int64 nChildIndex ) override;
77 virtual sal_Bool SAL_CALL isAccessibleChildSelected( sal_Int64 nChildIndex ) override;
78 virtual void SAL_CALL clearAccessibleSelection( ) override;
79 virtual void SAL_CALL selectAllAccessibleChildren( ) override;
80 virtual sal_Int64 SAL_CALL getSelectedAccessibleChildCount( ) override;
81 virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getSelectedAccessibleChild( sal_Int64 nSelectedChildIndex ) override;
82 virtual void SAL_CALL deselectAccessibleChild( sal_Int64 nChildIndex ) override;
87 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */