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 _SVX_ACCESSIBILITY_ACCESSIBLE_SELECTION_BASE_HXX 25 #define _SVX_ACCESSIBILITY_ACCESSIBLE_SELECTION_BASE_HXX 26 27 #include <comphelper/accessibleselectionhelper.hxx> 28 #include "editeng/editengdllapi.h" 29 30 namespace accessibility 31 { 32 /** @descr 33 This base class provides a base implementation of the 34 <type>XAccessibleSelection</type> interface. 35 The following methods have to be implemented if this 36 class is used: 37 38 <method>implGetMutex</method>, 39 <method>implGetAccessibleContext</method>, 40 <method>implIsSelected</method>, 41 <method>implSelect</method>, 42 */ 43 class EDITENG_DLLPUBLIC AccessibleSelectionBase : public ::comphelper::OCommonAccessibleSelection, 44 public ::com::sun::star::accessibility::XAccessibleSelection 45 { 46 protected: 47 48 virtual ::osl::Mutex& implGetMutex() = 0; 49 50 public: 51 52 // XAccessibleSelection - default implementations 53 virtual void SAL_CALL selectAccessibleChild( sal_Int32 nChildIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); 54 virtual sal_Bool SAL_CALL isAccessibleChildSelected( sal_Int32 nChildIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); 55 virtual void SAL_CALL clearAccessibleSelection( ) throw (::com::sun::star::uno::RuntimeException); 56 virtual void SAL_CALL selectAllAccessibleChildren( ) throw (::com::sun::star::uno::RuntimeException); 57 virtual sal_Int32 SAL_CALL getSelectedAccessibleChildCount( ) throw (::com::sun::star::uno::RuntimeException); 58 virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getSelectedAccessibleChild( sal_Int32 nSelectedChildIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); 59 virtual void SAL_CALL deselectAccessibleChild( sal_Int32 nSelectedChildIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); 60 61 public: 62 63 AccessibleSelectionBase(); 64 virtual ~AccessibleSelectionBase(); 65 }; 66 67 } 68 69 #endif // _SVX_ACCESSIBILITY_ACCESSIBLE_SELECTION_BASE_HXX 70