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: accessibledialogcontrolshape.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_ACCESSIBLEDIALOGCONTROLSHAPE_HXX_
32 #define _BASCTL_ACCESSIBLEDIALOGCONTROLSHAPE_HXX_
34 #include <com/sun/star/accessibility/XAccessible.hpp>
35 #include <com/sun/star/lang/XServiceInfo.hpp>
36 #include <com/sun/star/beans/XPropertyChangeListener.hpp>
37 #include <comphelper/accessiblecomponenthelper.hxx>
38 #include <cppuhelper/implbase3.hxx>
39 #include <com/sun/star/beans/XPropertySet.hpp>
46 class VCLExternalSolarLock
;
49 class AccessibleStateSetHelper
;
53 // ----------------------------------------------------
54 // class AccessibleDialogControlShape
55 // ----------------------------------------------------
57 typedef ::comphelper::OAccessibleExtendedComponentHelper AccessibleExtendedComponentHelper_BASE
;
59 typedef ::cppu::ImplHelper3
<
60 ::com::sun::star::accessibility::XAccessible
,
61 ::com::sun::star::lang::XServiceInfo
,
62 ::com::sun::star::beans::XPropertyChangeListener
> AccessibleDialogControlShape_BASE
;
64 class AccessibleDialogControlShape
: public AccessibleExtendedComponentHelper_BASE
,
65 public AccessibleDialogControlShape_BASE
67 friend class AccessibleDialogWindow
;
70 VCLExternalSolarLock
* m_pExternalLock
;
71 DialogWindow
* m_pDialogWindow
;
72 DlgEdObj
* m_pDlgEdObj
;
76 ::com::sun::star::awt::Rectangle m_aBounds
;
77 ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySet
> m_xControlModel
;
81 sal_Bool
IsSelected();
83 void SetFocused( sal_Bool bFocused
);
84 void SetSelected( sal_Bool bSelected
);
86 ::com::sun::star::awt::Rectangle
GetBounds();
87 void SetBounds( const ::com::sun::star::awt::Rectangle
& aBounds
);
89 Window
* GetWindow() const;
91 ::rtl::OUString
GetModelStringProperty( const sal_Char
* pPropertyName
);
93 virtual void FillAccessibleStateSet( utl::AccessibleStateSetHelper
& rStateSet
);
95 // OCommonAccessibleComponent
96 virtual ::com::sun::star::awt::Rectangle SAL_CALL
implGetBounds( ) throw (::com::sun::star::uno::RuntimeException
);
99 virtual void SAL_CALL
disposing();
102 AccessibleDialogControlShape( DialogWindow
* pDialogWindow
, DlgEdObj
* pDlgEdObj
);
103 virtual ~AccessibleDialogControlShape();
109 DECLARE_XTYPEPROVIDER()
112 virtual void SAL_CALL
disposing( const ::com::sun::star::lang::EventObject
& rSource
) throw (::com::sun::star::uno::RuntimeException
);
114 // XPropertyChangeListener
115 virtual void SAL_CALL
propertyChange( const ::com::sun::star::beans::PropertyChangeEvent
& rEvent
) throw (::com::sun::star::uno::RuntimeException
);
118 virtual ::rtl::OUString SAL_CALL
getImplementationName() throw (::com::sun::star::uno::RuntimeException
);
119 virtual sal_Bool SAL_CALL
supportsService( const ::rtl::OUString
& rServiceName
) throw (::com::sun::star::uno::RuntimeException
);
120 virtual ::com::sun::star::uno::Sequence
< ::rtl::OUString
> SAL_CALL
getSupportedServiceNames() throw (::com::sun::star::uno::RuntimeException
);
123 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::accessibility::XAccessibleContext
> SAL_CALL
getAccessibleContext( ) throw (::com::sun::star::uno::RuntimeException
);
125 // XAccessibleContext
126 virtual sal_Int32 SAL_CALL
getAccessibleChildCount( ) throw (::com::sun::star::uno::RuntimeException
);
127 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
);
128 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::accessibility::XAccessible
> SAL_CALL
getAccessibleParent( ) throw (::com::sun::star::uno::RuntimeException
);
129 virtual sal_Int32 SAL_CALL
getAccessibleIndexInParent( ) throw (::com::sun::star::uno::RuntimeException
);
130 virtual sal_Int16 SAL_CALL
getAccessibleRole( ) throw (::com::sun::star::uno::RuntimeException
);
131 virtual ::rtl::OUString SAL_CALL
getAccessibleDescription( ) throw (::com::sun::star::uno::RuntimeException
);
132 virtual ::rtl::OUString SAL_CALL
getAccessibleName( ) throw (::com::sun::star::uno::RuntimeException
);
133 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::accessibility::XAccessibleRelationSet
> SAL_CALL
getAccessibleRelationSet( ) throw (::com::sun::star::uno::RuntimeException
);
134 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::accessibility::XAccessibleStateSet
> SAL_CALL
getAccessibleStateSet( ) throw (::com::sun::star::uno::RuntimeException
);
135 virtual ::com::sun::star::lang::Locale SAL_CALL
getLocale( ) throw (::com::sun::star::accessibility::IllegalAccessibleComponentStateException
, ::com::sun::star::uno::RuntimeException
);
137 // XAccessibleComponent
138 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
);
139 virtual void SAL_CALL
grabFocus( ) throw (::com::sun::star::uno::RuntimeException
);
140 virtual sal_Int32 SAL_CALL
getForeground( ) throw (::com::sun::star::uno::RuntimeException
);
141 virtual sal_Int32 SAL_CALL
getBackground( ) throw (::com::sun::star::uno::RuntimeException
);
143 // XAccessibleExtendedComponent
144 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::awt::XFont
> SAL_CALL
getFont( ) throw (::com::sun::star::uno::RuntimeException
);
145 virtual ::rtl::OUString SAL_CALL
getTitledBorderText( ) throw (::com::sun::star::uno::RuntimeException
);
146 virtual ::rtl::OUString SAL_CALL
getToolTipText( ) throw (::com::sun::star::uno::RuntimeException
);
150 #endif // _BASCTL_ACCESSIBLEDIALOGCONTROLSHAPE_HXX_