xref: /trunk/main/toolkit/inc/toolkit/helper/accessiblefactory.hxx (revision cdf0e10c4e3984b49a9502b011690b615761d4a3)
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 TOOLKIT_HELPER_ACCESSIBLE_FACTORY_HXX
29 #define TOOLKIT_HELPER_ACCESSIBLE_FACTORY_HXX
30 
31 #ifndef _COM_SUN_STAR_UNO_REFERENCE_HXX
32 #include <com/sun/star/uno/Reference.hxx>
33 #endif
34 
35 #ifndef _RTL_REF_HXX
36 #include <rtl/ref.hxx>
37 #endif
38 
39 namespace com { namespace sun { namespace star { namespace accessibility {
40     class XAccessible;
41     class XAccessibleContext;
42 } } } }
43 class VCLXButton;
44 class VCLXCheckBox;
45 class VCLXRadioButton;
46 class VCLXListBox;
47 class VCLXFixedHyperlink;
48 class VCLXFixedText;
49 class VCLXScrollBar;
50 class VCLXEdit;
51 class VCLXComboBox;
52 class VCLXToolBox;
53 class VCLXWindow;
54 class Menu;
55 
56 //........................................................................
57 namespace toolkit
58 {
59 //........................................................................
60 
61     /** a function which is able to create a factory for the standard Accessible/Context
62         components needed for standard toolkit controls
63 
64         The returned pointer denotes an instance of the IAccessibleFactory, which has been acquired
65         <em>once</em>. The caller is responsible for holding this reference as long as it needs the
66         factory, and release it afterwards.
67     */
68     typedef void* (SAL_CALL * GetStandardAccComponentFactory)( );
69 
70     //================================================================
71     //= IAccessibleFactory
72     //================================================================
73     class IAccessibleFactory : public ::rtl::IReference
74     {
75     public:
76         /** creates an accessible context for a button window
77         */
78         virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext >
79             createAccessibleContext( VCLXButton* _pXWindow ) = 0;
80 
81         /** creates an accessible context for a checkbox window
82         */
83         virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext >
84             createAccessibleContext( VCLXCheckBox* _pXWindow ) = 0;
85 
86         /** creates an accessible context for a radio button window
87         */
88         virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext >
89             createAccessibleContext( VCLXRadioButton* _pXWindow ) = 0;
90 
91         /** creates an accessible context for a listbox window
92         */
93         virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext >
94             createAccessibleContext( VCLXListBox* _pXWindow ) = 0;
95 
96         /** creates an accessible context for a fixed hyperlink window
97         */
98         virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext >
99             createAccessibleContext( VCLXFixedHyperlink* _pXWindow ) = 0;
100 
101         /** creates an accessible context for a fixed text window
102         */
103         virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext >
104             createAccessibleContext( VCLXFixedText* _pXWindow ) = 0;
105 
106         /** creates an accessible context for a scrollbar window
107         */
108         virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext >
109             createAccessibleContext( VCLXScrollBar* _pXWindow ) = 0;
110 
111         /** creates an accessible context for a edit window
112         */
113         virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext >
114             createAccessibleContext( VCLXEdit* _pXWindow ) = 0;
115 
116         /** creates an accessible context for a combo box window
117         */
118         virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext >
119             createAccessibleContext( VCLXComboBox* _pXWindow ) = 0;
120 
121         /** creates an accessible context for a toolbox window
122         */
123         virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext >
124             createAccessibleContext( VCLXToolBox* _pXWindow ) = 0;
125 
126         /** creates an accessible context for a generic window
127         */
128         virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext >
129             createAccessibleContext( VCLXWindow* _pXWindow ) = 0;
130 
131         /** creates an accessible component for the given menu
132         */
133         virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >
134             createAccessible( Menu* _pMenu, sal_Bool _bIsMenuBar ) = 0;
135     };
136 
137 //........................................................................
138 }   // namespace toolkit
139 //........................................................................
140 
141 #endif // TOOLKIT_HELPER_ACCESSIBLE_FACTORY_HXX
142