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 .
20 #ifndef INCLUDED_BASCTL_SOURCE_INC_ACCESSIBLEDIALOGWINDOW_HXX
21 #define INCLUDED_BASCTL_SOURCE_INC_ACCESSIBLEDIALOGWINDOW_HXX
23 #include <com/sun/star/accessibility/XAccessibleSelection.hpp>
24 #include <com/sun/star/lang/XServiceInfo.hpp>
25 #include <comphelper/accessiblecomponenthelper.hxx>
26 #include <cppuhelper/implbase3.hxx>
27 #include <svl/lstner.hxx>
28 #include <tools/link.hxx>
29 #include <vcl/vclptr.hxx>
35 class AccessibleStateSetHelper
;
47 // class AccessibleDialogWindow
49 typedef ::cppu::ImplHelper3
<
50 css::accessibility::XAccessible
,
51 css::accessibility::XAccessibleSelection
,
52 css::lang::XServiceInfo
> AccessibleDialogWindow_BASE
;
54 class AccessibleDialogWindow final
: public comphelper::OAccessibleExtendedComponentHelper
,
55 public AccessibleDialogWindow_BASE
,
64 css::uno::Reference
< css::accessibility::XAccessible
> rxAccessible
;
66 ChildDescriptor( DlgEdObj
* _pDlgEdObj
);
68 bool operator==( const ChildDescriptor
& rDesc
);
69 bool operator<( const ChildDescriptor
& rDesc
) const;
72 typedef std::vector
< ChildDescriptor
> AccessibleChildren
;
74 AccessibleChildren m_aAccessibleChildren
;
75 VclPtr
<basctl::DialogWindow
> m_pDialogWindow
;
76 DlgEditor
* m_pDlgEditor
;
77 DlgEdModel
* m_pDlgEdModel
;
80 void UpdateSelected();
83 bool IsChildVisible( const ChildDescriptor
& rDesc
);
85 void InsertChild( const ChildDescriptor
& rDesc
);
86 void RemoveChild( const ChildDescriptor
& rDesc
);
87 void UpdateChild( const ChildDescriptor
& rDesc
);
88 void UpdateChildren();
91 DECL_LINK( WindowEventListener
, VclWindowEvent
&, void );
93 void ProcessWindowEvent( const VclWindowEvent
& rVclWindowEvent
);
94 void FillAccessibleStateSet( utl::AccessibleStateSetHelper
& rStateSet
);
96 // OCommonAccessibleComponent
97 virtual css::awt::Rectangle
implGetBounds( ) override
;
100 virtual void SAL_CALL
disposing() override
;
103 AccessibleDialogWindow (basctl::DialogWindow
*);
104 virtual ~AccessibleDialogWindow() override
;
107 virtual void Notify( SfxBroadcaster
& rBC
, const SfxHint
& rHint
) override
;
113 DECLARE_XTYPEPROVIDER()
116 virtual OUString SAL_CALL
getImplementationName() override
;
117 virtual sal_Bool SAL_CALL
supportsService( const OUString
& rServiceName
) override
;
118 virtual css::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames() override
;
121 virtual css::uno::Reference
< css::accessibility::XAccessibleContext
> SAL_CALL
getAccessibleContext( ) override
;
123 // XAccessibleContext
124 virtual sal_Int32 SAL_CALL
getAccessibleChildCount( ) override
;
125 virtual css::uno::Reference
< css::accessibility::XAccessible
> SAL_CALL
getAccessibleChild( sal_Int32 i
) override
;
126 virtual css::uno::Reference
< css::accessibility::XAccessible
> SAL_CALL
getAccessibleParent( ) override
;
127 virtual sal_Int32 SAL_CALL
getAccessibleIndexInParent( ) override
;
128 virtual sal_Int16 SAL_CALL
getAccessibleRole( ) override
;
129 virtual OUString SAL_CALL
getAccessibleDescription( ) override
;
130 virtual OUString SAL_CALL
getAccessibleName( ) override
;
131 virtual css::uno::Reference
< css::accessibility::XAccessibleRelationSet
> SAL_CALL
getAccessibleRelationSet( ) override
;
132 virtual css::uno::Reference
< css::accessibility::XAccessibleStateSet
> SAL_CALL
getAccessibleStateSet( ) override
;
133 virtual css::lang::Locale SAL_CALL
getLocale( ) override
;
135 // XAccessibleComponent
136 virtual css::uno::Reference
< css::accessibility::XAccessible
> SAL_CALL
getAccessibleAtPoint( const css::awt::Point
& aPoint
) override
;
137 virtual void SAL_CALL
grabFocus( ) override
;
138 virtual sal_Int32 SAL_CALL
getForeground( ) override
;
139 virtual sal_Int32 SAL_CALL
getBackground( ) override
;
141 // XAccessibleExtendedComponent
142 virtual css::uno::Reference
< css::awt::XFont
> SAL_CALL
getFont( ) override
;
143 virtual OUString SAL_CALL
getTitledBorderText( ) override
;
144 virtual OUString SAL_CALL
getToolTipText( ) override
;
146 // XAccessibleSelection
147 virtual void SAL_CALL
selectAccessibleChild( sal_Int32 nChildIndex
) override
;
148 virtual sal_Bool SAL_CALL
isAccessibleChildSelected( sal_Int32 nChildIndex
) override
;
149 virtual void SAL_CALL
clearAccessibleSelection() override
;
150 virtual void SAL_CALL
selectAllAccessibleChildren( ) override
;
151 virtual sal_Int32 SAL_CALL
getSelectedAccessibleChildCount( ) override
;
152 virtual css::uno::Reference
< css::accessibility::XAccessible
> SAL_CALL
getSelectedAccessibleChild( sal_Int32 nSelectedChildIndex
) override
;
153 virtual void SAL_CALL
deselectAccessibleChild( sal_Int32 nChildIndex
) override
;
156 } // namespace basctl
158 #endif // INCLUDED_BASCTL_SOURCE_INC_ACCESSIBLEDIALOGWINDOW_HXX
160 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */