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 SVTOOLS_ACCESSIBLE_FACTORY_HXX
25 #define SVTOOLS_ACCESSIBLE_FACTORY_HXX
26 
27 #include "AccessibleBrowseBoxObjType.hxx"
28 #include "accessibletableprovider.hxx"
29 
30 #include <com/sun/star/uno/Reference.hxx>
31 
32 #include <rtl/ref.hxx>
33 
34 namespace com { namespace sun { namespace star {
35     namespace accessibility {
36         class XAccessible;
37         class XAccessibleContext;
38     }
39     namespace awt {
40         class XWindow;
41     }
42 } } }
43 class SvHeaderTabListBox;
44 class SvtIconChoiceCtrl;
45 class TabBar;
46 class SvTreeListBox;
47 class VCLXWindow;
48 class TextEngine;
49 class TextView;
50 
51 //........................................................................
52 namespace svt
53 {
54 //........................................................................
55 
56     class ToolPanelDeck;
57     class IToolPanelDeck;
58     class PanelTabBar;
59     namespace table
60     {
61         class IAccessibleTable;
62         class IAccessibleTableControl;
63     }
64 
65     /** a function which is able to create a factory for the standard Accessible/Context
66         components needed for standard toolkit controls
67 
68         The returned pointer denotes an instance of the IAccessibleFactory, which has been acquired
69         <em>once</em>. The caller is responsible for holding this reference as long as it needs the
70         factory, and release it afterwards.
71     */
72     typedef void* (SAL_CALL * GetSvtAccessibilityComponentFactory)( );
73 
74     //================================================================
75 	//= IAccessibleFactory
76 	//================================================================
77     class IAccessibleFactory : public ::rtl::IReference
78     {
79     public:
80         virtual IAccessibleTabListBox*
81             createAccessibleTabListBox(
82 		        const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& rxParent,
83 		        SvHeaderTabListBox& rBox
84             ) const = 0;
85 
86         virtual IAccessibleBrowseBox*
87             createAccessibleBrowseBox(
88                 const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& _rxParent,
89                 IAccessibleTableProvider& _rBrowseBox
90 		    ) const = 0;
91 		virtual table::IAccessibleTableControl*
92             createAccessibleTableControl(
93                 const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& _rxParent,
94 				table::IAccessibleTable& _rTable
95 		    ) const = 0;
96 
97         virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >
98 		    createAccessibleIconChoiceCtrl(
99                 SvtIconChoiceCtrl& _rIconCtrl,
100                 const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& _xParent
101 		    ) const = 0;
102 
103         virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >
104 		    createAccessibleTabBar(
105                 TabBar& _rTabBar
106 		    ) const = 0;
107 
108         virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext >
109 		    createAccessibleTextWindowContext(
110                 VCLXWindow* pVclXWindow, TextEngine& rEngine, TextView& rView, bool bCompoundControlChild
111 		    ) const = 0;
112 
113         virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >
114             createAccessibleTreeListBox(
115                 SvTreeListBox& _rListBox,
116 				const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& _xParent
117 		    ) const = 0;
118 
119         virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >
120             createAccessibleBrowseBoxHeaderBar(
121                 const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& rxParent,
122                 IAccessibleTableProvider& _rOwningTable,
123                 AccessibleBrowseBoxObjType _eObjType
124             ) const = 0;
125 
126         virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >
127             createAccessibleBrowseBoxTableCell(
128                 const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& _rxParent,
129 				IAccessibleTableProvider& _rBrowseBox,
130 				const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow >& _xFocusWindow,
131 				sal_Int32 _nRowId,
132 				sal_uInt16 _nColId,
133                 sal_Int32 _nOffset
134             ) const = 0;
135 
136         virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >
137             createAccessibleBrowseBoxHeaderCell(
138                 sal_Int32 _nColumnRowId,
139 				const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& rxParent,
140 				IAccessibleTableProvider& _rBrowseBox,
141 				const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow >& _xFocusWindow,
142 				AccessibleBrowseBoxObjType  _eObjType
143             ) const = 0;
144 
145         virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >
146             createAccessibleCheckBoxCell(
147                 const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& _rxParent,
148 				IAccessibleTableProvider& _rBrowseBox,
149 				const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow >& _xFocusWindow,
150 				sal_Int32 _nRowPos,
151 				sal_uInt16 _nColPos,
152 				const TriState& _eState,
153 				sal_Bool _bEnabled,
154 				sal_Bool _bIsTriState
155             ) const = 0;
156 
157         virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >
158             createEditBrowseBoxTableCellAccess(
159 			    const ::com::sun::star::uno::Reference< com::sun::star::accessibility::XAccessible >& _rxParent,
160 			    const ::com::sun::star::uno::Reference< com::sun::star::accessibility::XAccessible >& _rxControlAccessible,
161 			    const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow >& _rxFocusWindow,
162                 IAccessibleTableProvider& _rBrowseBox,
163 			    sal_Int32 _nRowPos,
164 			    sal_uInt16 _nColPos
165 		    ) const = 0;
166 
167         virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext >
168             createAccessibleToolPanelDeck(
169                 const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& i_rAccessibleParent,
170                 ::svt::ToolPanelDeck& i_rPanelDeck
171             ) = 0;
172         virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext >
173             createAccessibleToolPanelTabBar(
174                 const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& i_rAccessibleParent,
175                 ::svt::IToolPanelDeck& i_rPanelDeck,
176                 ::svt::PanelTabBar& i_rTabBar
177             ) = 0;
178     };
179 
180 //........................................................................
181 }   // namespace svt
182 //........................................................................
183 
184 #endif // SVTOOLS_ACCESSIBLE_FACTORY_HXX
185