xref: /AOO41X/main/accessibility/inc/accessibility/extended/accessibletablistbox.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 
24 #ifndef ACCESSIBILITY_EXT_ACCESSIBLETABLISTBOX_HXX
25 #define ACCESSIBILITY_EXT_ACCESSIBLETABLISTBOX_HXX
26 
27 #include "AccessibleBrowseBox.hxx"
28 #include <cppuhelper/implbase1.hxx>
29 #include <com/sun/star/accessibility/XAccessibleSelection.hpp>
30 #include <svtools/accessibletableprovider.hxx>
31 
32 class SvHeaderTabListBox;
33 
34 // ============================================================================
35 
36 namespace accessibility {
37 
38 class AccessibleBrowseBoxTable;
39 
40 typedef ::cppu::ImplHelper1  <   ::com::sun::star::accessibility::XAccessible
41                             >   AccessibleTabListBox_Base;
42 
43 /** !!! */
44 class AccessibleTabListBox
45                 :public AccessibleBrowseBox
46                 ,public AccessibleTabListBox_Base
47                 ,public ::svt::IAccessibleTabListBox
48 {
49 private:
50     SvHeaderTabListBox*         m_pTabListBox;
51 
52 public:
53     /** ctor()
54         @param rxParent  XAccessible interface of the parent object.
55         @param rBox  The HeaderTabListBox control. */
56     AccessibleTabListBox(
57         const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& rxParent,
58         SvHeaderTabListBox& rBox );
59 
60 public:
61     // XInterface
62     DECLARE_XINTERFACE( )
63     // XTypeProvider
64     DECLARE_XTYPEPROVIDER( )
65 
66     // XAccessibleContext -----------------------------------------------------
67 
68     /** @return  The count of visible children. */
69     virtual sal_Int32 SAL_CALL getAccessibleChildCount()
70         throw ( ::com::sun::star::uno::RuntimeException );
71 
72     /** @return  The XAccessible interface of the specified child. */
73     virtual ::com::sun::star::uno::Reference<
74         ::com::sun::star::accessibility::XAccessible > SAL_CALL
75     getAccessibleChild( sal_Int32 nChildIndex )
76         throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
77                 ::com::sun::star::uno::RuntimeException );
78 
79     // XAccessibleContext
80     ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext > SAL_CALL getAccessibleContext() throw ( ::com::sun::star::uno::RuntimeException );
81 
82     // IAccessibleTabListBox
83     virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >
getMyself()84         getMyself()
85     {
86         return this;
87     }
88 
89     ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >
getHeaderBar(::svt::AccessibleBrowseBoxObjType _eObjType)90         getHeaderBar( ::svt::AccessibleBrowseBoxObjType _eObjType )
91     {
92         return AccessibleBrowseBox::getHeaderBar( _eObjType );
93     }
94 
95 protected:
96     /** dtor() */
97     virtual ~AccessibleTabListBox();
98 
99     /** This method creates and returns an accessible table.
100         @return  An AccessibleBrowseBoxTable. */
101     virtual AccessibleBrowseBoxTable*   createAccessibleTable();
102 };
103 
104 // ============================================================================
105 
106 } // namespace accessibility
107 
108 // ============================================================================
109 
110 #endif // ACCESSIBILITY_EXT_ACCESSIBLETABLISTBOX_HXX
111 
112