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 #ifndef _CHART2_ACCESSIBLECHARTSHAPE_HXX_ 24 #define _CHART2_ACCESSIBLECHARTSHAPE_HXX_ 25 26 #include "AccessibleBase.hxx" 27 28 #include <com/sun/star/accessibility/XAccessibleExtendedComponent.hpp> 29 #include <cppuhelper/implbase1.hxx> 30 #include <svx/AccessibleShapeTreeInfo.hxx> 31 32 33 namespace accessibility 34 { 35 class AccessibleShape; 36 } 37 38 namespace chart 39 { 40 41 namespace impl 42 { 43 typedef ::cppu::ImplInheritanceHelper1< 44 AccessibleBase, 45 ::com::sun::star::accessibility::XAccessibleExtendedComponent > AccessibleChartShape_Base; 46 } 47 48 class AccessibleChartShape : 49 public impl::AccessibleChartShape_Base 50 { 51 public: 52 AccessibleChartShape( const AccessibleElementInfo& rAccInfo, 53 bool bMayHaveChildren, bool bAlwaysTransparent = false ); 54 virtual ~AccessibleChartShape(); 55 56 // ________ XServiceInfo ________ 57 virtual ::rtl::OUString SAL_CALL getImplementationName(); 58 59 // ________ XAccessibleContext ________ 60 virtual sal_Int32 SAL_CALL getAccessibleChildCount(); 61 virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL 62 getAccessibleChild( sal_Int32 i ); 63 virtual sal_Int16 SAL_CALL getAccessibleRole(); 64 virtual ::rtl::OUString SAL_CALL getAccessibleDescription(); 65 virtual ::rtl::OUString SAL_CALL getAccessibleName(); 66 67 // ________ XAccessibleComponent ________ 68 virtual sal_Bool SAL_CALL containsPoint( const ::com::sun::star::awt::Point& aPoint ); 69 virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleAtPoint( const ::com::sun::star::awt::Point& aPoint ); 70 virtual ::com::sun::star::awt::Rectangle SAL_CALL getBounds(); 71 virtual ::com::sun::star::awt::Point SAL_CALL getLocation(); 72 virtual ::com::sun::star::awt::Point SAL_CALL getLocationOnScreen(); 73 virtual ::com::sun::star::awt::Size SAL_CALL getSize(); 74 virtual void SAL_CALL grabFocus(); 75 virtual sal_Int32 SAL_CALL getForeground(); 76 virtual sal_Int32 SAL_CALL getBackground(); 77 78 // ________ XAccessibleExtendedComponent ________ 79 virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XFont > SAL_CALL getFont(); 80 virtual ::rtl::OUString SAL_CALL getTitledBorderText(); 81 virtual ::rtl::OUString SAL_CALL getToolTipText(); 82 83 private: 84 ::accessibility::AccessibleShape* m_pAccShape; 85 ::accessibility::AccessibleShapeTreeInfo m_aShapeTreeInfo; 86 }; 87 88 } // namespace chart 89 90 #endif 91