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 25 #ifndef _SVX_ACCESSIBILITY_ACCESSIBLE_EXTENDED_COMPONENT_BASE_HXX 26 #define _SVX_ACCESSIBILITY_ACCESSIBLE_EXTENDED_COMPONENT_BASE_HXX 27 28 29 #include <com/sun/star/accessibility/XAccessible.hpp> 30 #include <com/sun/star/accessibility/XAccessibleExtendedComponent.hpp> 31 #include <com/sun/star/awt/XFocusListener.hpp> 32 #include "editeng/editengdllapi.h" 33 34 namespace accessibility { 35 36 /** @descr 37 This base class provides (will provice) a base implementation of the 38 <type>XAccessibleComponent</type> and the 39 <type>XAccessibleExtendedComponent</type> for all shapes. For 40 more detailed documentation about the methods refer to the interface 41 descriptions of <type>XAccessible</type>, 42 <type>XAccessibleContext</type>, <type>XInterface</type>, 43 <type>XServiceInfo</type>, and <type>XTypeProvider</type>. 44 */ 45 class EDITENG_DLLPUBLIC AccessibleComponentBase 46 : public ::com::sun::star::accessibility::XAccessibleExtendedComponent 47 { 48 public: 49 //===== internal ======================================================== 50 AccessibleComponentBase (void); 51 virtual ~AccessibleComponentBase (void); 52 53 54 //===== XAccessibleComponent ================================================ 55 56 /** The default implementation uses the result of 57 <member>getBounds</member> to determine whether the given point lies 58 inside this object. 59 */ 60 virtual sal_Bool SAL_CALL containsPoint ( 61 const ::com::sun::star::awt::Point& aPoint) 62 throw (::com::sun::star::uno::RuntimeException); 63 64 /** The default implementation returns an empty reference. 65 */ 66 virtual ::com::sun::star::uno::Reference< 67 ::com::sun::star::accessibility::XAccessible > SAL_CALL 68 getAccessibleAtPoint ( 69 const ::com::sun::star::awt::Point& aPoint) 70 throw (::com::sun::star::uno::RuntimeException); 71 72 /** The default implementation returns an empty rectangle. 73 */ 74 virtual ::com::sun::star::awt::Rectangle SAL_CALL getBounds (void) 75 throw (::com::sun::star::uno::RuntimeException); 76 77 /** The default implementation uses the result of 78 <member>getBounds</member> to determine the location. 79 */ 80 virtual ::com::sun::star::awt::Point SAL_CALL getLocation (void) 81 throw (::com::sun::star::uno::RuntimeException); 82 83 /** The default implementation returns an empty position, i.e. the 84 * result of the default constructor of <type>com::sun::star::awt::Point</type>. 85 */ 86 virtual ::com::sun::star::awt::Point SAL_CALL getLocationOnScreen (void) 87 throw (::com::sun::star::uno::RuntimeException); 88 89 /** The default implementation uses the result of 90 <member>getBounds</member> to determine the size. 91 */ 92 virtual ::com::sun::star::awt::Size SAL_CALL getSize (void) 93 throw (::com::sun::star::uno::RuntimeException); 94 95 /** The default implementation ignores this call. 96 */ 97 virtual void SAL_CALL addFocusListener ( 98 const ::com::sun::star::uno::Reference< 99 ::com::sun::star::awt::XFocusListener >& xListener) 100 throw (::com::sun::star::uno::RuntimeException); 101 102 /** The default implementation ignores this call. 103 */ 104 virtual void SAL_CALL removeFocusListener (const ::com::sun::star::uno::Reference< 105 ::com::sun::star::awt::XFocusListener >& xListener ) 106 throw (::com::sun::star::uno::RuntimeException); 107 108 /** The default implementation does nothing. 109 */ 110 virtual void SAL_CALL grabFocus (void) 111 throw (::com::sun::star::uno::RuntimeException); 112 113 /** Returns black as the default foreground color. 114 */ 115 virtual sal_Int32 SAL_CALL getForeground (void) 116 throw (::com::sun::star::uno::RuntimeException); 117 118 /** Returns white as the default background color. 119 */ 120 virtual sal_Int32 SAL_CALL getBackground (void) 121 throw (::com::sun::star::uno::RuntimeException); 122 123 //===== XAccessibleExtendedComponent ==================================== 124 virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XFont > SAL_CALL 125 getFont (void) 126 throw (::com::sun::star::uno::RuntimeException); 127 virtual ::rtl::OUString SAL_CALL getTitledBorderText (void) 128 throw (::com::sun::star::uno::RuntimeException); 129 virtual ::rtl::OUString SAL_CALL getToolTipText (void) 130 throw (::com::sun::star::uno::RuntimeException); 131 132 133 //===== XTypeProvider =================================================== 134 135 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type> SAL_CALL 136 getTypes (void) 137 throw (::com::sun::star::uno::RuntimeException); 138 139 }; 140 141 } // end of namespace accessibility 142 143 #endif 144