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 23 24 #ifndef ACCESSIBILITY_EXT_ACCESSIBLEICONCHOICECTRL_HXX_ 25 #define ACCESSIBILITY_EXT_ACCESSIBLEICONCHOICECTRL_HXX_ 26 27 #include <com/sun/star/accessibility/XAccessibleSelection.hpp> 28 #include <com/sun/star/lang/DisposedException.hpp> 29 #include <cppuhelper/implbase2.hxx> 30 #include <vcl/vclevent.hxx> 31 #include <toolkit/awt/vclxaccessiblecomponent.hxx> 32 33 // class AccessibleListBox ----------------------------------------------- 34 35 class SvtIconChoiceCtrl; 36 37 //........................................................................ 38 namespace accessibility 39 { 40 //........................................................................ 41 42 typedef ::cppu::ImplHelper2< ::com::sun::star::accessibility::XAccessible 43 , ::com::sun::star::accessibility::XAccessibleSelection> AccessibleIconChoiceCtrl_BASE; 44 45 /** the class OAccessibleListBoxEntry represents the base class for an accessible object of a listbox entry 46 */ 47 class AccessibleIconChoiceCtrl :public AccessibleIconChoiceCtrl_BASE 48 ,public VCLXAccessibleComponent 49 { 50 protected: 51 ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > m_xParent; 52 53 protected: 54 virtual ~AccessibleIconChoiceCtrl(); 55 56 /** this function is called upon disposing the component */ 57 virtual void SAL_CALL disposing(); 58 59 virtual void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ); 60 virtual void FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet ); 61 62 SvtIconChoiceCtrl* getCtrl(); 63 public: 64 /** OAccessibleBase needs a valid view 65 @param _rIconCtrl 66 is the box for which we implement an accessible object 67 @param _xParent 68 is our parent accessible object 69 */ 70 AccessibleIconChoiceCtrl( SvtIconChoiceCtrl& _rIconCtrl, 71 const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& _xParent ); 72 73 // XTypeProvider 74 DECLARE_XTYPEPROVIDER() 75 76 // XInterface 77 DECLARE_XINTERFACE() 78 79 // XServiceInfo 80 virtual ::rtl::OUString SAL_CALL getImplementationName(); 81 virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ); 82 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames(); 83 84 // XServiceInfo - static methods 85 static com::sun::star::uno::Sequence< ::rtl::OUString > getSupportedServiceNames_Static(void); 86 static ::rtl::OUString getImplementationName_Static(void); 87 88 // XAccessible 89 virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext > SAL_CALL getAccessibleContext( ); 90 91 // XAccessibleContext 92 virtual sal_Int32 SAL_CALL getAccessibleChildCount( ); 93 virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleChild( sal_Int32 i ); 94 virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleParent( ); 95 virtual sal_Int16 SAL_CALL getAccessibleRole( ); 96 virtual ::rtl::OUString SAL_CALL getAccessibleDescription( ); 97 virtual ::rtl::OUString SAL_CALL getAccessibleName( ); 98 99 // XAccessibleSelection 100 void SAL_CALL selectAccessibleChild( sal_Int32 nChildIndex ); 101 sal_Bool SAL_CALL isAccessibleChildSelected( sal_Int32 nChildIndex ); 102 void SAL_CALL clearAccessibleSelection( ); 103 void SAL_CALL selectAllAccessibleChildren( ); 104 sal_Int32 SAL_CALL getSelectedAccessibleChildCount( ); 105 ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getSelectedAccessibleChild( sal_Int32 nSelectedChildIndex ); 106 void SAL_CALL deselectAccessibleChild( sal_Int32 nSelectedChildIndex ); 107 }; 108 109 //........................................................................ 110 }// namespace accessibility 111 //........................................................................ 112 113 #endif // ACCESSIBILITY_EXT_ACCESSIBLEICONCHOICECTRL_HXX_ 114