tdf#130857 qt weld: Support mail merge "Server Auth" dialog
[LibreOffice.git] / include / svx / AccessibleShapeTreeInfo.hxx
blobf50061ad47f4b13347fd0acd6c4ad7a18a3e5db1
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_SVX_ACCESSIBLESHAPETREEINFO_HXX
21 #define INCLUDED_SVX_ACCESSIBLESHAPETREEINFO_HXX
23 #include <com/sun/star/uno/Reference.hxx>
24 #include <svx/svxdllapi.h>
25 #include <vcl/vclptr.hxx>
27 namespace com::sun::star {
28 namespace accessibility { class XAccessibleComponent; }
29 namespace document { class XShapeEventBroadcaster; }
30 namespace frame { class XController; }
32 namespace vcl { class Window; }
34 class SdrView;
36 namespace accessibility {
38 class IAccessibleViewForwarder;
40 /** This class bundles all information that is passed down the tree of
41 accessible shapes so that each shape has access to that info.
43 There are basically four members that can be set and queried:
44 <ul>
45 <li>The model broadcaster is used for getting notified about shape
46 changes. Using this broadcaster makes in unnecessary to register at
47 each shape separately.</li>
48 <li>The view forwarder is responsible for transformation between
49 coordinate systems and for providing the visible area both with respect
50 to a specific window.</li>
51 <li>The SdrView is used for creating accessible edit engines.</li>
52 <li>The Window is used for creating accessible edit engines.</li>
53 </ul>
55 class SVX_DLLPUBLIC AccessibleShapeTreeInfo
57 public:
58 /** Use this constructor to create an empty object that is filled later
59 with more meaningful data.
61 AccessibleShapeTreeInfo();
63 /** Create a copy of the given shape info.
64 @param rInfo
65 The shape tree info object to copy.
67 AccessibleShapeTreeInfo (const AccessibleShapeTreeInfo& rInfo);
69 ~AccessibleShapeTreeInfo();
71 AccessibleShapeTreeInfo& operator= (const AccessibleShapeTreeInfo& rInfo);
73 void dispose();
75 /** Deprecated. Don't use this method.
77 void SetDocumentWindow (const css::uno::Reference<
78 css::accessibility::XAccessibleComponent>& rxViewWindow);
80 /** Deprecated. Don't use this method.
82 const css::uno::Reference<
83 css::accessibility::XAccessibleComponent>&
84 GetDocumentWindow() const { return mxDocumentWindow;}
86 /** Set a new broadcaster that sends events indicating shape changes.
87 The broadcaster usually is or belongs to a document model.
88 @param rxModelBroadcaster
89 The new broadcaster. It replaces the current one. An empty
90 reference may be passed to unset the broadcaster
92 void SetModelBroadcaster (const css::uno::Reference<
93 css::document::XShapeEventBroadcaster>& rxModelBroadcaster);
95 /** Return the current model broadcaster.
96 @return
97 The returned reference may be empty if the broadcaster has not
98 been set or has been set to an empty reference.
100 const css::uno::Reference<
101 css::document::XShapeEventBroadcaster>&
102 GetModelBroadcaster() const { return mxModelBroadcaster;}
104 /** Set the view that will be used to construct SvxTextEditSources which
105 in turn are used to create accessible edit engines.
106 @param pView
107 The new SdrView that replaces the current one. A NULL pointer
108 may be passed to unset the view.
110 void SetSdrView (SdrView* pView);
112 /** Return the current SdrView.
113 @return
114 The returned value may be NULL.
116 SdrView* GetSdrView() const { return mpView;}
118 /** Set a new controller. This will usually but not necessarily
119 correspond to the SdrView.
120 @param rxController
121 The new controller that replaces the current one. An empty
122 reference may be passed to unset the controller.
124 void SetController (const css::uno::Reference<
125 css::frame::XController>& rxController);
127 /** Return the currently set controller.
128 @return
129 The reference to the currently set controller may be empty.
131 const css::uno::Reference<
132 css::frame::XController>&
133 GetController() const { return mxController;}
135 /** Set the window that is used to construct SvxTextEditSources which in
136 turn is used to create accessible edit engines.
138 void SetWindow(vcl::Window* pWindow);
140 /** Return the current Window.
141 @return
142 The returned value may be NULL.
144 vcl::Window* GetWindow() const
146 return mpWindow.get();
149 /** The view forwarder allows the transformation between internal
150 and pixel coordinates and can be asked for the visible area.
151 @param pViewForwarder
152 This view forwarder replaces the current one.
154 void SetViewForwarder (const IAccessibleViewForwarder* pViewForwarder);
156 /** Return the current view forwarder.
157 @return
158 The returned pointer may be NULL.
160 const IAccessibleViewForwarder* GetViewForwarder() const { return mpViewForwarder;}
162 private:
163 /** Deprecated.
165 css::uno::Reference<
166 css::accessibility::XAccessibleComponent> mxDocumentWindow;
168 /** this broadcaster sends events indicating shape changes.
169 The broadcaster usually is or belongs to a document model.
171 This once was named mxControllerBroadcaster.
173 css::uno::Reference<
174 css::document::XShapeEventBroadcaster> mxModelBroadcaster;
176 /** This view is necessary to construct an SvxTextEditSource which in
177 turn is used to create an accessible edit engine.
179 SdrView* mpView;
181 /** The controller is used e.g. for obtaining the selected shapes.
183 css::uno::Reference<
184 css::frame::XController> mxController;
186 /** This window is necessary to construct an SvxTextEditSource which in
187 turn is used to create an accessible edit engine.
189 VclPtr<vcl::Window> mpWindow;
191 /** The view forwarder allows the transformation between internal
192 and pixel coordinates and can be asked for the visible area.
194 const IAccessibleViewForwarder* mpViewForwarder;
197 } // end of namespace accessibility
199 #endif
201 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */