1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
|
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
#ifndef __com_sun_star_frame_XLayoutManager_idl__
#define __com_sun_star_frame_XLayoutManager_idl__
#ifndef __com_sun_star_uno_XInterface_idl__
#include <com/sun/star/uno/XInterface.idl>
#endif
#ifndef __com_sun_star_frame_XFrame_idl__
#include <com/sun/star/frame/XFrame.idl>
#endif
#ifndef __com_sun_star_awt_Point_idl__
#include <com/sun/star/awt/Point.idl>
#endif
#ifndef __com_sun_star_awt_Size_idl__
#include <com/sun/star/awt/Size.idl>
#endif
#ifndef __com_sun_star_awt_XWindow_idl__
#include <com/sun/star/awt/XWindow.idl>
#endif
#ifndef __com_sun_star_ui_XUIElement_idl__
#include <com/sun/star/ui/XUIElement.idl>
#endif
#ifndef __com_sun_star_ui_DockingArea_idl__
#include <com/sun/star/ui/DockingArea.idl>
#endif
#ifndef __com_sun_star_ui_XDockingAreaAcceptor_idl__
#include <com/sun/star/ui/XDockingAreaAcceptor.idl>
#endif
//=============================================================================
module com { module sun { module star { module frame {
//=============================================================================
/** central interface to query for, create, destroy and manipulate user
interface elements which are bound to a layout manager.
<p>
Every user interface element which is controlled by a layout manager has
a unique identifier called resource URL.
A resourcce URL must meet the following syntax:
"private:resource/$type/$name". It is only allowed to use ascii characters
for type and name.
Currently the following user interface element types are defined:
<ul>
<li><b>menubar</b>A configurable user interface element representing
a menu bar.</li>
<li><b>popupmenu</b>A configurable user interface element representing
a popup menu.</li>
<li><b>toolbar</b>A configurable user interface element a tool
bar.</li>
<li><b>statusbar</b>A configurable user interfave element representing
a status bar.</li>
<li><b>floater</b>A basic user interface element representing a
floating window.</li>
</ul>
@see com::sun::star::ui::UIElementTypes
@see com::sun::star::frame::XFrame
</p>
@since OOo 2.0
*/
interface XLayoutManager : com::sun::star::uno::XInterface
{
/** attaches a <type scope="com::sun::star::frame">XFrame</type> to a layout manager.
@param Frame
specifies the frame that should be attached to the layout manager
<p>
A layout manager needs a <type scope="com::sun::star::frame">XFrame</type> to be
able to work. Without a it no user interface elements can be created.
</p>
*/
void attachFrame( [in] com::sun::star::frame::XFrame Frame );
/** resets the layout manager and remove all of its internal user interface
elements.
<p>
This call should be handled with care as all user interface elements will
be destroyed and the layout manager is reseted to a state after a
<member>attachFrame</member> has been made. That means an attached frame
which has been set by <member>attachFrame</member> is not released.
The layout manager itself calls reset after a component has been attached
or reattached to a frame.
</p>
*/
void reset();
/** provides the current docking area size of the layout manager.
@return
The <type scope="com::sun::star::awt">Rectangle</type> contains pixel values. The
members of <type scope="com::sun::star::awt">Rectangle</type> are filled as following:
<ul>
<li>X = docking area on left side (in pixel)</li>
<li>Y = docking area on top side (in pixel)</li>
<li>Width = docking area on right side (in pixel)</li>
<li>Height = docking area on bottom side (in pixel)</li>
</ul>
*/
com::sun::star::awt::Rectangle getCurrentDockingArea();
/** retrieves the current docking area acceptor that controls the border space of the frame's
container window.
@return
current docking area acceptor which controls the border space of frame's container window.
<p>
A docking area acceptor retrieved by this method is owned by the layout manager. It is not
allowed to dispose this object, it will be destroyed on reference count!
</p>
*/
com::sun::star::ui::XDockingAreaAcceptor getDockingAreaAcceptor();
/** sets a docking area acceptor that controls the border space of the frame's container window.
@param xDockingAreaAcceptor
a docking area acceptor which controls the border space of frame's container window.
<p>
A docking area acceptor decides if the layout manager can use requested border space for
docking windows. If the acceptor denies the requested space the layout manager automatically
set all docked windows into floating state and will not use this space for docking.<br/>
After setting a docking area acceptor the object is owned by the layout manager. It is not
allowed to dispose this object, it will be destroyed on reference count!
</p>
*/
void setDockingAreaAcceptor( [in] com::sun::star::ui::XDockingAreaAcceptor xDockingAreaAcceptor );
/** creates a new user interface element.
@param ResourceURL
specifies which user interface element should be created. A resourcce URL must meet the following
syntax: "private:resource/$type/$name". It is only allowed to use ascii characters for type and
name.
*/
void createElement( [in] string ResourceURL );
/** destroys a user interface element.
@param ResourceURL
specifies which user interface element should be destroyed. A resourcce URL must meet
the following syntax: "private:resource/$type/$name". It is only allowed to use ascii
characters for type and name.
*/
void destroyElement( [in] string ResourceURL );
/** request to make a user interface element visible if it is not in hidden state.
@param ResourceURL
specifies which user interface element should be made visible. A resourcce URL must
meet the following syntax: "private:resource/$type/$name". It is only allowed to use
ascii characters for type and
name.
@return
returns <TRUE/> if the user interface element could be made visible, otherwise
<FALSE/> will be returned.
<p>
If a user interface element should forced to the visible state
<member>XLayoutManager::showElement</member> should be used. This function can be
used for context dependent elements which should respect a the current visibility
state.
</p>
*/
boolean requestElement( [in] string ResourceURL );
/** retrieves a user interface element which has been created before.
@param ResourceURL
specifies which user interface element should be retrieved. A resourcce URL must meet the following
syntax: "private:resource/$type/$name". It is only allowed to use ascii characters for type and
name.
<p>
The layout manager instance is owner of the returned user interface element. That means that the life time of
the user interface element is controlled by the layout manager. It can be disposed at every time!
</p>
*/
com::sun::star::ui::XUIElement getElement( [in] string ResourceURL );
/** retrieves all user interface elements which are currently instanciated.
@return
a sequence of user interface elements providing <type scope="com::sun::star::ui">XUIElement</type>
interface.
<p>
The layout manager instance is owner of the returned user interface elements. That means that the life time of
the user interface elements is controlled by the layout manager. They can be disposed at every time!
</p>
*/
sequence< com::sun::star::ui::XUIElement > getElements();
/** shows a user interface element.
@param ResourceURL
specifies which user interface element should be shown. A resourcce URL must meet the following
syntax: "private:resource/$type/$name". It is only allowed to use ascii characters for type and
name.
@return
returns <TRUE/> if the user interface element has been shown, otherwise <FALSE/> will be returned.
*/
boolean showElement( [in] string ResourceURL );
/** hides a user interface element.
@param ResourceURL
specifies which user interface element should be hidden. A resourcce URL must meet the following
syntax: "private:resource/$type/$name". It is only allowed to use ascii characters for type and
name.
@return
returns <TRUE/> if the user interface element has been hidden, otherwise <FALSE/> will be returned.
*/
boolean hideElement( [in] string ResourceURL );
/** docks a window based user interface element to a specified docking area.
@param ResourceURL
specifies which user interface element should be docked. A resourcce URL must meet the following
syntax: "private:resource/$type/$name". It is only allowed to use ascii characters for type and
name.
@param DockingArea
specifies on which docking area the window based user interface element should docked.
@param Pos
specifies the position inside the docking area.
@return
returns <TRUE/> if the user interface element has been docked, otherwise <FALSE/> will be returned.
@see com::sun::star::ui::DockingArea
*/
boolean dockWindow( [in] string ResourceURL, [in] com::sun::star::ui::DockingArea DockingArea, [in] com::sun::star::awt::Point Pos );
/** docks all windows which are member of the provided user interface element type.
@param nElementType
specifies which user interface element type should be docked.
@return
returns <TRUE/> if all user interface elements of the requested type could be
docked, otherwise <FALSE/> will be returned.
@see com::sun::star::ui::UIElementType
*/
boolean dockAllWindows( [in] short nElementType );
/** forces a window based user interface element to float.
@param ResourceURL
specifies which user interface element should be float. A resourcce URL must meet the following
syntax: "private:resource/$type/$name". It is only allowed to use ascii characters for type and
name.
@return
returns <TRUE/> if the user interface element has been docked, otherwise <FALSE/> will be returned.
*/
boolean floatWindow( [in] string ResourceURL );
/** locks a window based user interface element if it's in a docked state.
@param ResourceURL
specifies which user interface element should be locked. A resourcce URL must meet the following
syntax: "private:resource/$type/$name". It is only allowed to use ascii characters for type and
name.
@return
returns <TRUE/> if the user interface element has been locked, otherwise <FALSE/> will be returned.
*/
boolean lockWindow( [in] string ResourceURL );
/** unlocks a window based user interface element if it's in a docked state.
@param ResourceURL
specifies which user interface element should be unlocked. A resourcce URL must
meet the following syntax: "private:resource/$type/$name". It is only allowed
to use ascii characters for type and name.
@return
returns <TRUE/> if the user interface element has been unlocked, otherwise
<FALSE/> will be returned.
*/
boolean unlockWindow( [in] string ResourceURL );
/** sets a new size for a window based user interface element.
@param ResourceURL
specifies which user interface element should be resized. A resourcce URL must meet the following
syntax: "private:resource/$type/$name". It is only allowed to use ascii characters for type and
name.
@param Size
specifies the new size in pixel.
<p>
It is up to the layout manager to decide if the user interface element can be resized. The new size can be retrieved
by calling <member>getElementSize</member>.
</p>
*/
void setElementSize( [in] string ResourceURL, [in] com::sun::star::awt::Size Size );
/** sets a new position for a window based user interface element.
@param ResourceURL
specifies which user interface element should be moved. A resourcce URL must meet the following
syntax: "private:resource/$type/$name". It is only allowed to use ascii characters for type and
name.
@param Pos
specifies the new position in pixel.
<p>
It is up to the layout manager to decide if the user interface element can be moved. The new position can be retrieved
by calling <member>getElementPos</member>.
</p>
*/
void setElementPos( [in] string ResourceURL, [in] com::sun::star::awt::Point Pos );
/** sets a new position and size for a window based user interface element.
@param ResourceURL
specifies which user interface element should be moved and resized. A resourcce URL must meet the following
syntax: "private:resource/$type/$name". It is only allowed to use ascii characters for type and
name.
@param Pos
specifies the new position in pixel.
@param Size
specifies the new position in pixel.
<p>
It is up to the layout manager to decide if the user interface element can be moved and resized. The new position and size can
be retrieved by calling <member>getElementPos</member> and <member>getElementSize</member>.
</p>
*/
void setElementPosSize( [in] string ResourceURL, [in] com::sun::star::awt::Point Pos, [in] com::sun::star::awt::Size Size );
/** retrieves the current visibility state of a window based user interface element.
@param ResourceURL
specifies for which user interface element the visibility state should be retrieved. A resource URL must meet
the following syntax: "private:resource/$type/$name". It is only allowed to use ascii characters for type and
name.
@return
<TRUE/> if the user interface element is visible, otherwise <FALSE/>.
*/
boolean isElementVisible( [in] string ResourceURL );
/** retrieves the current floating state of a window based user interface element.
@param ResourceURL
specifies for which user interface element the floating state should be retrieved. A resource URL must meet
the following syntax: "private:resource/$type/$name". It is only allowed to use ascii characters for type and
name.
@return
<TRUE/> if the user interface element is floating, otherwise <FALSE/>.
*/
boolean isElementFloating( [in] string ResourceURL );
/** retrieves the current docking state of a window based user interface element.
@param ResourceURL
specifies for which user interface element the docking state should be retrieved. A resource URL must meet
the following syntax: "private:resource/$type/$name". It is only allowed to use ascii characters for type and
name.
@return
<TRUE/> if the user interface element is docked, otherwise <FALSE/>.
*/
boolean isElementDocked( [in] string ResourceURL );
/** retrieves the current lock state of a window based user interface element.
@param ResourceURL
specifies for which user interface element the lock state should be retrieved. A resource URL must meet
the following syntax: "private:resource/$type/$name". It is only allowed to use ascii characters for type and
name.
@return
<TRUE/> if the user interface element is locked, otherwise <FALSE/>.
*/
boolean isElementLocked( [in] string ResourceURL );
/** retrieves the current size of a window based user interface element.
@param ResourceURL
specifies for which user interface element the current size should be retrieved. A resource URL must meet
the following syntax: "private:resource/$type/$name". It is only allowed to use ascii characters for type and
name.
@return
the size in pixel of the user interface element. A non-window based user interface element provides a zero size.
*/
com::sun::star::awt::Size getElementSize( [in] string ResourceURL );
/** retrieves the current pixel position of a window based user interface element.
@param ResourceURL
specifies for which user interface element the current position should be retrieved. A resource URL must meet
the following syntax: "private:resource/$type/$name". It is only allowed to use ascii characters for type and
name.
@return
the size in pixel of the user interface element. A non-window based user interface element provides a zero size.
*/
com::sun::star::awt::Point getElementPos( [in] string ResourceURL );
/** prohibit all layout updates until unlock is called again.
<p>
This call can be used to speed up the creation process of serveral user interface elements. Otherwise the layout manager
would calculate the layout for every creation.
</p>
*/
void lock();
/** permit layout updates again.
<p>
This function should be called to permit layout updates. The layout manager starts to calculate the new layout after
this call.
</p>
*/
void unlock();
/** forces a complete new layouting of all user interface elements.
*/
void doLayout();
/** sets the layout manager to invisible state and hides all user interface elements.
<p>
A layout manager can be set to invisible state to force it to hide all of its
user interface elements. If another component wants to use the window for its
own user interface elements it can use this function. This function is normally
used to implement inplace editing.
</p>
@param Visible
provide <FALSE/> to make layout manager invisible otherwise this must be
set to <TRUE/>.
*/
void setVisible( [in] boolean Visible );
/** retrieves the visibility state of a layout manager.
<p>
A layout manager can be set to invisible state to force it to hide all of its
user interface elements. If another component wants to use the window for its
own user interface elements it can use this function. This function is normally
used to implement inplace editing.
</p>
*/
boolean isVisible();
};
}; }; }; };
#endif
|