1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: accessibledialogwindow.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef _BASCTL_ACCESSIBLEDIALOGWINDOW_HXX_
32 #define _BASCTL_ACCESSIBLEDIALOGWINDOW_HXX_
34 #include <com/sun/star/accessibility/XAccessible.hpp>
35 #include <com/sun/star/accessibility/XAccessibleSelection.hpp>
36 #include <com/sun/star/lang/XServiceInfo.hpp>
37 #include <comphelper/accessiblecomponenthelper.hxx>
38 #include <cppuhelper/implbase3.hxx>
39 #include <tools/link.hxx>
40 #include <svtools/lstner.hxx>
48 class VCLExternalSolarLock
;
53 class AccessibleStateSetHelper
;
57 // ----------------------------------------------------
58 // class AccessibleDialogWindow
59 // ----------------------------------------------------
61 typedef ::comphelper::OAccessibleExtendedComponentHelper AccessibleExtendedComponentHelper_BASE
;
63 typedef ::cppu::ImplHelper3
<
64 ::com::sun::star::accessibility::XAccessible
,
65 ::com::sun::star::accessibility::XAccessibleSelection
,
66 ::com::sun::star::lang::XServiceInfo
> AccessibleDialogWindow_BASE
;
68 class AccessibleDialogWindow
: public AccessibleExtendedComponentHelper_BASE
,
69 public AccessibleDialogWindow_BASE
,
78 ::com::sun::star::uno::Reference
< ::com::sun::star::accessibility::XAccessible
> rxAccessible
;
80 ChildDescriptor( DlgEdObj
* _pDlgEdObj
);
83 ChildDescriptor( const ChildDescriptor
& rDesc
);
84 ChildDescriptor
& operator=( const ChildDescriptor
& rDesc
);
86 bool operator==( const ChildDescriptor
& rDesc
);
87 bool operator<( const ChildDescriptor
& rDesc
) const;
90 typedef ::std::vector
< ChildDescriptor
> AccessibleChildren
;
92 AccessibleChildren m_aAccessibleChildren
;
93 VCLExternalSolarLock
* m_pExternalLock
;
94 DialogWindow
* m_pDialogWindow
;
95 DlgEditor
* m_pDlgEditor
;
96 DlgEdModel
* m_pDlgEdModel
;
100 void UpdateSelected();
103 sal_Bool
IsChildVisible( const ChildDescriptor
& rDesc
);
105 void InsertChild( const ChildDescriptor
& rDesc
);
106 void RemoveChild( const ChildDescriptor
& rDesc
);
107 void UpdateChild( const ChildDescriptor
& rDesc
);
108 void UpdateChildren();
111 DECL_LINK( WindowEventListener
, VclSimpleEvent
* );
113 virtual void ProcessWindowEvent( const VclWindowEvent
& rVclWindowEvent
);
114 virtual void FillAccessibleStateSet( utl::AccessibleStateSetHelper
& rStateSet
);
116 // OCommonAccessibleComponent
117 virtual ::com::sun::star::awt::Rectangle SAL_CALL
implGetBounds( ) throw (::com::sun::star::uno::RuntimeException
);
120 virtual void SAL_CALL
disposing();
123 AccessibleDialogWindow( DialogWindow
* pDialogWindow
);
124 ~AccessibleDialogWindow();
127 virtual void Notify( SfxBroadcaster
& rBC
, const SfxHint
& rHint
);
133 DECLARE_XTYPEPROVIDER()
136 virtual ::rtl::OUString SAL_CALL
getImplementationName() throw (::com::sun::star::uno::RuntimeException
);
137 virtual sal_Bool SAL_CALL
supportsService( const ::rtl::OUString
& rServiceName
) throw (::com::sun::star::uno::RuntimeException
);
138 virtual ::com::sun::star::uno::Sequence
< ::rtl::OUString
> SAL_CALL
getSupportedServiceNames() throw (::com::sun::star::uno::RuntimeException
);
141 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::accessibility::XAccessibleContext
> SAL_CALL
getAccessibleContext( ) throw (::com::sun::star::uno::RuntimeException
);
143 // XAccessibleContext
144 virtual sal_Int32 SAL_CALL
getAccessibleChildCount( ) throw (::com::sun::star::uno::RuntimeException
);
145 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
);
146 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::accessibility::XAccessible
> SAL_CALL
getAccessibleParent( ) throw (::com::sun::star::uno::RuntimeException
);
147 virtual sal_Int32 SAL_CALL
getAccessibleIndexInParent( ) throw (::com::sun::star::uno::RuntimeException
);
148 virtual sal_Int16 SAL_CALL
getAccessibleRole( ) throw (::com::sun::star::uno::RuntimeException
);
149 virtual ::rtl::OUString SAL_CALL
getAccessibleDescription( ) throw (::com::sun::star::uno::RuntimeException
);
150 virtual ::rtl::OUString SAL_CALL
getAccessibleName( ) throw (::com::sun::star::uno::RuntimeException
);
151 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::accessibility::XAccessibleRelationSet
> SAL_CALL
getAccessibleRelationSet( ) throw (::com::sun::star::uno::RuntimeException
);
152 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::accessibility::XAccessibleStateSet
> SAL_CALL
getAccessibleStateSet( ) throw (::com::sun::star::uno::RuntimeException
);
153 virtual ::com::sun::star::lang::Locale SAL_CALL
getLocale( ) throw (::com::sun::star::accessibility::IllegalAccessibleComponentStateException
, ::com::sun::star::uno::RuntimeException
);
155 // XAccessibleComponent
156 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
);
157 virtual void SAL_CALL
grabFocus( ) throw (::com::sun::star::uno::RuntimeException
);
158 virtual sal_Int32 SAL_CALL
getForeground( ) throw (::com::sun::star::uno::RuntimeException
);
159 virtual sal_Int32 SAL_CALL
getBackground( ) throw (::com::sun::star::uno::RuntimeException
);
161 // XAccessibleExtendedComponent
162 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::awt::XFont
> SAL_CALL
getFont( ) throw (::com::sun::star::uno::RuntimeException
);
163 virtual ::rtl::OUString SAL_CALL
getTitledBorderText( ) throw (::com::sun::star::uno::RuntimeException
);
164 virtual ::rtl::OUString SAL_CALL
getToolTipText( ) throw (::com::sun::star::uno::RuntimeException
);
166 // XAccessibleSelection
167 virtual void SAL_CALL
selectAccessibleChild( sal_Int32 nChildIndex
) throw (::com::sun::star::lang::IndexOutOfBoundsException
, ::com::sun::star::uno::RuntimeException
);
168 virtual sal_Bool SAL_CALL
isAccessibleChildSelected( sal_Int32 nChildIndex
) throw (::com::sun::star::lang::IndexOutOfBoundsException
, ::com::sun::star::uno::RuntimeException
);
169 virtual void SAL_CALL
clearAccessibleSelection( ) throw (::com::sun::star::uno::RuntimeException
);
170 virtual void SAL_CALL
selectAllAccessibleChildren( ) throw (::com::sun::star::uno::RuntimeException
);
171 virtual sal_Int32 SAL_CALL
getSelectedAccessibleChildCount( ) throw (::com::sun::star::uno::RuntimeException
);
172 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
);
173 virtual void SAL_CALL
deselectAccessibleChild( sal_Int32 nChildIndex
) throw (::com::sun::star::lang::IndexOutOfBoundsException
, ::com::sun::star::uno::RuntimeException
);
177 #endif // _BASCTL_ACCESSIBLEDIALOGWINDOW_HXX_