]> git.saurik.com Git - wxWidgets.git/blame - interface/wx/aui/framemanager.h
Default to wxConvUTF8 (not wxConvAuto) in wxDataInputStream and wxDataOutputStream...
[wxWidgets.git] / interface / wx / aui / framemanager.h
CommitLineData
23324ae1
FM
1/////////////////////////////////////////////////////////////////////////////
2// Name: aui/aui.h
e54c96f1 3// Purpose: interface of wxAuiManager
23324ae1
FM
4// Author: wxWidgets team
5// RCS-ID: $Id$
6// Licence: wxWindows license
7/////////////////////////////////////////////////////////////////////////////
8
47d602c1
FM
9
10/**
11 @todo TOWRITE
12*/
13enum wxAuiManagerDock
14{
15 wxAUI_DOCK_NONE = 0,
16 wxAUI_DOCK_TOP = 1,
17 wxAUI_DOCK_RIGHT = 2,
18 wxAUI_DOCK_BOTTOM = 3,
19 wxAUI_DOCK_LEFT = 4,
20 wxAUI_DOCK_CENTER = 5,
21 wxAUI_DOCK_CENTRE = wxAUI_DOCK_CENTER
22};
23
24
25/**
26 @todo TOWRITE
27*/
28enum wxAuiManagerOption
29{
30 wxAUI_MGR_ALLOW_FLOATING = 1 << 0,
31 wxAUI_MGR_ALLOW_ACTIVE_PANE = 1 << 1,
32 wxAUI_MGR_TRANSPARENT_DRAG = 1 << 2,
33 wxAUI_MGR_TRANSPARENT_HINT = 1 << 3,
34 wxAUI_MGR_VENETIAN_BLINDS_HINT = 1 << 4,
35 wxAUI_MGR_RECTANGLE_HINT = 1 << 5,
36 wxAUI_MGR_HINT_FADE = 1 << 6,
37 wxAUI_MGR_NO_VENETIAN_BLINDS_FADE = 1 << 7,
68030cae 38 wxAUI_MGR_LIVE_RESIZE = 1 << 8,
47d602c1
FM
39
40 wxAUI_MGR_DEFAULT = wxAUI_MGR_ALLOW_FLOATING |
41 wxAUI_MGR_TRANSPARENT_HINT |
42 wxAUI_MGR_HINT_FADE |
43 wxAUI_MGR_NO_VENETIAN_BLINDS_FADE
44};
45
23324ae1
FM
46/**
47 @class wxAuiManager
7c913512 48
23324ae1 49 wxAuiManager is the central class of the wxAUI class framework.
47d602c1 50 See also @ref overview_aui.
7c913512 51
47d602c1
FM
52 wxAuiManager manages the panes associated with it for a particular wxFrame,
53 using a pane's wxAuiPaneInfo information to determine each pane's docking
54 and floating behavior.
7c913512 55
47d602c1
FM
56 wxAuiManager uses wxWidgets' sizer mechanism to plan the layout of each frame.
57 It uses a replaceable dock art class to do all drawing, so all drawing is
58 localized in one area, and may be customized depending on an application's
59 specific needs.
7c913512 60
23324ae1
FM
61 wxAuiManager works as follows: the programmer adds panes to the class,
62 or makes changes to existing pane properties (dock position, floating
63 state, show state, etc.). To apply these changes, wxAuiManager's
64 Update() function is called. This batch processing can be used to avoid
65 flicker, by modifying more than one pane at a time, and then "committing"
66 all of the changes at once by calling Update().
7c913512 67
23324ae1 68 Panes can be added quite easily:
7c913512 69
23324ae1
FM
70 @code
71 wxTextCtrl* text1 = new wxTextCtrl(this, -1);
72 wxTextCtrl* text2 = new wxTextCtrl(this, -1);
73 m_mgr.AddPane(text1, wxLEFT, wxT("Pane Caption"));
74 m_mgr.AddPane(text2, wxBOTTOM, wxT("Pane Caption"));
75 m_mgr.Update();
76 @endcode
7c913512 77
23324ae1
FM
78 Later on, the positions can be modified easily. The following will float
79 an existing pane in a tool window:
7c913512 80
23324ae1
FM
81 @code
82 m_mgr.GetPane(text1).Float();
83 @endcode
7c913512 84
47d602c1 85
3a74a290 86 @section auimanager_layers Layers, Rows and Directions, Positions
47d602c1 87
8d483c9b 88 Inside wxAUI, the docking layout is figured out by checking several pane
47d602c1
FM
89 parameters. Four of these are important for determining where a pane will end up:
90
91 @li Direction: Each docked pane has a direction, Top, Bottom, Left, Right, or Center.
92 This is fairly self-explanatory. The pane will be placed in the location specified
93 by this variable.
94 @li Position: More than one pane can be placed inside of a dock. Imagine two panes
95 being docked on the left side of a window. One pane can be placed over another.
96 In proportionally managed docks, the pane position indicates its sequential position,
97 starting with zero. So, in our scenario with two panes docked on the left side,
8d483c9b 98 the top pane in the dock would have position 0, and the second one would occupy
47d602c1 99 position 1.
8d483c9b 100 @li Row: A row can allow for two docks to be placed next to each other. One of the
47d602c1
FM
101 most common places for this to happen is in the toolbar. Multiple toolbar rows
102 are allowed, the first row being row 0, and the second row 1. Rows can also be
103 used on vertically docked panes.
104 @li Layer: A layer is akin to an onion. Layer 0 is the very center of the managed pane.
105 Thus, if a pane is in layer 0, it will be closest to the center window (also
106 sometimes known as the "content window"). Increasing layers "swallow up" all
107 layers of a lower value. This can look very similar to multiple rows, but is
108 different because all panes in a lower level yield to panes in higher levels.
109 The best way to understand layers is by running the wxAUI sample.
110
111
23324ae1
FM
112 @library{wxbase}
113 @category{aui}
7c913512 114
e54c96f1 115 @see wxAuiPaneInfo, wxAuiDockArt
23324ae1
FM
116*/
117class wxAuiManager : public wxEvtHandler
118{
119public:
120 /**
4cc4bfaf
FM
121 Constructor. @a managed_wnd specifies the wxFrame which should be managed.
122 @a flags specifies options which allow the frame management behavior
23324ae1
FM
123 to be modified.
124 */
4cc4bfaf 125 wxAuiManager(wxWindow* managed_wnd = NULL,
23324ae1
FM
126 unsigned int flags = wxAUI_MGR_DEFAULT);
127
128 /**
47d602c1 129 Dtor.
23324ae1 130 */
8d483c9b 131 virtual ~wxAuiManager();
23324ae1
FM
132
133 //@{
134 /**
47d602c1
FM
135 AddPane() tells the frame manager to start managing a child window.
136 There are several versions of this function. The first version allows
137 the full spectrum of pane parameter possibilities. The second version is
138 used for simpler user interfaces which do not require as much configuration.
139 The last version allows a drop position to be specified, which will determine
140 where the pane will be added.
23324ae1
FM
141 */
142 bool AddPane(wxWindow* window, const wxAuiPaneInfo& pane_info);
7c913512
FM
143 bool AddPane(wxWindow* window, int direction = wxLEFT,
144 const wxString& caption = wxEmptyString);
145 bool AddPane(wxWindow* window,
146 const wxAuiPaneInfo& pane_info,
147 const wxPoint& drop_pos);
23324ae1
FM
148 //@}
149
150 /**
151 Tells the wxAuiManager to stop managing the pane specified by window.
152 The window, if in a floated frame, is reparented to the frame managed
153 by wxAuiManager.
154 */
155 bool DetachPane(wxWindow* window);
156
157 /**
158 Returns an array of all panes managed by the frame manager.
159 */
d2aa927a 160 wxAuiPaneInfoArray& GetAllPanes();
23324ae1
FM
161
162 /**
163 Returns the current art provider being used.
47d602c1 164 @see wxAuiDockArt.
23324ae1 165 */
328f5751 166 wxAuiDockArt* GetArtProvider() const;
23324ae1
FM
167
168 /**
47d602c1
FM
169 Returns the current dock constraint values.
170 See SetDockSizeConstraint() for more information.
23324ae1 171 */
d2aa927a 172 void GetDockSizeConstraint(double* widthpct, double* heightpct) const;
23324ae1
FM
173
174 /**
175 Returns the current manager's flags.
176 */
328f5751 177 unsigned int GetFlags() const;
23324ae1
FM
178
179 /**
180 Returns the frame currently being managed by wxAuiManager.
181 */
328f5751 182 wxWindow* GetManagedWindow() const;
23324ae1
FM
183
184 /**
47d602c1 185 Calling this method will return the wxAuiManager for a given window.
8d483c9b 186 The @a window parameter should specify any child window or sub-child
47d602c1
FM
187 window of the frame or window managed by wxAuiManager.
188
4cc4bfaf 189 The @a window parameter need not be managed by the manager itself, nor does it
47d602c1
FM
190 even need to be a child or sub-child of a managed window. It must however
191 be inside the window hierarchy underneath the managed window.
23324ae1
FM
192 */
193 static wxAuiManager* GetManager(wxWindow* window);
194
195 //@{
196 /**
47d602c1
FM
197 GetPane() is used to lookup a wxAuiPaneInfo object either by window pointer
198 or by pane name, which acts as a unique id for a window pane.
199
200 The returned wxAuiPaneInfo object may then be modified to change a pane's
8d483c9b
FM
201 look, state or position. After one or more modifications to wxAuiPaneInfo,
202 wxAuiManager::Update() should be called to commit the changes to the user
203 interface. If the lookup failed (meaning the pane could not be found in the
47d602c1 204 manager), a call to the returned wxAuiPaneInfo's IsOk() method will return @false.
23324ae1 205 */
882678eb
FM
206 wxAuiPaneInfo& GetPane(wxWindow* window);
207 wxAuiPaneInfo& GetPane(const wxString& name);
23324ae1
FM
208 //@}
209
210 /**
211 HideHint() hides any docking hint that may be visible.
212 */
d2aa927a 213 virtual void HideHint();
23324ae1
FM
214
215 /**
216 This method is used to insert either a previously unmanaged pane window
7c913512 217 into the frame manager, or to insert a currently managed pane somewhere
47d602c1
FM
218 else. InsertPane() will push all panes, rows, or docks aside and
219 insert the window into the position specified by @a insert_location.
220
4cc4bfaf 221 Because @a insert_location can specify either a pane, dock row, or dock
47d602c1
FM
222 layer, the @a insert_level parameter is used to disambiguate this.
223 The parameter @a insert_level can take a value of wxAUI_INSERT_PANE,
224 wxAUI_INSERT_ROW or wxAUI_INSERT_DOCK.
23324ae1
FM
225 */
226 bool InsertPane(wxWindow* window,
227 const wxAuiPaneInfo& insert_location,
228 int insert_level = wxAUI_INSERT_PANE);
229
230 /**
231 LoadPaneInfo() is similar to to LoadPerspective, with the exception that it
47d602c1
FM
232 only loads information about a single pane. It is used in combination with
233 SavePaneInfo().
23324ae1
FM
234 */
235 void LoadPaneInfo(wxString pane_part, wxAuiPaneInfo& pane);
236
237 /**
238 Loads a saved perspective. If update is @true, wxAuiManager::Update()
239 is automatically invoked, thus realizing the saved perspective on screen.
240 */
241 bool LoadPerspective(const wxString& perspective,
4cc4bfaf 242 bool update = true);
23324ae1 243
23324ae1
FM
244 /**
245 SavePaneInfo() is similar to SavePerspective, with the exception that it only
47d602c1
FM
246 saves information about a single pane. It is used in combination with
247 LoadPaneInfo().
23324ae1
FM
248 */
249 wxString SavePaneInfo(wxAuiPaneInfo& pane);
250
251 /**
252 Saves the entire user interface layout into an encoded wxString, which
47d602c1
FM
253 can then be stored by the application (probably using wxConfig).
254
255 When a perspective is restored using LoadPerspective(), the entire user
23324ae1
FM
256 interface will return to the state it was when the perspective was saved.
257 */
258 wxString SavePerspective();
259
260 /**
261 Instructs wxAuiManager to use art provider specified by parameter
8d483c9b 262 @a art_provider for all drawing calls.
47d602c1
FM
263 This allows plugable look-and-feel features. The previous art provider object,
264 if any, will be deleted by wxAuiManager.
265
266 @see wxAuiDockArt.
23324ae1
FM
267 */
268 void SetArtProvider(wxAuiDockArt* art_provider);
269
270 /**
271 When a user creates a new dock by dragging a window into a docked position,
47d602c1 272 often times the large size of the window will create a dock that is unwieldly
8d483c9b 273 large. wxAuiManager by default limits the size of any new dock to 1/3 of the
47d602c1
FM
274 window size. For horizontal docks, this would be 1/3 of the window height.
275 For vertical docks, 1/3 of the width.
276
277 Calling this function will adjust this constraint value. The numbers must be
278 between 0.0 and 1.0. For instance, calling SetDockSizeContraint with
279 0.5, 0.5 will cause new docks to be limited to half of the size of the
280 entire managed window.
23324ae1
FM
281 */
282 void SetDockSizeConstraint(double widthpct, double heightpct);
283
284 /**
47d602c1 285 This method is used to specify wxAuiManager's settings flags. @a flags
23324ae1
FM
286 specifies options which allow the frame management behavior to be modified.
287 */
d56f17d8 288 void SetFlags(unsigned int flags);
23324ae1
FM
289
290 /**
7c913512 291 Called to specify the frame or window which is to be managed by wxAuiManager.
47d602c1
FM
292 Frame management is not restricted to just frames. Child windows or custom
293 controls are also allowed.
23324ae1
FM
294 */
295 void SetManagedWindow(wxWindow* managed_wnd);
296
297 /**
298 This function is used by controls to explicitly show a hint window at the
47d602c1 299 specified rectangle. It is rarely called, and is mostly used by controls
8d483c9b 300 implementing custom pane drag/drop behaviour.
47d602c1 301 The specified rectangle should be in screen coordinates.
23324ae1 302 */
d2aa927a 303 virtual void ShowHint(const wxRect& rect);
23324ae1
FM
304
305 /**
306 Uninitializes the framework and should be called before a managed frame or
8d483c9b
FM
307 window is destroyed. UnInit() is usually called in the managed wxFrame's
308 destructor. It is necessary to call this function before the managed frame
309 or window is destroyed, otherwise the manager cannot remove its custom event
47d602c1 310 handlers from a window.
23324ae1
FM
311 */
312 void UnInit();
313
314 /**
315 This method is called after any number of changes are
316 made to any of the managed panes. Update() must be invoked after
317 AddPane() or InsertPane() are called in order to "realize" or "commit"
318 the changes. In addition, any number of changes may be made to
319 wxAuiPaneInfo structures (retrieved with wxAuiManager::GetPane), but to
320 realize the changes, Update() must be called. This construction allows
321 pane flicker to be avoided by updating the whole layout at one time.
322 */
323 void Update();
1d497b99
FM
324
325protected:
326
327 /**
328 ProcessDockResult() is a protected member of the wxAUI layout manager.
329 It can be overridden by derived classes to provide custom docking calculations.
330 */
331 virtual bool ProcessDockResult(wxAuiPaneInfo& target,
332 const wxAuiPaneInfo& new_pos);
23324ae1
FM
333};
334
335
e54c96f1 336
23324ae1
FM
337/**
338 @class wxAuiPaneInfo
7c913512 339
23324ae1 340 wxAuiPaneInfo is part of the wxAUI class framework.
47d602c1 341 See also @ref overview_aui.
7c913512 342
23324ae1 343 wxAuiPaneInfo specifies all the parameters for a pane.
47d602c1
FM
344 These parameters specify where the pane is on the screen, whether it is docked
345 or floating, or hidden.
8d483c9b 346 In addition, these parameters specify the pane's docked position, floating
47d602c1 347 position, preferred size, minimum size, caption text among many other parameters.
7c913512 348
23324ae1
FM
349 @library{wxbase}
350 @category{aui}
7c913512 351
e54c96f1 352 @see wxAuiManager, wxAuiDockArt
23324ae1 353*/
7c913512 354class wxAuiPaneInfo
23324ae1
FM
355{
356public:
47d602c1
FM
357 wxAuiPaneInfo();
358
23324ae1
FM
359 /**
360 Copy constructor.
361 */
7c913512 362 wxAuiPaneInfo(const wxAuiPaneInfo& c);
23324ae1
FM
363
364 //@{
365 /**
366 BestSize() sets the ideal size for the pane. The docking manager will attempt
367 to use this size as much as possible when docking or floating the pane.
368 */
882678eb
FM
369 wxAuiPaneInfo& BestSize(const wxSize& size);
370 wxAuiPaneInfo& BestSize(int x, int y);
23324ae1
FM
371 //@}
372
373 /**
374 Bottom() sets the pane dock position to the bottom side of the frame. This is
375 the same thing as calling Direction(wxAUI_DOCK_BOTTOM).
376 */
d2aa927a 377 wxAuiPaneInfo& Bottom();
23324ae1
FM
378
379 /**
380 BottomDockable() indicates whether a pane can be docked at the bottom of the
381 frame.
382 */
d2aa927a 383 wxAuiPaneInfo& BottomDockable(bool b = true);
23324ae1
FM
384
385 /**
386 Caption() sets the caption of the pane.
387 */
d2aa927a 388 wxAuiPaneInfo& Caption(const wxString& c);
23324ae1
FM
389
390 /**
391 CaptionVisible indicates that a pane caption should be visible. If @false, no
392 pane caption is drawn.
393 */
d2aa927a 394 wxAuiPaneInfo& CaptionVisible(bool visible = true);
23324ae1
FM
395
396 //@{
397 /**
398 Center() sets the pane dock position to the left side of the frame.
399 The centre pane is the space in the middle after all border panes (left, top,
400 right, bottom) are subtracted from the layout.
23324ae1
FM
401 This is the same thing as calling Direction(wxAUI_DOCK_CENTRE).
402 */
382f12e4
FM
403 wxAuiPaneInfo& Centre();
404 wxAuiPaneInfo& Center();
23324ae1
FM
405 //@}
406
407 //@{
408 /**
409 CentrePane() specifies that the pane should adopt the default center pane
8d483c9b 410 settings. Centre panes usually do not have caption bars.
47d602c1
FM
411 This function provides an easy way of preparing a pane to be displayed in
412 the center dock position.
23324ae1 413 */
382f12e4
FM
414 wxAuiPaneInfo& CentrePane();
415 wxAuiPaneInfo& CenterPane();
23324ae1
FM
416 //@}
417
418 /**
419 CloseButton() indicates that a close button should be drawn for the pane.
420 */
d2aa927a 421 wxAuiPaneInfo& CloseButton(bool visible = true);
23324ae1
FM
422
423 /**
424 DefaultPane() specifies that the pane should adopt the default pane settings.
425 */
d2aa927a 426 wxAuiPaneInfo& DefaultPane();
23324ae1
FM
427
428 /**
429 DestroyOnClose() indicates whether a pane should be detroyed when it is closed.
8d483c9b 430 Normally a pane is simply hidden when the close button is clicked.
47d602c1
FM
431 Setting DestroyOnClose to @true will cause the window to be destroyed when
432 the user clicks the pane's close button.
23324ae1 433 */
d2aa927a 434 wxAuiPaneInfo& DestroyOnClose(bool b = true);
23324ae1
FM
435
436 /**
437 Direction() determines the direction of the docked pane. It is functionally the
47d602c1
FM
438 same as calling Left(), Right(), Top() or Bottom(), except that docking direction
439 may be specified programmatically via the parameter.
23324ae1 440 */
d2aa927a 441 wxAuiPaneInfo& Direction(int direction);
23324ae1
FM
442
443 /**
444 Dock() indicates that a pane should be docked. It is the opposite of Float().
445 */
d2aa927a 446 wxAuiPaneInfo& Dock();
23324ae1
FM
447
448 /**
449 DockFixed() causes the containing dock to have no resize sash. This is useful
8d483c9b 450 for creating panes that span the entire width or height of a dock, but should
47d602c1 451 not be resizable in the other direction.
23324ae1 452 */
d2aa927a 453 wxAuiPaneInfo& DockFixed(bool b = true);
23324ae1
FM
454
455 /**
456 Dockable() specifies whether a frame can be docked or not. It is the same as
457 specifying TopDockable(b).BottomDockable(b).LeftDockable(b).RightDockable(b).
458 */
d2aa927a 459 wxAuiPaneInfo& Dockable(bool b = true);
23324ae1
FM
460
461 /**
462 Fixed() forces a pane to be fixed size so that it cannot be resized. After
463 calling Fixed(), IsFixed() will return @true.
464 */
d2aa927a 465 wxAuiPaneInfo& Fixed();
23324ae1
FM
466
467 /**
468 Float() indicates that a pane should be floated. It is the opposite of Dock().
469 */
d2aa927a 470 wxAuiPaneInfo& Float();
23324ae1
FM
471
472 /**
473 Floatable() sets whether the user will be able to undock a pane and turn it
474 into a floating window.
475 */
d2aa927a 476 wxAuiPaneInfo& Floatable(bool b = true);
23324ae1
FM
477
478 //@{
479 /**
480 FloatingPosition() sets the position of the floating pane.
481 */
882678eb
FM
482 wxAuiPaneInfo& FloatingPosition(const wxPoint& pos);
483 wxAuiPaneInfo& FloatingPosition(int x, int y);
23324ae1
FM
484 //@}
485
486 //@{
487 /**
488 FloatingSize() sets the size of the floating pane.
489 */
882678eb
FM
490 wxAuiPaneInfo& FloatingSize(const wxSize& size);
491 wxAuiPaneInfo& FloatingSize(int x, int y);
23324ae1
FM
492 //@}
493
494 /**
495 Gripper() indicates that a gripper should be drawn for the pane.
496 */
d2aa927a 497 wxAuiPaneInfo& Gripper(bool visible = true);
23324ae1
FM
498
499 /**
500 GripperTop() indicates that a gripper should be drawn at the top of the pane.
501 */
d2aa927a 502 wxAuiPaneInfo& GripperTop(bool attop = true);
23324ae1
FM
503
504 /**
505 HasBorder() returns @true if the pane displays a border.
506 */
328f5751 507 bool HasBorder() const;
23324ae1
FM
508
509 /**
510 HasCaption() returns @true if the pane displays a caption.
511 */
328f5751 512 bool HasCaption() const;
23324ae1
FM
513
514 /**
515 HasCloseButton() returns @true if the pane displays a button to close the pane.
516 */
328f5751 517 bool HasCloseButton() const;
23324ae1
FM
518
519 /**
e227438f
VZ
520 HasFlag() returns @true if the property specified by flag is active for
521 the pane.
23324ae1 522 */
e227438f 523 bool HasFlag(int flag) const;
23324ae1
FM
524
525 /**
526 HasGripper() returns @true if the pane displays a gripper.
527 */
328f5751 528 bool HasGripper() const;
23324ae1
FM
529
530 /**
531 HasGripper() returns @true if the pane displays a gripper at the top.
532 */
328f5751 533 bool HasGripperTop() const;
23324ae1
FM
534
535 /**
536 HasMaximizeButton() returns @true if the pane displays a button to maximize the
537 pane.
538 */
328f5751 539 bool HasMaximizeButton() const;
23324ae1
FM
540
541 /**
542 HasMinimizeButton() returns @true if the pane displays a button to minimize the
543 pane.
544 */
328f5751 545 bool HasMinimizeButton() const;
23324ae1
FM
546
547 /**
548 HasPinButton() returns @true if the pane displays a button to float the pane.
549 */
328f5751 550 bool HasPinButton() const;
23324ae1
FM
551
552 /**
553 Hide() indicates that a pane should be hidden.
554 */
d2aa927a 555 wxAuiPaneInfo& Hide();
23324ae1
FM
556
557 /**
558 IsBottomDockable() returns @true if the pane can be docked at the bottom of the
559 managed frame.
560 */
328f5751 561 bool IsBottomDockable() const;
23324ae1
FM
562
563 /**
564 IsDocked() returns @true if the pane is docked.
565 */
328f5751 566 bool IsDocked() const;
23324ae1
FM
567
568 /**
569 IsFixed() returns @true if the pane cannot be resized.
570 */
328f5751 571 bool IsFixed() const;
23324ae1
FM
572
573 /**
574 IsFloatable() returns @true if the pane can be undocked and displayed as a
575 floating window.
576 */
328f5751 577 bool IsFloatable() const;
23324ae1
FM
578
579 /**
580 IsFloating() returns @true if the pane is floating.
581 */
328f5751 582 bool IsFloating() const;
23324ae1
FM
583
584 /**
585 IsLeftDockable() returns @true if the pane can be docked on the left of the
586 managed frame.
587 */
328f5751 588 bool IsLeftDockable() const;
23324ae1
FM
589
590 /**
591 IsMoveable() returns @true if the docked frame can be undocked or moved to
592 another dock position.
593 */
328f5751 594 bool IsMovable() const;
23324ae1
FM
595
596 /**
597 IsOk() returns @true if the wxAuiPaneInfo structure is valid. A pane structure
598 is valid if it has an associated window.
599 */
328f5751 600 bool IsOk() const;
23324ae1
FM
601
602 /**
603 IsResizable() returns @true if the pane can be resized.
604 */
328f5751 605 bool IsResizable() const;
23324ae1
FM
606
607 /**
608 IsRightDockable() returns @true if the pane can be docked on the right of the
609 managed frame.
610 */
328f5751 611 bool IsRightDockable() const;
23324ae1
FM
612
613 /**
614 IsShown() returns @true if the pane is currently shown.
615 */
328f5751 616 bool IsShown() const;
23324ae1
FM
617
618 /**
619 IsToolbar() returns @true if the pane contains a toolbar.
620 */
328f5751 621 bool IsToolbar() const;
23324ae1
FM
622
623 /**
624 IsTopDockable() returns @true if the pane can be docked at the top of the
625 managed frame.
626 */
328f5751 627 bool IsTopDockable() const;
23324ae1
FM
628
629 /**
630 Layer() determines the layer of the docked pane. The dock layer is similar to
8d483c9b
FM
631 an onion, the inner-most layer being layer 0. Each shell moving in the outward
632 direction has a higher layer number. This allows for more complex docking layout
47d602c1 633 formation.
23324ae1 634 */
d2aa927a 635 wxAuiPaneInfo& Layer(int layer);
23324ae1
FM
636
637 /**
638 Left() sets the pane dock position to the left side of the frame. This is the
639 same thing as calling Direction(wxAUI_DOCK_LEFT).
640 */
d2aa927a 641 wxAuiPaneInfo& Left();
23324ae1
FM
642
643 /**
644 LeftDockable() indicates whether a pane can be docked on the left of the frame.
645 */
d2aa927a 646 wxAuiPaneInfo& LeftDockable(bool b = true);
23324ae1
FM
647
648 //@{
649 /**
650 MaxSize() sets the maximum size of the pane.
651 */
882678eb
FM
652 wxAuiPaneInfo& MaxSize(const wxSize& size);
653 wxAuiPaneInfo& MaxSize(int x, int y);
23324ae1
FM
654 //@}
655
656 /**
657 MaximizeButton() indicates that a maximize button should be drawn for the pane.
658 */
d2aa927a 659 wxAuiPaneInfo& MaximizeButton(bool visible = true);
23324ae1
FM
660
661 //@{
662 /**
663 MinSize() sets the minimum size of the pane. Please note that this is only
664 partially supported as of this writing.
665 */
882678eb
FM
666 wxAuiPaneInfo& MinSize(const wxSize& size);
667 wxAuiPaneInfo& MinSize(int x, int y);
23324ae1
FM
668 //@}
669
670 /**
671 MinimizeButton() indicates that a minimize button should be drawn for the pane.
672 */
d2aa927a 673 wxAuiPaneInfo& MinimizeButton(bool visible = true);
23324ae1
FM
674
675 /**
676 Movable indicates whether a frame can be moved.
677 */
d2aa927a 678 wxAuiPaneInfo& Movable(bool b = true);
23324ae1
FM
679
680 /**
681 Name() sets the name of the pane so it can be referenced in lookup functions.
8d483c9b 682 If a name is not specified by the user, a random name is assigned to the pane
47d602c1 683 when it is added to the manager.
23324ae1 684 */
d2aa927a 685 wxAuiPaneInfo& Name(const wxString& n);
23324ae1
FM
686
687 /**
688 PaneBorder indicates that a border should be drawn for the pane.
689 */
d2aa927a 690 wxAuiPaneInfo& PaneBorder(bool visible = true);
23324ae1
FM
691
692 /**
693 PinButton() indicates that a pin button should be drawn for the pane.
694 */
d2aa927a 695 wxAuiPaneInfo& PinButton(bool visible = true);
23324ae1
FM
696
697 /**
698 Position() determines the position of the docked pane.
699 */
d2aa927a 700 wxAuiPaneInfo& Position(int pos);
23324ae1
FM
701
702 /**
703 Resizable() allows a pane to be resized if the parameter is @true, and forces it
704 to be a fixed size if the parameter is @false. This is simply an antonym for Fixed().
705 */
d2aa927a 706 wxAuiPaneInfo& Resizable(bool resizable = true);
23324ae1
FM
707
708 /**
709 Right() sets the pane dock position to the right side of the frame.
710 */
d2aa927a 711 wxAuiPaneInfo& Right();
23324ae1
FM
712
713 /**
714 RightDockable() indicates whether a pane can be docked on the right of the
715 frame.
716 */
d2aa927a 717 wxAuiPaneInfo& RightDockable(bool b = true);
23324ae1
FM
718
719 /**
720 Row() determines the row of the docked pane.
721 */
d2aa927a 722 wxAuiPaneInfo& Row(int row);
23324ae1
FM
723
724 /**
725 Write the safe parts of a newly loaded PaneInfo structure "source" into "this"
726 used on loading perspectives etc.
727 */
728 void SafeSet(wxAuiPaneInfo source);
729
730 /**
731 SetFlag() turns the property given by flag on or off with the option_state
732 parameter.
733 */
d56f17d8 734 wxAuiPaneInfo& SetFlag(int flag, bool option_state);
23324ae1
FM
735
736 /**
737 Show() indicates that a pane should be shown.
738 */
d2aa927a 739 wxAuiPaneInfo& Show(bool show = true);
23324ae1
FM
740
741 /**
742 ToolbarPane() specifies that the pane should adopt the default toolbar pane
743 settings.
744 */
d2aa927a 745 wxAuiPaneInfo& ToolbarPane();
23324ae1
FM
746
747 /**
748 Top() sets the pane dock position to the top of the frame.
749 */
d2aa927a 750 wxAuiPaneInfo& Top();
23324ae1
FM
751
752 /**
753 TopDockable() indicates whether a pane can be docked at the top of the frame.
754 */
d2aa927a 755 wxAuiPaneInfo& TopDockable(bool b = true);
23324ae1
FM
756
757 /**
8d483c9b
FM
758 Window() assigns the window pointer that the wxAuiPaneInfo should use.
759 This normally does not need to be specified, as the window pointer is
760 automatically assigned to the wxAuiPaneInfo structure as soon as it is added
47d602c1 761 to the manager.
23324ae1 762 */
d2aa927a 763 wxAuiPaneInfo& Window(wxWindow* w);
23324ae1
FM
764
765 /**
766 Makes a copy of the wxAuiPaneInfo object.
767 */
1d497b99 768 wxAuiPaneInfo& operator=(const wxAuiPaneInfo& c);
23324ae1 769};
e54c96f1 770