xref: /AOO41X/main/svtools/inc/svtools/accessiblefactory.hxx (revision 1ecadb572e7010ff3b3382ad9bf179dbc6efadbb)
1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 
28 #ifndef SVTOOLS_ACCESSIBLE_FACTORY_HXX
29 #define SVTOOLS_ACCESSIBLE_FACTORY_HXX
30 
31 #include "AccessibleBrowseBoxObjType.hxx"
32 #include "accessibletableprovider.hxx"
33 
34 #include <com/sun/star/uno/Reference.hxx>
35 
36 #include <rtl/ref.hxx>
37 
38 namespace com { namespace sun { namespace star {
39     namespace accessibility {
40         class XAccessible;
41         class XAccessibleContext;
42     }
43     namespace awt {
44         class XWindow;
45     }
46 } } }
47 class SvHeaderTabListBox;
48 class SvtIconChoiceCtrl;
49 class TabBar;
50 class SvTreeListBox;
51 class VCLXWindow;
52 class TextEngine;
53 class TextView;
54 
55 //........................................................................
56 namespace svt
57 {
58 //........................................................................
59 
60     class ToolPanelDeck;
61     class IToolPanelDeck;
62     class PanelTabBar;
63     namespace table
64     {
65         class IAccessibleTable;
66         class IAccessibleTableControl;
67     }
68 
69     /** a function which is able to create a factory for the standard Accessible/Context
70         components needed for standard toolkit controls
71 
72         The returned pointer denotes an instance of the IAccessibleFactory, which has been acquired
73         <em>once</em>. The caller is responsible for holding this reference as long as it needs the
74         factory, and release it afterwards.
75     */
76     typedef void* (SAL_CALL * GetSvtAccessibilityComponentFactory)( );
77 
78     //================================================================
79 	//= IAccessibleFactory
80 	//================================================================
81     class IAccessibleFactory : public ::rtl::IReference
82     {
83     public:
84         virtual IAccessibleTabListBox*
85             createAccessibleTabListBox(
86 		        const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& rxParent,
87 		        SvHeaderTabListBox& rBox
88             ) const = 0;
89 
90         virtual IAccessibleBrowseBox*
91             createAccessibleBrowseBox(
92                 const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& _rxParent,
93                 IAccessibleTableProvider& _rBrowseBox
94 		    ) const = 0;
95 		virtual table::IAccessibleTableControl*
96             createAccessibleTableControl(
97                 const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& _rxParent,
98 				table::IAccessibleTable& _rTable
99 		    ) const = 0;
100 
101         virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >
102 		    createAccessibleIconChoiceCtrl(
103                 SvtIconChoiceCtrl& _rIconCtrl,
104                 const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& _xParent
105 		    ) const = 0;
106 
107         virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >
108 		    createAccessibleTabBar(
109                 TabBar& _rTabBar
110 		    ) const = 0;
111 
112         virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext >
113 		    createAccessibleTextWindowContext(
114                 VCLXWindow* pVclXWindow, TextEngine& rEngine, TextView& rView, bool bCompoundControlChild
115 		    ) const = 0;
116 
117         virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >
118             createAccessibleTreeListBox(
119                 SvTreeListBox& _rListBox,
120 				const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& _xParent
121 		    ) const = 0;
122 
123         virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >
124             createAccessibleBrowseBoxHeaderBar(
125                 const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& rxParent,
126                 IAccessibleTableProvider& _rOwningTable,
127                 AccessibleBrowseBoxObjType _eObjType
128             ) const = 0;
129 
130         virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >
131             createAccessibleBrowseBoxTableCell(
132                 const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& _rxParent,
133 				IAccessibleTableProvider& _rBrowseBox,
134 				const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow >& _xFocusWindow,
135 				sal_Int32 _nRowId,
136 				sal_uInt16 _nColId,
137                 sal_Int32 _nOffset
138             ) const = 0;
139 
140         virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >
141             createAccessibleBrowseBoxHeaderCell(
142                 sal_Int32 _nColumnRowId,
143 				const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& rxParent,
144 				IAccessibleTableProvider& _rBrowseBox,
145 				const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow >& _xFocusWindow,
146 				AccessibleBrowseBoxObjType  _eObjType
147             ) const = 0;
148 
149         virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >
150             createAccessibleCheckBoxCell(
151                 const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& _rxParent,
152 				IAccessibleTableProvider& _rBrowseBox,
153 				const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow >& _xFocusWindow,
154 				sal_Int32 _nRowPos,
155 				sal_uInt16 _nColPos,
156 				const TriState& _eState,
157 				sal_Bool _bEnabled,
158 				sal_Bool _bIsTriState
159             ) const = 0;
160 
161         virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >
162             createEditBrowseBoxTableCellAccess(
163 			    const ::com::sun::star::uno::Reference< com::sun::star::accessibility::XAccessible >& _rxParent,
164 			    const ::com::sun::star::uno::Reference< com::sun::star::accessibility::XAccessible >& _rxControlAccessible,
165 			    const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow >& _rxFocusWindow,
166                 IAccessibleTableProvider& _rBrowseBox,
167 			    sal_Int32 _nRowPos,
168 			    sal_uInt16 _nColPos
169 		    ) const = 0;
170 
171         virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext >
172             createAccessibleToolPanelDeck(
173                 const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& i_rAccessibleParent,
174                 ::svt::ToolPanelDeck& i_rPanelDeck
175             ) = 0;
176         virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext >
177             createAccessibleToolPanelTabBar(
178                 const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& i_rAccessibleParent,
179                 ::svt::IToolPanelDeck& i_rPanelDeck,
180                 ::svt::PanelTabBar& i_rTabBar
181             ) = 0;
182     };
183 
184 //........................................................................
185 }   // namespace svt
186 //........................................................................
187 
188 #endif // SVTOOLS_ACCESSIBLE_FACTORY_HXX
189