1wxAuiManager(3) Erlang Module Definition wxAuiManager(3)
2
3
4
6 wxAuiManager - Functions for wxAuiManager class
7
9 wxAuiManager is the central class of the wxAUI class framework.
10
11 wxAuiManager manages the panes associated with it for a particular
12 wxFrame, using a pane's wxAuiPaneInfo information to determine each
13 pane's docking and floating behaviour.
14
15 wxAuiManager uses wxWidgets' sizer mechanism to plan the layout of each
16 frame. It uses a replaceable dock art class to do all drawing, so all
17 drawing is localized in one area, and may be customized depending on an
18 application's specific needs.
19
20 wxAuiManager works as follows: the programmer adds panes to the class,
21 or makes changes to existing pane properties (dock position, floating
22 state, show state, etc.). To apply these changes, wxAuiManager's up‐
23 date/1 function is called. This batch processing can be used to avoid
24 flicker, by modifying more than one pane at a time, and then "commit‐
25 ting" all of the changes at once by calling update/1.
26
27 Panes can be added quite easily:
28
29 Later on, the positions can be modified easily. The following will
30 float an existing pane in a tool window:
31
32 Layers, Rows and Directions, Positions
33
34 Inside wxAUI, the docking layout is figured out by checking several
35 pane parameters. Four of these are important for determining where a
36 pane will end up:
37
38 Styles
39
40 This class supports the following styles:
41
42 See: Overview aui, wxAuiNotebook, wxAuiDockArt, wxAuiPaneInfo
43
44 This class is derived (and can use functions) from: wxEvtHandler
45
46 wxWidgets docs: wxAuiManager
47
49 Event types emitted from this class: aui_pane_button, aui_pane_close,
50 aui_pane_maximize, aui_pane_restore, aui_pane_activated, aui_render
51
53 wxAuiManager() = wx:wx_object()
54
56 new() -> wxAuiManager()
57
58 new(Options :: [Option]) -> wxAuiManager()
59
60 Types:
61
62 Option =
63 {managed_wnd, wxWindow:wxWindow()} | {flags, integer()}
64
65 Constructor.
66
67 destroy(This :: wxAuiManager()) -> ok
68
69 Dtor.
70
71 addPane(This, Window) -> boolean()
72
73 Types:
74
75 This = wxAuiManager()
76 Window = wxWindow:wxWindow()
77
78 addPane(This, Window, Options :: [Option]) -> boolean()
79
80 addPane(This, Window, Pane_info) -> boolean()
81
82 Types:
83
84 This = wxAuiManager()
85 Window = wxWindow:wxWindow()
86 Pane_info = wxAuiPaneInfo:wxAuiPaneInfo()
87
88 addPane/4 tells the frame manager to start managing a child win‐
89 dow.
90
91 There are several versions of this function. The first version
92 allows the full spectrum of pane parameter possibilities. The
93 second version is used for simpler user interfaces which do not
94 require as much configuration. The last version allows a drop
95 position to be specified, which will determine where the pane
96 will be added.
97
98 addPane(This, Window, Pane_info, Drop_pos) -> boolean()
99
100 Types:
101
102 This = wxAuiManager()
103 Window = wxWindow:wxWindow()
104 Pane_info = wxAuiPaneInfo:wxAuiPaneInfo()
105 Drop_pos = {X :: integer(), Y :: integer()}
106
107 detachPane(This, Window) -> boolean()
108
109 Types:
110
111 This = wxAuiManager()
112 Window = wxWindow:wxWindow()
113
114 Tells the wxAuiManager to stop managing the pane specified by
115 window.
116
117 The window, if in a floated frame, is reparented to the frame
118 managed by wxAuiManager.
119
120 getAllPanes(This) -> [wxAuiPaneInfo:wxAuiPaneInfo()]
121
122 Types:
123
124 This = wxAuiManager()
125
126 Returns an array of all panes managed by the frame manager.
127
128 getArtProvider(This) -> wxAuiDockArt:wxAuiDockArt()
129
130 Types:
131
132 This = wxAuiManager()
133
134 Returns the current art provider being used.
135
136 See: wxAuiDockArt
137
138 getDockSizeConstraint(This) ->
139 {Widthpct :: number(),
140 Heightpct :: number()}
141
142 Types:
143
144 This = wxAuiManager()
145
146 Returns the current dock constraint values.
147
148 See setDockSizeConstraint/3 for more information.
149
150 getFlags(This) -> integer()
151
152 Types:
153
154 This = wxAuiManager()
155
156 Returns the current ?wxAuiManagerOption's flags.
157
158 getManagedWindow(This) -> wxWindow:wxWindow()
159
160 Types:
161
162 This = wxAuiManager()
163
164 Returns the frame currently being managed by wxAuiManager.
165
166 getManager(Window) -> wxAuiManager()
167
168 Types:
169
170 Window = wxWindow:wxWindow()
171
172 Calling this method will return the wxAuiManager for a given
173 window.
174
175 The window parameter should specify any child window or sub-
176 child window of the frame or window managed by wxAuiManager.
177
178 The window parameter need not be managed by the manager itself,
179 nor does it even need to be a child or sub-child of a managed
180 window. It must however be inside the window hierarchy under‐
181 neath the managed window.
182
183 getPane(This, Name) -> wxAuiPaneInfo:wxAuiPaneInfo()
184
185 getPane(This, Window) -> wxAuiPaneInfo:wxAuiPaneInfo()
186
187 Types:
188
189 This = wxAuiManager()
190 Window = wxWindow:wxWindow()
191
192 getPane/2 is used to lookup a wxAuiPaneInfo object either by
193 window pointer or by pane name, which acts as a unique id for a
194 window pane.
195
196 The returned wxAuiPaneInfo object may then be modified to change
197 a pane's look, state or position. After one or more modifica‐
198 tions to wxAuiPaneInfo, update/1 should be called to commit the
199 changes to the user interface. If the lookup failed (meaning the
200 pane could not be found in the manager), a call to the returned
201 wxAuiPaneInfo's IsOk() method will return false.
202
203 hideHint(This) -> ok
204
205 Types:
206
207 This = wxAuiManager()
208
209 hideHint/1 hides any docking hint that may be visible.
210
211 insertPane(This, Window, Insert_location) -> boolean()
212
213 Types:
214
215 This = wxAuiManager()
216 Window = wxWindow:wxWindow()
217 Insert_location = wxAuiPaneInfo:wxAuiPaneInfo()
218
219 insertPane(This, Window, Insert_location, Options :: [Option]) ->
220 boolean()
221
222 Types:
223
224 This = wxAuiManager()
225 Window = wxWindow:wxWindow()
226 Insert_location = wxAuiPaneInfo:wxAuiPaneInfo()
227 Option = {insert_level, integer()}
228
229 This method is used to insert either a previously unmanaged pane
230 window into the frame manager, or to insert a currently managed
231 pane somewhere else.
232
233 insertPane/4 will push all panes, rows, or docks aside and in‐
234 sert the window into the position specified by insert_location.
235
236 Because insert_location can specify either a pane, dock row, or
237 dock layer, the insert_level parameter is used to disambiguate
238 this. The parameter insert_level can take a value of wxAUI_IN‐
239 SERT_PANE, wxAUI_INSERT_ROW or wxAUI_INSERT_DOCK.
240
241 loadPaneInfo(This, Pane_part, Pane) -> ok
242
243 Types:
244
245 This = wxAuiManager()
246 Pane_part = unicode:chardata()
247 Pane = wxAuiPaneInfo:wxAuiPaneInfo()
248
249 loadPaneInfo/3 is similar to LoadPerspective, with the exception
250 that it only loads information about a single pane.
251
252 This method writes the serialized data into the passed pane.
253 Pointers to UI elements are not modified.
254
255 Note: This operation also changes the name in the pane informa‐
256 tion!
257
258 See: loadPerspective/3
259
260 See: savePaneInfo/2
261
262 See: savePerspective/1
263
264 loadPerspective(This, Perspective) -> boolean()
265
266 Types:
267
268 This = wxAuiManager()
269 Perspective = unicode:chardata()
270
271 loadPerspective(This, Perspective, Options :: [Option]) ->
272 boolean()
273
274 Types:
275
276 This = wxAuiManager()
277 Perspective = unicode:chardata()
278 Option = {update, boolean()}
279
280 Loads a saved perspective.
281
282 A perspective is the layout state of an AUI managed window.
283
284 All currently existing panes that have an object in "perspec‐
285 tive" with the same name ("equivalent") will receive the layout
286 parameters of the object in "perspective". Existing panes that
287 do not have an equivalent in "perspective" remain unchanged, ob‐
288 jects in "perspective" having no equivalent in the manager are
289 ignored.
290
291 See: loadPaneInfo/3
292
293 See: loadPerspective/3
294
295 See: savePerspective/1
296
297 savePaneInfo(This, Pane) -> unicode:charlist()
298
299 Types:
300
301 This = wxAuiManager()
302 Pane = wxAuiPaneInfo:wxAuiPaneInfo()
303
304 savePaneInfo/2 is similar to SavePerspective, with the exception
305 that it only saves information about a single pane.
306
307 Return: The serialized layout parameters of the pane are re‐
308 turned within the string. Information about the pointers to UI
309 elements stored in the pane are not serialized.
310
311 See: loadPaneInfo/3
312
313 See: loadPerspective/3
314
315 See: savePerspective/1
316
317 savePerspective(This) -> unicode:charlist()
318
319 Types:
320
321 This = wxAuiManager()
322
323 Saves the entire user interface layout into an encoded wxString
324 (not implemented in wx), which can then be stored by the appli‐
325 cation (probably using wxConfig).
326
327 See: loadPerspective/3
328
329 See: loadPaneInfo/3
330
331 See: savePaneInfo/2
332
333 setArtProvider(This, Art_provider) -> ok
334
335 Types:
336
337 This = wxAuiManager()
338 Art_provider = wxAuiDockArt:wxAuiDockArt()
339
340 Instructs wxAuiManager to use art provider specified by parame‐
341 ter art_provider for all drawing calls.
342
343 This allows pluggable look-and-feel features. The previous art
344 provider object, if any, will be deleted by wxAuiManager.
345
346 See: wxAuiDockArt
347
348 setDockSizeConstraint(This, Widthpct, Heightpct) -> ok
349
350 Types:
351
352 This = wxAuiManager()
353 Widthpct = Heightpct = number()
354
355 When a user creates a new dock by dragging a window into a
356 docked position, often times the large size of the window will
357 create a dock that is unwieldy large.
358
359 wxAuiManager by default limits the size of any new dock to 1/3
360 of the window size. For horizontal docks, this would be 1/3 of
361 the window height. For vertical docks, 1/3 of the width.
362
363 Calling this function will adjust this constraint value. The
364 numbers must be between 0.0 and 1.0. For instance, calling Set‐
365 DockSizeContraint with 0.5, 0.5 will cause new docks to be lim‐
366 ited to half of the size of the entire managed window.
367
368 setFlags(This, Flags) -> ok
369
370 Types:
371
372 This = wxAuiManager()
373 Flags = integer()
374
375 This method is used to specify ?wxAuiManagerOption's flags.
376
377 flags specifies options which allow the frame management behav‐
378 iour to be modified.
379
380 setManagedWindow(This, Managed_wnd) -> ok
381
382 Types:
383
384 This = wxAuiManager()
385 Managed_wnd = wxWindow:wxWindow()
386
387 Called to specify the frame or window which is to be managed by
388 wxAuiManager.
389
390 Frame management is not restricted to just frames. Child windows
391 or custom controls are also allowed.
392
393 showHint(This, Rect) -> ok
394
395 Types:
396
397 This = wxAuiManager()
398 Rect =
399 {X :: integer(),
400 Y :: integer(),
401 W :: integer(),
402 H :: integer()}
403
404 This function is used by controls to explicitly show a hint win‐
405 dow at the specified rectangle.
406
407 It is rarely called, and is mostly used by controls implementing
408 custom pane drag/drop behaviour. The specified rectangle should
409 be in screen coordinates.
410
411 unInit(This) -> ok
412
413 Types:
414
415 This = wxAuiManager()
416
417 Dissociate the managed window from the manager.
418
419 This function may be called before the managed frame or window
420 is destroyed, but, since wxWidgets 3.1.4, it's unnecessary to
421 call it explicitly, as it will be called automatically when this
422 window is destroyed, as well as when the manager itself is.
423
424 update(This) -> ok
425
426 Types:
427
428 This = wxAuiManager()
429
430 This method is called after any number of changes are made to
431 any of the managed panes.
432
433 update/1 must be invoked after addPane/4 or insertPane/4 are
434 called in order to "realize" or "commit" the changes. In addi‐
435 tion, any number of changes may be made to wxAuiPaneInfo struc‐
436 tures (retrieved with getPane/2), but to realize the changes,
437 update/1 must be called. This construction allows pane flicker
438 to be avoided by updating the whole layout at one time.
439
440
441
442wxWidgets team. wx 2.2.2 wxAuiManager(3)