xref: /trunk/main/accessibility/inc/accessibility/extended/AccessibleGridControlHeaderCell.hxx (revision 91144cd0085a7583d2099b982122deb2184ab956)
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 ACCESSIBILITY_EXT_ACCESSIBLEGRIDCONTROLHEADERCELL_HXX
24 #define ACCESSIBILITY_EXT_ACCESSIBLEGRIDCONTROLHEADERCELL_HXX
25 
26 #include "accessibility/extended/AccessibleGridControlTableCell.hxx"
27 
28 namespace accessibility
29 {
30     class AccessibleGridControlHeaderCell : public AccessibleGridControlCell, public ::com::sun::star::accessibility::XAccessible
31     {
32         sal_Int32   m_nColumnRowId;
33     public:
34         AccessibleGridControlHeaderCell(sal_Int32 _nColumnRowId,
35                         const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& rxParent,
36                         ::svt::table::IAccessibleTable& _rTable,
37                         ::svt::table::AccessibleTableControlObjType  _eObjType);
38         /** @return  The count of visible children. */
39         virtual sal_Int32 SAL_CALL getAccessibleChildCount();
40 
41         /** @return  The XAccessible interface of the specified child. */
42         virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL
43             getAccessibleChild( sal_Int32 nChildIndex );
44 
45         /** @return  The index of this object among the parent's children. */
46         virtual sal_Int32 SAL_CALL getAccessibleIndexInParent();
47 
48         /** Grabs the focus to the GridControl. */
49         virtual void SAL_CALL grabFocus();
50 
51         // XInterface -------------------------------------------------------------
52 
53         /** Queries for a new interface. */
54         ::com::sun::star::uno::Any SAL_CALL queryInterface(
55                 const ::com::sun::star::uno::Type& rType );
56 
57         /** Aquires the object (calls acquire() on base class). */
58         virtual void SAL_CALL acquire() throw ();
59 
60         /** Releases the object (calls release() on base class). */
61         virtual void SAL_CALL release() throw ();
62         // XAccessible ------------------------------------------------------------
63 
64         /** @return  The XAccessibleContext interface of this object. */
65         virtual ::com::sun::star::uno::Reference<
66             ::com::sun::star::accessibility::XAccessibleContext > SAL_CALL
67         getAccessibleContext();
68         //-------------------------------------------------------------------------
isRowBarCell() const69         inline sal_Bool isRowBarCell() const
70         {
71             return getType() == ::svt::table::TCTYPE_ROWHEADERCELL;
72         }
73 
74         /** @return
75                 The name of this class.
76         */
77         virtual ::rtl::OUString SAL_CALL getImplementationName();
78 
79         /** Creates a new AccessibleStateSetHelper and fills it with states of the
80             current object.
81             @return
82                 A filled AccessibleStateSetHelper.
83         */
84         ::utl::AccessibleStateSetHelper* implCreateStateSetHelper();
85 
86     protected:
87         virtual Rectangle implGetBoundingBox();
88 
89         virtual Rectangle implGetBoundingBoxOnScreen();
90     private:
91         ::rtl::OUString m_sHeaderName;
92     };
93 }
94 
95 #endif // ACCESSIBILITY_EXT_ACCESSIBLEGRIDCONTROLHEADERCELL_HXX
96