fdo#74697 Add Bluez 5 support for impress remote.
[LibreOffice.git] / basctl / source / inc / accessibledialogwindow.hxx
blob884cb64f9ff7517d3bbbec533aba0ee29497051a
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 BASCTL_ACCESSIBLEDIALOGWINDOW_HXX
21 #define BASCTL_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>
30 class VCLExternalSolarLock;
31 class VclSimpleEvent;
32 class VclWindowEvent;
34 namespace utl {
35 class AccessibleStateSetHelper;
38 namespace basctl
41 class DialogWindow;
42 class DlgEditor;
43 class DlgEdModel;
44 class DlgEdObj;
46 // ----------------------------------------------------
47 // class AccessibleDialogWindow
48 // ----------------------------------------------------
50 typedef ::comphelper::OAccessibleExtendedComponentHelper AccessibleExtendedComponentHelper_BASE;
52 typedef ::cppu::ImplHelper3 <
53 ::com::sun::star::accessibility::XAccessible,
54 ::com::sun::star::accessibility::XAccessibleSelection,
55 ::com::sun::star::lang::XServiceInfo > AccessibleDialogWindow_BASE;
57 class AccessibleDialogWindow : public AccessibleExtendedComponentHelper_BASE,
58 public AccessibleDialogWindow_BASE,
59 public SfxListener
61 private:
63 class ChildDescriptor
65 public:
66 DlgEdObj* pDlgEdObj;
67 ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > rxAccessible;
69 ChildDescriptor( DlgEdObj* _pDlgEdObj );
70 ~ChildDescriptor();
72 ChildDescriptor( const ChildDescriptor& rDesc );
73 ChildDescriptor& operator=( const ChildDescriptor& rDesc );
75 bool operator==( const ChildDescriptor& rDesc );
76 bool operator<( const ChildDescriptor& rDesc ) const;
79 typedef ::std::vector< ChildDescriptor > AccessibleChildren;
81 AccessibleChildren m_aAccessibleChildren;
82 VCLExternalSolarLock* m_pExternalLock;
83 basctl::DialogWindow* m_pDialogWindow;
84 DlgEditor* m_pDlgEditor;
85 DlgEdModel* m_pDlgEdModel;
87 protected:
88 void UpdateFocused();
89 void UpdateSelected();
90 void UpdateBounds();
92 bool IsChildVisible( const ChildDescriptor& rDesc );
94 void InsertChild( const ChildDescriptor& rDesc );
95 void RemoveChild( const ChildDescriptor& rDesc );
96 void UpdateChild( const ChildDescriptor& rDesc );
97 void UpdateChildren();
98 void SortChildren();
100 DECL_LINK( WindowEventListener, VclSimpleEvent* );
102 virtual void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent );
103 virtual void FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet );
105 // OCommonAccessibleComponent
106 virtual ::com::sun::star::awt::Rectangle SAL_CALL implGetBounds( ) throw (::com::sun::star::uno::RuntimeException);
108 // XComponent
109 virtual void SAL_CALL disposing();
111 public:
112 AccessibleDialogWindow (basctl::DialogWindow*);
113 ~AccessibleDialogWindow();
115 // SfxListener
116 virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
118 // XInterface
119 DECLARE_XINTERFACE()
121 // XTypeProvider
122 DECLARE_XTYPEPROVIDER()
124 // XServiceInfo
125 virtual OUString SAL_CALL getImplementationName() throw (::com::sun::star::uno::RuntimeException);
126 virtual sal_Bool SAL_CALL supportsService( const OUString& rServiceName ) throw (::com::sun::star::uno::RuntimeException);
127 virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw (::com::sun::star::uno::RuntimeException);
129 // XAccessible
130 virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext > SAL_CALL getAccessibleContext( ) throw (::com::sun::star::uno::RuntimeException);
132 // XAccessibleContext
133 virtual sal_Int32 SAL_CALL getAccessibleChildCount( ) throw (::com::sun::star::uno::RuntimeException);
134 virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleChild( sal_Int32 i ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
135 virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleParent( ) throw (::com::sun::star::uno::RuntimeException);
136 virtual sal_Int32 SAL_CALL getAccessibleIndexInParent( ) throw (::com::sun::star::uno::RuntimeException);
137 virtual sal_Int16 SAL_CALL getAccessibleRole( ) throw (::com::sun::star::uno::RuntimeException);
138 virtual OUString SAL_CALL getAccessibleDescription( ) throw (::com::sun::star::uno::RuntimeException);
139 virtual OUString SAL_CALL getAccessibleName( ) throw (::com::sun::star::uno::RuntimeException);
140 virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleRelationSet > SAL_CALL getAccessibleRelationSet( ) throw (::com::sun::star::uno::RuntimeException);
141 virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleStateSet > SAL_CALL getAccessibleStateSet( ) throw (::com::sun::star::uno::RuntimeException);
142 virtual ::com::sun::star::lang::Locale SAL_CALL getLocale( ) throw (::com::sun::star::accessibility::IllegalAccessibleComponentStateException, ::com::sun::star::uno::RuntimeException);
144 // XAccessibleComponent
145 virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleAtPoint( const ::com::sun::star::awt::Point& aPoint ) throw (::com::sun::star::uno::RuntimeException);
146 virtual void SAL_CALL grabFocus( ) throw (::com::sun::star::uno::RuntimeException);
147 virtual sal_Int32 SAL_CALL getForeground( ) throw (::com::sun::star::uno::RuntimeException);
148 virtual sal_Int32 SAL_CALL getBackground( ) throw (::com::sun::star::uno::RuntimeException);
150 // XAccessibleExtendedComponent
151 virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XFont > SAL_CALL getFont( ) throw (::com::sun::star::uno::RuntimeException);
152 virtual OUString SAL_CALL getTitledBorderText( ) throw (::com::sun::star::uno::RuntimeException);
153 virtual OUString SAL_CALL getToolTipText( ) throw (::com::sun::star::uno::RuntimeException);
155 // XAccessibleSelection
156 virtual void SAL_CALL selectAccessibleChild( sal_Int32 nChildIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
157 virtual sal_Bool SAL_CALL isAccessibleChildSelected( sal_Int32 nChildIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
158 virtual void SAL_CALL clearAccessibleSelection( ) throw (::com::sun::star::uno::RuntimeException);
159 virtual void SAL_CALL selectAllAccessibleChildren( ) throw (::com::sun::star::uno::RuntimeException);
160 virtual sal_Int32 SAL_CALL getSelectedAccessibleChildCount( ) throw (::com::sun::star::uno::RuntimeException);
161 virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getSelectedAccessibleChild( sal_Int32 nSelectedChildIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
162 virtual void SAL_CALL deselectAccessibleChild( sal_Int32 nChildIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
165 } // namespace basctl
167 #endif // BASCTL_ACCESSIBLEDIALOGWINDOW_HXX
169 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */