Ticket #8346 (reopened enhancement)
Add automatic-notebooks to wxAUI.
| Reported by: | huge_ | Owned by: | biwillia76 |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | wxAui | Version: | 2.9-svn |
| Keywords: | wxaui automatic notebook pane | Cc: | huge_, biwillia76, bwilliams@… |
| Blocked By: | 14756, 14756, 14756, 14756, 14756, 14756, 14756, 14756, 14756, 14756, 14756, 14756, 14756, 14756, 14756, 14756, 14756, 14756, 14756, 14756, 14756, 14756, 14756, 14756, 14756, 14756, 14756, 14756, 14756, 14756, 14756, 14756, 14756, 14756, 14756, 14756, 14756, 14756, 14756, 14756, 14756 | Patch: | yes |
| Blocking: |
Description
This mod adds "automatic notebooks" to wxAUI. This allows panes to be dragged over the top of other eligible panes for form notebooks, and then you can drag the tabs out to for normal panes again.
To dock on another pane, firstly both panes must have the "optionNotebookDockable" flag (now on by default) and not be "Fixed" size. Then you drag over the centre 1/3 of the pane to cause a notebook-drop. You can globally disable this mod using wxAUI_MGR_NO_AUTO_NOTEBOOK flag on the manager.
This mod replaces 1626617 (wxAUI wxFrames), as the changes are too intertwined.
You can programatically create a notebook by first creating a notebook id at a certain position, and then adding pages to it:
int notebook = mManager->AddNotebook(wxAuiPaneInfo().Left().BestSize(250,500));
mManager->AddPane( pane1, wxAuiPaneInfo().BestSize(200,400).NotebookPage(notebook) ); mManager->AddPane( pane2, wxAuiPaneInfo().BestSize(200,400).NotebookPage(notebook) );
If you remove all-but-one pane, the notebook will convert to a normal pane.
Known issues: The notebook gets the "BestSize" from the first pane - perhaps some other thing would be better? MinSize/MaxSize are currently ignored. The notebooks are simple arrays of tabs - you can't split them like you can the wxAuiNotebook - although you don't really need to. The tab-order is currently hard to change. The active tab is not remembered.

