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 ACCESSIBILITY_EXT_ACCESSIBLEBROWSEBOXTABLE_HXX 26 #define ACCESSIBILITY_EXT_ACCESSIBLEBROWSEBOXTABLE_HXX 27 28 #include "accessibility/extended/AccessibleBrowseBoxTableBase.hxx" 29 30 // ============================================================================ 31 32 namespace accessibility { 33 34 // ============================================================================ 35 36 /** This class represents the accessible object of the data table of a 37 BrowseBox control. */ 38 class AccessibleBrowseBoxTable : public AccessibleBrowseBoxTableBase 39 { 40 friend class AccessibleBrowseBox; // to create header bars 41 42 public: 43 AccessibleBrowseBoxTable( 44 const ::com::sun::star::uno::Reference< 45 ::com::sun::star::accessibility::XAccessible >& rxParent, 46 ::svt::IAccessibleTableProvider& rBrowseBox ); 47 48 protected: 49 virtual ~AccessibleBrowseBoxTable(); 50 51 public: 52 // XAccessibleContext ----------------------------------------------------- 53 54 /** @return The XAccessible interface of the specified child. */ 55 virtual ::com::sun::star::uno::Reference< 56 ::com::sun::star::accessibility::XAccessible > SAL_CALL 57 getAccessibleChild( sal_Int32 nChildIndex ) 58 throw ( ::com::sun::star::lang::IndexOutOfBoundsException, 59 ::com::sun::star::uno::RuntimeException ); 60 61 /** @return The index of this object among the parent's children. */ 62 virtual sal_Int32 SAL_CALL getAccessibleIndexInParent() 63 throw ( ::com::sun::star::uno::RuntimeException ); 64 65 // XAccessibleComponent --------------------------------------------------- 66 67 /** @return The accessible child rendered under the given point. */ 68 virtual ::com::sun::star::uno::Reference< 69 ::com::sun::star::accessibility::XAccessible > SAL_CALL 70 getAccessibleAtPoint( const ::com::sun::star::awt::Point& rPoint ) 71 throw ( ::com::sun::star::uno::RuntimeException ); 72 73 /** Grabs the focus to (the current cell of) the data table. */ 74 virtual void SAL_CALL grabFocus() 75 throw ( ::com::sun::star::uno::RuntimeException ); 76 77 /** @return The key bindings associated with this object. */ 78 virtual ::com::sun::star::uno::Any SAL_CALL getAccessibleKeyBinding() 79 throw ( ::com::sun::star::uno::RuntimeException ); 80 81 // XAccessibleTable ------------------------------------------------------- 82 83 /** @return The description text of the specified row. */ 84 virtual ::rtl::OUString SAL_CALL getAccessibleRowDescription( sal_Int32 nRow ) 85 throw ( ::com::sun::star::lang::IndexOutOfBoundsException, 86 ::com::sun::star::uno::RuntimeException ); 87 88 /** @return The description text of the specified column. */ 89 virtual ::rtl::OUString SAL_CALL getAccessibleColumnDescription( sal_Int32 nColumn ) 90 throw ( ::com::sun::star::lang::IndexOutOfBoundsException, 91 ::com::sun::star::uno::RuntimeException ); 92 93 /** @return The XAccessibleTable interface of the row header bar. */ 94 virtual ::com::sun::star::uno::Reference< 95 ::com::sun::star::accessibility::XAccessibleTable > SAL_CALL 96 getAccessibleRowHeaders() 97 throw ( ::com::sun::star::uno::RuntimeException ); 98 99 /** @return The XAccessibleTable interface of the column header bar. */ 100 virtual ::com::sun::star::uno::Reference< 101 ::com::sun::star::accessibility::XAccessibleTable > SAL_CALL 102 getAccessibleColumnHeaders() 103 throw ( ::com::sun::star::uno::RuntimeException ); 104 105 /** @return An index list of completely selected rows. */ 106 virtual ::com::sun::star::uno::Sequence< sal_Int32 > SAL_CALL 107 getSelectedAccessibleRows() 108 throw ( ::com::sun::star::uno::RuntimeException ); 109 110 /** @return An index list of completely selected columns. */ 111 virtual ::com::sun::star::uno::Sequence< sal_Int32 > SAL_CALL 112 getSelectedAccessibleColumns() 113 throw ( ::com::sun::star::uno::RuntimeException ); 114 115 /** @return <TRUE/>, if the specified row is completely selected. */ 116 virtual sal_Bool SAL_CALL isAccessibleRowSelected( sal_Int32 nRow ) 117 throw ( ::com::sun::star::lang::IndexOutOfBoundsException, 118 ::com::sun::star::uno::RuntimeException ); 119 120 /** @return <TRUE/>, if the specified column is completely selected. */ 121 virtual sal_Bool SAL_CALL isAccessibleColumnSelected( sal_Int32 nColumn ) 122 throw ( ::com::sun::star::lang::IndexOutOfBoundsException, 123 ::com::sun::star::uno::RuntimeException ); 124 125 /** @return The XAccessible interface of the cell object at the specified 126 cell position. */ 127 virtual ::com::sun::star::uno::Reference< 128 ::com::sun::star::accessibility::XAccessible > SAL_CALL 129 getAccessibleCellAt( sal_Int32 nRow, sal_Int32 nColumn ) 130 throw ( ::com::sun::star::lang::IndexOutOfBoundsException, 131 ::com::sun::star::uno::RuntimeException ); 132 133 /** @return <TRUE/>, if the specified cell is selected. */ 134 virtual sal_Bool SAL_CALL isAccessibleSelected( sal_Int32 nRow, sal_Int32 nColumn ) 135 throw ( ::com::sun::star::lang::IndexOutOfBoundsException, 136 ::com::sun::star::uno::RuntimeException ); 137 138 // XServiceInfo ----------------------------------------------------------- 139 140 /** @return The name of this class. */ 141 virtual ::rtl::OUString SAL_CALL getImplementationName() 142 throw ( ::com::sun::star::uno::RuntimeException ); 143 144 protected: 145 // internal virtual methods ----------------------------------------------- 146 147 /** @attention This method requires locked mutex's and a living object. 148 @return The bounding box (VCL rect.) relative to the parent window. */ 149 virtual Rectangle implGetBoundingBox(); 150 /** @attention This method requires locked mutex's and a living object. 151 @return The bounding box (VCL rect.) in screen coordinates. */ 152 virtual Rectangle implGetBoundingBoxOnScreen(); 153 154 // internal helper methods ------------------------------------------------ 155 156 /** @attention This method requires a locked mutex. 157 @return The XAccessibleTable interface of the specified header bar. */ 158 ::com::sun::star::uno::Reference< 159 ::com::sun::star::accessibility::XAccessibleTable > 160 implGetHeaderBar( sal_Int32 nChildIndex ) 161 throw ( ::com::sun::star::uno::RuntimeException ); 162 }; 163 164 // ============================================================================ 165 166 } // namespace accessibility 167 168 // ============================================================================ 169 170 #endif 171 172