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_STANDARD_VCLXACCESSIBLECHECKBOX_HXX 25 #define ACCESSIBILITY_STANDARD_VCLXACCESSIBLECHECKBOX_HXX 26 27 #include <accessibility/standard/vclxaccessibletextcomponent.hxx> 28 29 #ifndef _COM_SUN_STAR_ACCESSIBILITY_XACCESSIBLE_ACTION_HPP_ 30 #include <com/sun/star/accessibility/XAccessibleAction.hpp> 31 #endif 32 #include <com/sun/star/accessibility/XAccessibleValue.hpp> 33 34 #ifndef _CPPUHELPER_IMPLBASE2_HXX 35 #include <cppuhelper/implbase2.hxx> 36 #endif 37 38 39 // ---------------------------------------------------- 40 // class VCLXAccessibleCheckBox 41 // ---------------------------------------------------- 42 43 typedef ::cppu::ImplHelper2< 44 ::com::sun::star::accessibility::XAccessibleAction, 45 ::com::sun::star::accessibility::XAccessibleValue > VCLXAccessibleCheckBox_BASE; 46 47 class VCLXAccessibleCheckBox : public VCLXAccessibleTextComponent, 48 public VCLXAccessibleCheckBox_BASE 49 { 50 private: 51 bool m_bChecked; 52 bool m_bIndeterminate; 53 54 protected: 55 virtual ~VCLXAccessibleCheckBox(); 56 57 bool IsChecked(); 58 bool IsIndeterminate(); 59 60 void SetChecked( bool bChecked ); 61 void SetIndeterminate( bool bIndeterminate ); 62 63 virtual void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ); 64 virtual void FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet ); 65 66 public: 67 VCLXAccessibleCheckBox( VCLXWindow* pVCLXindow ); 68 69 // XInterface 70 DECLARE_XINTERFACE() 71 72 // XTypeProvider 73 DECLARE_XTYPEPROVIDER() 74 75 // XServiceInfo 76 virtual ::rtl::OUString SAL_CALL getImplementationName() throw (::com::sun::star::uno::RuntimeException); 77 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw (::com::sun::star::uno::RuntimeException); 78 79 // XAccessibleAction 80 virtual sal_Int32 SAL_CALL getAccessibleActionCount( ) throw (::com::sun::star::uno::RuntimeException); 81 virtual sal_Bool SAL_CALL doAccessibleAction ( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); 82 virtual ::rtl::OUString SAL_CALL getAccessibleActionDescription ( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); 83 virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleKeyBinding > SAL_CALL getAccessibleActionKeyBinding( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); 84 85 // XAccessibleValue 86 virtual ::com::sun::star::uno::Any SAL_CALL getCurrentValue( ) throw (::com::sun::star::uno::RuntimeException); 87 virtual sal_Bool SAL_CALL setCurrentValue( const ::com::sun::star::uno::Any& aNumber ) throw (::com::sun::star::uno::RuntimeException); 88 virtual ::com::sun::star::uno::Any SAL_CALL getMaximumValue( ) throw (::com::sun::star::uno::RuntimeException); 89 virtual ::com::sun::star::uno::Any SAL_CALL getMinimumValue( ) throw (::com::sun::star::uno::RuntimeException); 90 }; 91 92 #endif // ACCESSIBILITY_STANDARD_VCLXACCESSIBLECHECKBOX_HXX 93 94