#include <wx/aui/serializer.h>
wxAuiDeserializer is used by wxAuiManager::LoadLayout() to restore layout information saved by wxAuiManager::SaveLayout().
As wxAuiSerializer, this is an abstract base class, you need to inherit from it and override its pure virtual functions in your derived class.
Derived class function also may throw and, if any of them other than AfterLoad() does, the existing layout is not changed, i.e. wxAuiManager::LoadLayout() is exception-safe.
Public Member Functions | |
wxAuiDeserializer (wxAuiManager &manager) | |
Constructor taking the manager for which we're restoring the layout. More... | |
virtual | ~wxAuiDeserializer ()=default |
Trivial but virtual destructor. More... | |
virtual void | BeforeLoad () |
Called before doing anything else. More... | |
virtual std::vector< wxAuiPaneLayoutInfo > | LoadPanes ()=0 |
Load information about all the panes previously saved by wxAuiSerializer::SavePane(). More... | |
virtual wxWindow * | CreatePaneWindow (wxAuiPaneInfo &pane) |
Create the window to be managed by the given pane if necessary. More... | |
virtual void | AfterLoad () |
Called after restoring everything. More... | |
![]() | |
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... | |
Protected Attributes | |
wxAuiManager & | m_manager |
The manager for which we're restoring the layout. More... | |
|
explicit |
Constructor taking the manager for which we're restoring the layout.
The manager remains valid for the lifetime of this object.
|
virtualdefault |
Trivial but virtual destructor.
|
virtual |
Called after restoring everything.
Default implementation calls wxAuiManager::Update(). Override this function and do not call the base class version if you want to prevent this from happening, e.g. if you need to make further changes to the restored layout before updating it.
|
virtual |
Called before doing anything else.
Does nothing by default.
|
virtual |
Create the window to be managed by the given pane if necessary.
This function is called if any of the panes returned by LoadPanes() doesn't exist in the existing layout and allows to create windows on the fly.
If this function returns nullptr, as it does by default, the pane is not added to the manager.
If the function does create a new window, it should typically modify pane parameter to fill in the fields such as caption
or icon
that wouldn't normally be serialized and so wouldn't be restored by LoadPanes().
|
pure virtual |
Load information about all the panes previously saved by wxAuiSerializer::SavePane().
Unlike the serializer function, this one is called only once and should return all the panes in the layout.
Just as the serializer function, this one doesn't need to perform any scaling itself as this will be done, if necessary, by wxAuiManager itself.
If some pane in the returned vector doesn't already exist, i.e. there is no pane with the matching name, CreatePaneWindow() is called to allow creating it on the fly.
|
protected |
The manager for which we're restoring the layout.