1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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_ACCESSIBILITY_INC_STANDARD_VCLXACCESSIBLETOOLBOX_HXX
20 #define INCLUDED_ACCESSIBILITY_INC_STANDARD_VCLXACCESSIBLETOOLBOX_HXX
23 #include <toolkit/awt/vclxaccessiblecomponent.hxx>
24 #include <vcl/toolbox.hxx>
25 #include <com/sun/star/accessibility/XAccessibleSelection.hpp>
28 // class VCLXAccessibleToolBox
31 typedef ::cppu::ImplHelper1
< css::accessibility::XAccessibleSelection
> VCLXAccessibleToolBox_BASE
;
33 typedef std::map
< sal_Int32
, css::uno::Reference
< css::accessibility::XAccessible
> > ToolBoxItemsMap
;
35 class VCLXAccessibleToolBoxItem
;
38 class VCLXAccessibleToolBox final
: public VCLXAccessibleComponent
, public VCLXAccessibleToolBox_BASE
41 ToolBoxItemsMap m_aAccessibleChildren
;
43 VCLXAccessibleToolBoxItem
* GetItem_Impl( ToolBox::ImplToolItems::size_type _nPos
);
45 void UpdateFocus_Impl();
46 void ReleaseFocus_Impl( ToolBox::ImplToolItems::size_type _nPos
);
47 void UpdateChecked_Impl( ToolBox::ImplToolItems::size_type _nPos
);
48 void UpdateIndeterminate_Impl( ToolBox::ImplToolItems::size_type _nPos
);
49 void UpdateItem_Impl( ToolBox::ImplToolItems::size_type _nPos
);
50 void UpdateAllItems_Impl();
51 void UpdateItemName_Impl( ToolBox::ImplToolItems::size_type _nPos
);
52 void UpdateItemEnabled_Impl( ToolBox::ImplToolItems::size_type _nPos
);
53 void UpdateCustomPopupItemp_Impl( vcl::Window
* pWindow
, bool bOpen
);
54 void HandleSubToolBarEvent( const VclWindowEvent
& rVclWindowEvent
);
55 void ReleaseSubToolBox( ToolBox
* _pSubToolBox
);
56 sal_Int32
implGetAccessibleChildCount();
58 virtual ~VCLXAccessibleToolBox() override
;
60 virtual void FillAccessibleStateSet( utl::AccessibleStateSetHelper
& rStateSet
) override
;
61 virtual void ProcessWindowEvent( const VclWindowEvent
& rVclWindowEvent
) override
;
62 virtual void ProcessWindowChildEvent( const VclWindowEvent
& rVclWindowEvent
) override
;
64 virtual css::uno::Reference
< css::accessibility::XAccessible
> GetChildAccessible( const VclWindowEvent
& rVclWindowEvent
) override
;
65 css::uno::Reference
< css::accessibility::XAccessible
> GetItemWindowAccessible( const VclWindowEvent
& rVclWindowEvent
);
68 virtual void SAL_CALL
disposing() override
;
71 VCLXAccessibleToolBox( VCLXWindow
* pVCLXWindow
);
77 DECLARE_XTYPEPROVIDER( )
80 virtual OUString SAL_CALL
getImplementationName() override
;
81 virtual css::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames() override
;
84 virtual sal_Int32 SAL_CALL
getAccessibleChildCount( ) override
;
85 virtual css::uno::Reference
< css::accessibility::XAccessible
> SAL_CALL
getAccessibleChild( sal_Int32 i
) override
;
86 virtual css::uno::Reference
< css::accessibility::XAccessible
> SAL_CALL
getAccessibleAtPoint( const css::awt::Point
& aPoint
) override
;
88 // XAccessibleSelection
89 virtual void SAL_CALL
selectAccessibleChild( sal_Int32 nChildIndex
) override
;
90 virtual sal_Bool SAL_CALL
isAccessibleChildSelected( sal_Int32 nChildIndex
) override
;
91 virtual void SAL_CALL
clearAccessibleSelection( ) override
;
92 virtual void SAL_CALL
selectAllAccessibleChildren( ) override
;
93 virtual sal_Int32 SAL_CALL
getSelectedAccessibleChildCount( ) override
;
94 virtual css::uno::Reference
< css::accessibility::XAccessible
> SAL_CALL
getSelectedAccessibleChild( sal_Int32 nSelectedChildIndex
) override
;
95 virtual void SAL_CALL
deselectAccessibleChild( sal_Int32 nChildIndex
) override
;
98 void implReleaseToolboxItem(
99 ToolBoxItemsMap::iterator
const & _rMapPos
,
104 #endif // INCLUDED_ACCESSIBILITY_INC_STANDARD_VCLXACCESSIBLETOOLBOX_HXX
106 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */