tdf#130857 qt weld: Implement QtInstanceWidget::get_text_height
[LibreOffice.git] / include / toolkit / helper / accessiblefactory.hxx
blobb331be35277573ff1ef081ac977194d8792a39b9
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef INCLUDED_TOOLKIT_HELPER_ACCESSIBLEFACTORY_HXX
21 #define INCLUDED_TOOLKIT_HELPER_ACCESSIBLEFACTORY_HXX
23 #include <com/sun/star/uno/Reference.hxx>
24 #include <salhelper/simplereferenceobject.hxx>
26 namespace com::sun::star::accessibility {
27 class XAccessible;
28 class XAccessibleContext;
31 namespace vcl {
32 class Window;
35 class ComboBox;
36 class Edit;
37 class FixedHyperlink;
38 class FixedText;
39 class FormattedField;
40 class HeaderBar;
41 class ListBox;
42 class RadioButton;
43 class ScrollBar;
45 #include <vcl/toolbox.hxx>
46 #include <vcl/toolkit/button.hxx>
49 namespace toolkit
53 /** a function which is able to create a factory for the standard Accessible/Context
54 components needed for standard VCL controls
56 The returned pointer denotes an instance of the IAccessibleFactory, which has been acquired
57 <em>once</em>. The caller is responsible for holding this reference as long as it needs the
58 factory, and release it afterwards.
60 typedef void* (* GetStandardAccComponentFactory)( );
63 //= IAccessibleFactory
65 class IAccessibleFactory : public virtual salhelper::SimpleReferenceObject
67 public:
68 /** creates an accessible context for a button window
70 virtual css::uno::Reference< css::accessibility::XAccessibleContext >
71 createAccessibleContext(PushButton* pButton) = 0;
73 /** creates an accessible context for a checkbox window
75 virtual css::uno::Reference< css::accessibility::XAccessibleContext >
76 createAccessibleContext(CheckBox* pCheckBox) = 0;
78 /** creates an accessible context for a radio button window
80 virtual css::uno::Reference< css::accessibility::XAccessibleContext >
81 createAccessibleContext(RadioButton* pRadioButton) = 0;
83 /** creates an accessible context for a listbox window
85 virtual css::uno::Reference< css::accessibility::XAccessibleContext >
86 createAccessibleContext(ListBox* pListBox) = 0;
88 /** creates an accessible context for a fixed hyperlink window
90 virtual css::uno::Reference< css::accessibility::XAccessibleContext >
91 createAccessibleContext(FixedHyperlink* pFixedHyperlink) = 0;
93 /** creates an accessible context for a fixed text window
95 virtual css::uno::Reference< css::accessibility::XAccessibleContext >
96 createAccessibleContext(FixedText* pFixedText) = 0;
98 /** creates an accessible context for a scrollbar window
100 virtual css::uno::Reference< css::accessibility::XAccessibleContext >
101 createAccessibleContext(ScrollBar* pScrollBar) = 0;
103 /** creates an accessible context for an edit window
105 virtual css::uno::Reference< css::accessibility::XAccessibleContext >
106 createAccessibleContext(Edit* pEdit) = 0;
108 /** creates an accessible context for a combo box window
110 virtual css::uno::Reference< css::accessibility::XAccessibleContext >
111 createAccessibleContext(ComboBox* pComboBox) = 0;
113 /** creates an accessible context for a toolbox window
115 virtual css::uno::Reference< css::accessibility::XAccessibleContext >
116 createAccessibleContext(ToolBox* pToolBox) = 0;
118 /** creates an accessible context for a headerbar window
120 virtual css::uno::Reference< css::accessibility::XAccessibleContext >
121 createAccessibleContext(HeaderBar* pHeaderBar) = 0;
123 /** creates an accessible context for a numeric field
125 virtual css::uno::Reference< css::accessibility::XAccessibleContext >
126 createAccessibleContext(FormattedField* pFormattedField) = 0;
128 /** creates an accessible context for a generic window
130 virtual css::uno::Reference< css::accessibility::XAccessibleContext >
131 createAccessibleContext(vcl::Window* pWindow) = 0;
133 protected:
134 virtual ~IAccessibleFactory() override {}
138 } // namespace toolkit
141 #endif // INCLUDED_TOOLKIT_HELPER_ACCESSIBLEFACTORY_HXX
143 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */