Source

wxPython / src / _aui_docstrings.i

Full commit
  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
511
512
513
514
515
516
517
518
/////////////////////////////////////////////////////////////////////////////
// Name:        _aui_docstrings.i
// Purpose:     Docstrings for the wxAUI classes.  These are in a separate
//              file because we have SWIG scan the .h files directly.
//
// Author:      Robin Dunn
//
// Created:     7-July-2006
// RCS-ID:      $Id: _aui_docstrings.i 40087 2006-07-14 01:26:04Z RD $
// Copyright:   (c) 2006 by Total Control Software
// Licence:     wxWindows license
/////////////////////////////////////////////////////////////////////////////


DocStr(wxFrameManager,
"FrameManager manages the panes associated with it for a particular
`wx.Frame`, using a pane's `PaneInfo` information to determine each
pane's docking and floating behavior. FrameManager uses wxWidgets'
sizer mechanism to plan the layout of each frame. It uses a
replaceable `DockArt` class to do all drawing, so all drawing is
localized in one area, and may be customized depending on an
application's specific needs.
",

"
FrameManager works as follows: The programmer adds panes to the
class, or makes changes to existing pane properties (dock position,
floating state, show state, etc.). To apply these changes,
FrameManager's `Update` function is called. This batch processing
can be used to avoid flicker, by modifying more than one pane at a
time, and then \"committing\" all of the changes at once by calling
`Update`.

Panes can be added quite easily::

    text1 = wx.TextCtrl(self, -1)
    text2 = wx.TextCtrl(self, -1)
    self._mgr.AddPane(text1, wx.LEFT, \"Pane Caption\")
    self._mgr.AddPane(text2, wx.BOTTOM, \"Pane Caption\")
    self._mgr.Update()


Later on, the positions can be modified easily. The following will
float an existing pane in a tool window::

    self._mgr.GetPane(text1).Float();


**Layers, Rows and Directions, Positions**

Inside wx.aui the docking layout is figured out by checking several
pane parameters. Four of these are important for determining where a
pane will end up:

    * **Direction**: Each docked pane has a direction, Top, Bottom,
      Left, Right, or Center. This is fairly self-explanatory. The
      pane will be placed in the location specified by this variable.

    * **Position**: More than one pane can be placed inside of a
      \"dock.\"  Imagine two panes being docked on the left side of a
      window. One pane can be placed over another.  In proportionally
      managed docks, the pane position indicates it's sequential
      position, starting with zero. So, in our scenario with two panes
      docked on the left side, the top pane in the dock would have
      position 0, and the second one would occupy position 1.

    * **Row**: A row can allow for two docks to be placed next to each
      other. One of the most common places for this to happen is in
      the toolbar. Multiple toolbar rows are allowed, the first row
      being in row 0, and the second in row 1. Rows can also be used
      on vertically docked panes.

    * **Layer**: A layer is akin to an onion. Layer 0 is the very
      center of the managed pane. Thus, if a pane is in layer 0, it
      will be closest to the center window (also sometimes known as
      the \"content window\"). Increasing layers \"swallow up\" all
      layers of a lower value. This can look very similar to multiple
      rows, but is different because all panes in a lower level yield
      to panes in higher levels. The best way to understand layers is
      by running the AUI sample in the wxPython demo.
");

DocStr(wxFrameManager::wxFrameManager,
"Constructor.

    :param managed_wnd: Specifies the `wx.Window` which should be
        managed.  If not set in the call to this constructor then
        `SetManagedWindow` should be called later.

    :param flags: Specifies options which allow the frame management
        behavior to be modified.
",
"
Valid flags are:

    ==============================  =================================
    AUI_MGR_ALLOW_FLOATING          Panes can be undocked and floated
    AUI_MGR_ALLOW_ACTIVE_PANE       The last pane clicked on will be
                                    considered the active pane and will
                                    be highlighted.
    AUI_MGR_TRANSPARENT_DRAG        If the platform supports it the panes
                                    will be partially transparent while
                                    dragging.
    AUI_MGR_TRANSPARENT_HINT        If the platform supports it the
                                    hint used to show where the pane can
                                    be docked will be partially transparent.
    AUI_MGR_TRANSPARENT_HINT_FADE   Should the transparent hint be faded
                                    into view.
    AUI_MGR_DEFAULT                 The default flags.
    ==============================  =================================
");

DocStr(wxFrameManager::UnInit,
"UnInit uninitializes the framework and should be called before a
managed frame is destroyed. UnInit is usually called in the managed
window's destructor.
", "");

DocStr(wxFrameManager::SetFlags,
"SetFlags is used to specify the FrameManager's behavioral
settings. The flags parameter is described in the docs for `__init__`
", "");

DocStr(wxFrameManager::GetFlags,
"GetFlags returns the current FrameManager's flags.
", "");

DocStr(wxFrameManager::SetManagedWindow,
"SetManagedWindow is called to specify the window which is to be
managed by the FrameManager.  It is normally a `wx.Frame` but it is
possible to also allow docking within any container window.  This only
needs to be called if the window was not given to the manager in the
constructor.
", "");

DocStr(wxFrameManager::GetManagedWindow,
"GetManagedWindow returns the window currently being managed by the
FrameManager.
", "");

DocStr(wxFrameManager::SetArtProvider,
"SetArtProvider instructs FrameManager to use the art provider
specified for all drawing calls. This allows plugable look-and-feel
features. The previous art provider object, if any, will be destroyed
by FrameManager.

:note: If you wish to use a custom `DockArt` class to override drawing
    or metrics then you shoudl derive your class from the `PyDockArt`
    class, which has been instrumented for reflecting virtual calls to
    Python methods.
", "");

DocStr(wxFrameManager::GetArtProvider,
"GetArtProvider returns the current art provider being used.
", "");


DocAStr(wxFrameManager::GetAllPanes,
"GetAllPanes(self) -> list",        
"GetAllPanes returns a list of `PaneInfo` objects for all panes managed
by the frame manager.
", "");


DocStr(wxFrameManager::InsertPane,
"InsertPane is used to insert either a previously unmanaged pane window
into the frame manager, or to insert a currently managed pane
somewhere else. InsertPane will push all panes, rows, or docks aside
and insert the window into the position specified by
``insert_location``.  Because ``insert_location`` can specify either a pane,
dock row, or dock layer, the ``insert_level`` parameter is used to
disambiguate this. The parameter ``insert_level`` can take a value of
``AUI_INSERT_PANE``, ``AUI_INSERT_ROW`` or ``AUI_INSERT_DOCK``.
", "");

DocStr(wxFrameManager::DetachPane,
"DetachPane tells the FrameManager to stop managing the pane specified
by window. The window, if in a floated frame, is reparented to the
frame managed by FrameManager.
", "");

DocStr(wxFrameManager::SavePerspective,
"SavePerspective saves the entire user interface layout into an encoded
string, which can then be stored someplace by the application.  When a
perspective is restored using `LoadPerspective`, the entire user
interface will return to the state it was when the perspective was
saved.
", "");

DocStr(wxFrameManager::LoadPerspective,
"LoadPerspective loads a saved perspective. If ``update`` is ``True``,
`Update` is automatically invoked, thus realizing the saved
perspective on screen.
", "");

DocStr(wxFrameManager::Update,
"Update shoudl be called called after any number of changes are made to
any of the managed panes.  Update must be invoked after `AddPane` or
`InsertPane` are called in order to \"realize\" or \"commit\" the
changes. In addition, any number of changes may be made to `PaneInfo`
structures (retrieved with `GetPane` or `GetAllPanes`), but to realize
the changes, Update must be called. This construction allows pane
flicker to be avoided by updating the whole layout at one time.
", "");


//----------------------------------------------------------------------

DocStr(wxPaneInfo,
"PaneInfo specifies all the parameters for a pane for the
`FrameManager`. These parameters specify where the pane is on the
screen, whether it is docked or floating, or hidden. In addition,
these parameters specify the pane's docked position, floating
position, preferred size, minimum size, caption text among many other
parameters.
", "");

DocStr(wxPaneInfo::IsOk,
"IsOk returns ``True`` if the PaneInfo structure is valid.
", "");

DocStr(wxPaneInfo::IsFixed,
"IsFixed returns ``True`` if the pane cannot be resized.
", "");

DocStr(wxPaneInfo::IsResizable,
"IsResizeable returns ``True`` if the pane can be resized.
", "");

DocStr(wxPaneInfo::IsShown,
"IsShown returns ``True`` if the pane should be drawn on the screen.
", "");

DocStr(wxPaneInfo::IsFloating,
"IsFloating returns ``True`` if the pane is floating.
", "");

DocStr(wxPaneInfo::IsDocked,
"IsDocked returns ``True`` if the pane is docked.
", "");

DocStr(wxPaneInfo::IsToolbar,
"IsToolbar returns ``True`` if the pane contains a toolbar.
", "");

DocStr(wxPaneInfo::IsTopDockable,
"IsTopDockable returns ``True`` if the pane can be docked at the top of
the managed frame.
", "");

DocStr(wxPaneInfo::IsBottomDockable,
"IsBottomDockable returns ``True`` if the pane can be docked at the
bottom of the managed frame.
", "");

DocStr(wxPaneInfo::IsLeftDockable,
"IsLeftDockable returns ``True`` if the pane can be docked on the left
of the managed frame.
", "");

DocStr(wxPaneInfo::IsRightDockable,
"IsRightDockable returns ``True`` if the pane can be docked on the
right of the managed frame.
", "");

DocStr(wxPaneInfo::IsFloatable,
"IsFloatable returns ``True`` if the pane can be undocked and displayed
as a floating window.
", "");

DocStr(wxPaneInfo::IsMovable,
"IsMoveable returns ``True`` if the docked frame can be undocked or moved
to another dock position.
", "");

DocStr(wxPaneInfo::HasCaption,
"HasCaption returns ``True`` if the pane displays a caption.
", "");

DocStr(wxPaneInfo::HasGripper,
"HasGripper returns ``True`` if the pane displays a gripper.
", "");

DocStr(wxPaneInfo::HasBorder,
"HasBorder returns ``True`` if the pane displays a border.
", "");

DocStr(wxPaneInfo::HasCloseButton,
"HasCloseButton returns ``True`` if the pane displays a button to close
the pane.
", "");

DocStr(wxPaneInfo::HasMaximizeButton,
"HasMaximizeButton returns ``True`` if the pane displays a button to
maximize the pane.
", "");

DocStr(wxPaneInfo::HasMinimizeButton,
"HasMinimizeButton returns ``True`` if the pane displays a button to
minimize the pane.
", "");

DocStr(wxPaneInfo::HasPinButton,
"HasPinButton returns ``True`` if the pane displays a button to float
the pane.
", "");

DocStr(wxPaneInfo::Name,
"Name sets the name of the pane so it can be referenced in lookup
functions.
", "");

DocStr(wxPaneInfo::Caption,
"Caption sets the caption of the pane.
", "");

DocStr(wxPaneInfo::Left,
"Left sets the pane dock position to the left side of the frame.
", "");

DocStr(wxPaneInfo::Right,
"Right sets the pane dock position to the right side of the frame.
", "");

DocStr(wxPaneInfo::Top,
"Top sets the pane dock position to the top of the frame.
", "");

DocStr(wxPaneInfo::Bottom,
"Bottom sets the pane dock position to the bottom of the frame.
", "");

DocStr(wxPaneInfo::Centre,
"Centre sets the pane to the center position of the frame.
", "");

DocStr(wxPaneInfo::Center,
"Center sets the pane to the center position of the frame.
", "");

DocStr(wxPaneInfo::Direction,
"Direction determines the direction of the docked pane.
", "");

DocStr(wxPaneInfo::Layer,
"Layer determines the layer of the docked pane.
", "");

DocStr(wxPaneInfo::Row,
"Row determines the row of the docked pane.
", "");

DocStr(wxPaneInfo::Position,
"Position determines the position of the docked pane.
", "");



DocStr(wxPaneInfo::MaxSize,
"MaxSize sets the maximum size of the pane.
", "");

DocStr(wxPaneInfo::BestSize,
"BestSize sets the ideal size for the pane.
", "");

DocStr(wxPaneInfo::MinSize,
"MinSize sets the minimum size of the pane.
", "");

DocStr(wxPaneInfo::FloatingPosition,
"FloatingPosition sets the position of the floating pane.
", "");

DocStr(wxPaneInfo::FloatingSize,
"FloatingSize sets the size of the floating pane.
", "");



DocStr(wxPaneInfo::Fixed,
"Fixed forces a pane to be fixed size so that it cannot be resized.
", "");

DocStr(wxPaneInfo::Resizable,
"Resized allows a pane to be resized if resizable is true, and forces
it to be a fixed size if resizeable is false.
", "");

DocStr(wxPaneInfo::Dock,
"Dock indicates that a pane should be docked.
", "");

DocStr(wxPaneInfo::Float,
"Float indicates that a pane should be floated.
", "");

DocStr(wxPaneInfo::Hide,
"Hide indicates that a pane should be hidden.
", "");

DocStr(wxPaneInfo::Show,
"Show indicates that a pane should be shown.
", "");

DocStr(wxPaneInfo::CaptionVisible,
"CaptionVisible indicates that a pane caption should be visible.
", "");

DocStr(wxPaneInfo::PaneBorder,
"PaneBorder indicates that a border should be drawn for the pane.
", "");

DocStr(wxPaneInfo::Gripper,
"Gripper indicates that a gripper should be drawn for the pane..
", "");

DocStr(wxPaneInfo::CloseButton,
"CloseButton indicates that a close button should be drawn for the
pane.
", "");

DocStr(wxPaneInfo::MaximizeButton,
"MaximizeButton indicates that a maximize button should be drawn for
the pane.
", "");

DocStr(wxPaneInfo::MinimizeButton,
"MinimizeButton indicates that a minimize button should be drawn for
the pane.
", "");

DocStr(wxPaneInfo::PinButton,
"PinButton indicates that a pin button should be drawn for the pane.
", "");

DocStr(wxPaneInfo::DestroyOnClose,
"DestroyOnClose indicates whether a pane should be detroyed when it is
closed.
", "");

DocStr(wxPaneInfo::TopDockable,
"TopDockable indicates whether a pane can be docked at the top of the
frame.
", "");

DocStr(wxPaneInfo::BottomDockable,
"BottomDockable indicates whether a pane can be docked at the bottom of
the frame.
", "");

DocStr(wxPaneInfo::LeftDockable,
"LeftDockable indicates whether a pane can be docked on the left of the
frame.
", "");

DocStr(wxPaneInfo::RightDockable,
"RightDockable indicates whether a pane can be docked on the right of
the frame.
", "");

DocStr(wxPaneInfo::Floatable,
"Floatable indicates whether a frame can be floated.
", "");

DocStr(wxPaneInfo::Movable,
"Movable indicates whether a frame can be moved.
", "");

DocStr(wxPaneInfo::Dockable,
"Dockable indicates whether a pane can be docked at any position of the
frame.
", "");

DocStr(wxPaneInfo::DefaultPane,
"DefaultPane specifies that the pane should adopt the default pane
settings.
", "");

DocStr(wxPaneInfo::CentrePane,
"CentrePane specifies that the pane should adopt the default center
pane settings.
", "");

DocStr(wxPaneInfo::CenterPane,
"CenterPane specifies that the pane should adopt the default center
pane settings.
", "");

DocStr(wxPaneInfo::ToolbarPane,
"ToolbarPane specifies that the pane should adopt the default toolbar
pane settings.
", "");

DocStr(wxPaneInfo::SetFlag,
"SetFlag turns the property given by flag on or off with the
option_state parameter.
", "");

DocStr(wxPaneInfo::HasFlag,
"HasFlag returns ``True`` if the the property specified by flag is
active for the pane.
", "");


//---------------------------------------------------------------------------

DocStr(wxDockArt,
"DockArt is an art provider class which does all of the drawing for
`FrameManager`.  This allows the library caller to customize or replace the
dock art and drawing routines by deriving a new class from `PyDockArt`. The
active dock art class can be set via `FrameManager.SetArtProvider`.
", "");

DocStr(wxDefaultDockArt,
"DefaultDockArt is the type of art class constructed by default for the
`FrameManager`.","");