1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 #ifndef _SVTOOLS_VCLXACCESSIBLEHEADERBAR_HXX_ 23 #define _SVTOOLS_VCLXACCESSIBLEHEADERBAR_HXX_ 24 25 #ifndef _TOOLKIT_AWT_VCLXACCESSIBLECOMPONENT_HXX_ 26 #include <toolkit/awt/vclxaccessiblecomponent.hxx> 27 #endif 28 #ifndef _HEADBAR_HXX 29 #include <svtools/headbar.hxx> 30 #endif 31 #ifndef _TOOLKIT_AWT_VCLXWINDOW_HXX_ 32 #include "toolkit/awt/vclxwindow.hxx" 33 #endif 34 class HeaderBar; 35 36 // ---------------------------------------------------- 37 // class VCLXAccessibleHeaderBar 38 // ---------------------------------------------------- 39 40 typedef std::vector< ::com::sun::star::uno::WeakReference< ::com::sun::star::accessibility::XAccessible > > 41 ListItems; 42 43 class VCLXAccessibleHeaderBar : public VCLXAccessibleComponent 44 { 45 46 public: 47 HeaderBar* m_pHeadBar; 48 virtual ~VCLXAccessibleHeaderBar(); 49 50 virtual void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ); 51 virtual void FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet ); 52 53 VCLXAccessibleHeaderBar( VCLXWindow* pVCLXindow ); 54 55 // XAccessibleContext 56 virtual sal_Int32 SAL_CALL getAccessibleChildCount( ) throw (::com::sun::star::uno::RuntimeException); 57 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); 58 virtual sal_Int16 SAL_CALL getAccessibleRole( ) throw (::com::sun::star::uno::RuntimeException); 59 60 61 // XServiceInfo 62 virtual ::rtl::OUString SAL_CALL getImplementationName() throw (::com::sun::star::uno::RuntimeException); 63 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw (::com::sun::star::uno::RuntimeException); 64 65 public: 66 virtual void SAL_CALL disposing (void); 67 ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateChild(sal_Int32 i); 68 69 private: 70 ListItems m_aAccessibleChildren; 71 72 73 }; 74 75 class VCLXHeaderBar : public VCLXWindow 76 { 77 public: 78 VCLXHeaderBar(Window* pHeaderBar); 79 virtual ~VCLXHeaderBar(); 80 81 virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext > CreateAccessibleContext(); 82 83 }; 84 85 #endif // _SVTOOLS_VCLXACCESSIBLEHEADERBAR_HXX_ 86 87