#include <wx/aui/serializer.h>
wxAuiBookDeserializer is used for deserializing wxAuiNotebook layout.
Similarly to wxAuiBookSerializer, it can be used standalone with wxAuiNotebook::LoadLayout() or as base class of wxAuiDeserializer.
Public Member Functions | |
wxAuiBookDeserializer ()=default | |
Trivial default ctor. More... | |
virtual | ~wxAuiBookDeserializer ()=default |
Trivial but virtual destructor. More... | |
virtual std::vector< wxAuiTabLayoutInfo > | LoadNotebookTabs (const wxString &name)=0 |
Load information about the notebook tabs previously saved by wxAuiBookSerializer::SaveNotebookTabControl(). More... | |
virtual bool | HandleOrphanedPage (wxAuiNotebook &book, int page, wxAuiTabCtrl **tabCtrl, int *tabIndex) |
Determine what should be done with the pages not attached to any tab control after restoring the pages order. More... | |
|
default |
Trivial default ctor.
|
virtualdefault |
Trivial but virtual destructor.
|
virtual |
Determine what should be done with the pages not attached to any tab control after restoring the pages order.
It is possible that the data returned by LoadNotebookTabs() doesn't contain the layout information for all the currently existing pages, e.g. because data saved by an earlier program version is being loaded into a newer version in which new pages were added. In this case, this function is called for each page that wasn't assigned to any tab after restoring the pages order and can be overridden to determine what should be done with it.
The default implementation of this function just returns true without modifying the output arguments, which results in the page being appended to the main tab control. The overridden version may return true but modify tabCtrl and tabIndex arguments to change where the page should be inserted, e.g. by setting tabIndex to 0 to insert the new pages at the beginning instead of appending them.
Finally, the overridden function may return false to indicate that the page should be removed from the notebook.
|
pure virtual |
Load information about the notebook tabs previously saved by wxAuiBookSerializer::SaveNotebookTabControl().
When using this class as a base class of wxAuiDeserializer, this function is called by wxAuiManager::LoadLayout() after loading the pane with the name name if it is a wxAuiNotebook. Otherwise, i.e. when using wxAuiNotebook::LoadLayout() directly, this function is called with the same name as was passed to that function.
If restoring the notebook layout is not necessary, this function can just return an empty vector which is interpreted as meaning that the default notebook layout should be used.