1*96821c26SAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*96821c26SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*96821c26SAndrew Rist * or more contributor license agreements. See the NOTICE file 5*96821c26SAndrew Rist * distributed with this work for additional information 6*96821c26SAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*96821c26SAndrew Rist * to you under the Apache License, Version 2.0 (the 8*96821c26SAndrew Rist * "License"); you may not use this file except in compliance 9*96821c26SAndrew Rist * with the License. You may obtain a copy of the License at 10*96821c26SAndrew Rist * 11*96821c26SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*96821c26SAndrew Rist * 13*96821c26SAndrew Rist * Unless required by applicable law or agreed to in writing, 14*96821c26SAndrew Rist * software distributed under the License is distributed on an 15*96821c26SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*96821c26SAndrew Rist * KIND, either express or implied. See the License for the 17*96821c26SAndrew Rist * specific language governing permissions and limitations 18*96821c26SAndrew Rist * under the License. 19*96821c26SAndrew Rist * 20*96821c26SAndrew Rist *************************************************************/ 21*96821c26SAndrew Rist 22*96821c26SAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir #ifndef _BASCTL_ACCESSIBLEDIALOGCONTROLSHAPE_HXX_ 25cdf0e10cSrcweir #define _BASCTL_ACCESSIBLEDIALOGCONTROLSHAPE_HXX_ 26cdf0e10cSrcweir 27cdf0e10cSrcweir #include <com/sun/star/accessibility/XAccessible.hpp> 28cdf0e10cSrcweir #include <com/sun/star/lang/XServiceInfo.hpp> 29cdf0e10cSrcweir #include <com/sun/star/beans/XPropertyChangeListener.hpp> 30cdf0e10cSrcweir #include <comphelper/accessiblecomponenthelper.hxx> 31cdf0e10cSrcweir #include <cppuhelper/implbase3.hxx> 32cdf0e10cSrcweir #include <com/sun/star/beans/XPropertySet.hpp> 33cdf0e10cSrcweir 34cdf0e10cSrcweir #include <vector> 35cdf0e10cSrcweir 36cdf0e10cSrcweir class Window; 37cdf0e10cSrcweir class DialogWindow; 38cdf0e10cSrcweir class DlgEdObj; 39cdf0e10cSrcweir class VCLExternalSolarLock; 40cdf0e10cSrcweir 41cdf0e10cSrcweir namespace utl { 42cdf0e10cSrcweir class AccessibleStateSetHelper; 43cdf0e10cSrcweir } 44cdf0e10cSrcweir 45cdf0e10cSrcweir 46cdf0e10cSrcweir // ---------------------------------------------------- 47cdf0e10cSrcweir // class AccessibleDialogControlShape 48cdf0e10cSrcweir // ---------------------------------------------------- 49cdf0e10cSrcweir 50cdf0e10cSrcweir typedef ::comphelper::OAccessibleExtendedComponentHelper AccessibleExtendedComponentHelper_BASE; 51cdf0e10cSrcweir 52cdf0e10cSrcweir typedef ::cppu::ImplHelper3< 53cdf0e10cSrcweir ::com::sun::star::accessibility::XAccessible, 54cdf0e10cSrcweir ::com::sun::star::lang::XServiceInfo, 55cdf0e10cSrcweir ::com::sun::star::beans::XPropertyChangeListener > AccessibleDialogControlShape_BASE; 56cdf0e10cSrcweir 57cdf0e10cSrcweir class AccessibleDialogControlShape : public AccessibleExtendedComponentHelper_BASE, 58cdf0e10cSrcweir public AccessibleDialogControlShape_BASE 59cdf0e10cSrcweir { 60cdf0e10cSrcweir friend class AccessibleDialogWindow; 61cdf0e10cSrcweir 62cdf0e10cSrcweir private: 63cdf0e10cSrcweir VCLExternalSolarLock* m_pExternalLock; 64cdf0e10cSrcweir DialogWindow* m_pDialogWindow; 65cdf0e10cSrcweir DlgEdObj* m_pDlgEdObj; 66cdf0e10cSrcweir sal_Bool m_bFocused; 67cdf0e10cSrcweir sal_Bool m_bSelected; 68cdf0e10cSrcweir 69cdf0e10cSrcweir ::com::sun::star::awt::Rectangle m_aBounds; 70cdf0e10cSrcweir ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > m_xControlModel; 71cdf0e10cSrcweir 72cdf0e10cSrcweir protected: 73cdf0e10cSrcweir sal_Bool IsFocused(); 74cdf0e10cSrcweir sal_Bool IsSelected(); 75cdf0e10cSrcweir 76cdf0e10cSrcweir void SetFocused( sal_Bool bFocused ); 77cdf0e10cSrcweir void SetSelected( sal_Bool bSelected ); 78cdf0e10cSrcweir 79cdf0e10cSrcweir ::com::sun::star::awt::Rectangle GetBounds(); 80cdf0e10cSrcweir void SetBounds( const ::com::sun::star::awt::Rectangle& aBounds ); 81cdf0e10cSrcweir 82cdf0e10cSrcweir Window* GetWindow() const; 83cdf0e10cSrcweir 84cdf0e10cSrcweir ::rtl::OUString GetModelStringProperty( const sal_Char* pPropertyName ); 85cdf0e10cSrcweir 86cdf0e10cSrcweir virtual void FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet ); 87cdf0e10cSrcweir 88cdf0e10cSrcweir // OCommonAccessibleComponent 89cdf0e10cSrcweir virtual ::com::sun::star::awt::Rectangle SAL_CALL implGetBounds( ) throw (::com::sun::star::uno::RuntimeException); 90cdf0e10cSrcweir 91cdf0e10cSrcweir // XComponent 92cdf0e10cSrcweir virtual void SAL_CALL disposing(); 93cdf0e10cSrcweir 94cdf0e10cSrcweir public: 95cdf0e10cSrcweir AccessibleDialogControlShape( DialogWindow* pDialogWindow, DlgEdObj* pDlgEdObj ); 96cdf0e10cSrcweir virtual ~AccessibleDialogControlShape(); 97cdf0e10cSrcweir 98cdf0e10cSrcweir // XInterface 99cdf0e10cSrcweir DECLARE_XINTERFACE() 100cdf0e10cSrcweir 101cdf0e10cSrcweir // XTypeProvider 102cdf0e10cSrcweir DECLARE_XTYPEPROVIDER() 103cdf0e10cSrcweir 104cdf0e10cSrcweir // XEventListener 105cdf0e10cSrcweir virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& rSource ) throw (::com::sun::star::uno::RuntimeException); 106cdf0e10cSrcweir 107cdf0e10cSrcweir // XPropertyChangeListener 108cdf0e10cSrcweir virtual void SAL_CALL propertyChange( const ::com::sun::star::beans::PropertyChangeEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException); 109cdf0e10cSrcweir 110cdf0e10cSrcweir // XServiceInfo 111cdf0e10cSrcweir virtual ::rtl::OUString SAL_CALL getImplementationName() throw (::com::sun::star::uno::RuntimeException); 112cdf0e10cSrcweir virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& rServiceName ) throw (::com::sun::star::uno::RuntimeException); 113cdf0e10cSrcweir virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw (::com::sun::star::uno::RuntimeException); 114cdf0e10cSrcweir 115cdf0e10cSrcweir // XAccessible 116cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext > SAL_CALL getAccessibleContext( ) throw (::com::sun::star::uno::RuntimeException); 117cdf0e10cSrcweir 118cdf0e10cSrcweir // XAccessibleContext 119cdf0e10cSrcweir virtual sal_Int32 SAL_CALL getAccessibleChildCount( ) throw (::com::sun::star::uno::RuntimeException); 120cdf0e10cSrcweir 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); 121cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleParent( ) throw (::com::sun::star::uno::RuntimeException); 122cdf0e10cSrcweir virtual sal_Int32 SAL_CALL getAccessibleIndexInParent( ) throw (::com::sun::star::uno::RuntimeException); 123cdf0e10cSrcweir virtual sal_Int16 SAL_CALL getAccessibleRole( ) throw (::com::sun::star::uno::RuntimeException); 124cdf0e10cSrcweir virtual ::rtl::OUString SAL_CALL getAccessibleDescription( ) throw (::com::sun::star::uno::RuntimeException); 125cdf0e10cSrcweir virtual ::rtl::OUString SAL_CALL getAccessibleName( ) throw (::com::sun::star::uno::RuntimeException); 126cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleRelationSet > SAL_CALL getAccessibleRelationSet( ) throw (::com::sun::star::uno::RuntimeException); 127cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleStateSet > SAL_CALL getAccessibleStateSet( ) throw (::com::sun::star::uno::RuntimeException); 128cdf0e10cSrcweir virtual ::com::sun::star::lang::Locale SAL_CALL getLocale( ) throw (::com::sun::star::accessibility::IllegalAccessibleComponentStateException, ::com::sun::star::uno::RuntimeException); 129cdf0e10cSrcweir 130cdf0e10cSrcweir // XAccessibleComponent 131cdf0e10cSrcweir 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); 132cdf0e10cSrcweir virtual void SAL_CALL grabFocus( ) throw (::com::sun::star::uno::RuntimeException); 133cdf0e10cSrcweir virtual sal_Int32 SAL_CALL getForeground( ) throw (::com::sun::star::uno::RuntimeException); 134cdf0e10cSrcweir virtual sal_Int32 SAL_CALL getBackground( ) throw (::com::sun::star::uno::RuntimeException); 135cdf0e10cSrcweir 136cdf0e10cSrcweir // XAccessibleExtendedComponent 137cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XFont > SAL_CALL getFont( ) throw (::com::sun::star::uno::RuntimeException); 138cdf0e10cSrcweir virtual ::rtl::OUString SAL_CALL getTitledBorderText( ) throw (::com::sun::star::uno::RuntimeException); 139cdf0e10cSrcweir virtual ::rtl::OUString SAL_CALL getToolTipText( ) throw (::com::sun::star::uno::RuntimeException); 140cdf0e10cSrcweir }; 141cdf0e10cSrcweir 142cdf0e10cSrcweir 143cdf0e10cSrcweir #endif // _BASCTL_ACCESSIBLEDIALOGCONTROLSHAPE_HXX_ 144