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