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