xref: /AOO41X/main/accessibility/inc/accessibility/extended/AccessibleBrowseBoxHeaderCell.hxx (revision a462bbb78c0111848099221503583b85b642c10e)
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_ACCESSIBLEBROWSEBOXHEADERCELL_HXX
24 #define ACCESSIBILITY_EXT_ACCESSIBLEBROWSEBOXHEADERCELL_HXX
25 
26 #include "accessibility/extended/AccessibleBrowseBoxBase.hxx"
27 
28 namespace accessibility
29 {
30     class AccessibleBrowseBoxHeaderCell : public BrowseBoxAccessibleElement
31     {
32         sal_Int32   m_nColumnRowId;
33     public:
34         AccessibleBrowseBoxHeaderCell(sal_Int32 _nColumnRowId,
35                                           const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& rxParent,
36                                           ::svt::IAccessibleTableProvider&                  _rBrowseBox,
37                                           const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow >& _xFocusWindow,
38                                           ::svt::AccessibleBrowseBoxObjType  _eObjType);
39         /** @return  The count of visible children. */
40         virtual sal_Int32 SAL_CALL getAccessibleChildCount() throw ( ::com::sun::star::uno::RuntimeException );
41 
42         /** @return  The XAccessible interface of the specified child. */
43         virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL
44             getAccessibleChild( sal_Int32 nChildIndex ) throw ( ::com::sun::star::lang::IndexOutOfBoundsException,::com::sun::star::uno::RuntimeException );
45 
46         /** @return  The index of this object among the parent's children. */
47         virtual sal_Int32 SAL_CALL getAccessibleIndexInParent() throw ( ::com::sun::star::uno::RuntimeException );
48 
49         /** Grabs the focus to the BrowseBox. */
50         virtual void SAL_CALL grabFocus() throw ( ::com::sun::star::uno::RuntimeException );
51 
isRowBarCell() const52         inline sal_Bool isRowBarCell() const
53         {
54             return getType() == ::svt::BBTYPE_ROWHEADERCELL;
55         }
56 
57         /** @return
58                 The name of this class.
59         */
60         virtual ::rtl::OUString SAL_CALL getImplementationName() throw ( ::com::sun::star::uno::RuntimeException );
61 
62         /** Creates a new AccessibleStateSetHelper and fills it with states of the
63             current object.
64             @return
65                 A filled AccessibleStateSetHelper.
66         */
67         ::utl::AccessibleStateSetHelper* implCreateStateSetHelper();
68 
69     protected:
70         virtual Rectangle implGetBoundingBox();
71 
72         virtual Rectangle implGetBoundingBoxOnScreen();
73     };
74 }
75 
76 #endif // ACCESSIBILITY_EXT_ACCESSIBLEBROWSEBOXHEADERCELL_HXX
77 
78