Version: 3.3.0
wxAuiSerializer Class Referenceabstract

#include <wx/aui/serializer.h>

+ Inheritance diagram for wxAuiSerializer:

Detailed Description

wxAuiSerializer is used by wxAuiManager::SaveLayout() to store layout information.

This is an abstract base class, you need to inherit from it and override its pure virtual functions, including those inherited from its base wxAuiBookSerializer class, in your derived class.

In particular, SavePane() must be overridden and will be called by wxAuiManager for each pane and dock present in the layout. Most of the other functions don't need to be overridden, but it is often convenient to perform some actions before or after starting to save the objects of the given type or at the beginning or end of the whole saving process, so this class provides hooks for doing it.

If any of the functions of the derived class throw an exception, it is propagated out of wxAuiManager::SaveLayout() and it's callers responsibility to handle it.

Library:  wxAui
Category:  Window Docking (wxAUI)
Since
3.3.0

Public Member Functions

 wxAuiSerializer ()=default
 Trivial default ctor. More...
 
virtual void BeforeSave ()
 Called before doing anything else. More...
 
virtual void BeforeSavePanes ()
 Called before starting to save information about the panes. More...
 
virtual void SavePane (const wxAuiPaneLayoutInfo &pane)=0
 Save information about the given pane. More...
 
virtual void AfterSavePanes ()
 Called after the last call to SavePane(). More...
 
virtual void BeforeSaveNotebooks ()
 Called before starting to save information about the notebooks. More...
 
virtual void AfterSaveNotebooks ()
 Called after the last call to SaveNotebook(). More...
 
virtual void AfterSave ()
 Called after saving everything. More...
 
- Public Member Functions inherited from wxAuiBookSerializer
 wxAuiBookSerializer ()=default
 Trivial default ctor. More...
 
virtual ~wxAuiBookSerializer ()=default
 Trivial but virtual destructor. More...
 
virtual void BeforeSaveNotebook (const wxString &name)=0
 Called before starting to save information about the tabs in the notebook in the AUI pane with the given name. More...
 
virtual void SaveNotebookTabControl (const wxAuiTabLayoutInfo &tab)=0
 Called to save information about a single tab control in the given notebook. More...
 
virtual void AfterSaveNotebook ()
 Called after saving information about all the pages of the notebook in the AUI pane with the given name. More...
 

Constructor & Destructor Documentation

◆ wxAuiSerializer()

wxAuiSerializer::wxAuiSerializer ( )
default

Trivial default ctor.

Member Function Documentation

◆ AfterSave()

virtual void wxAuiSerializer::AfterSave ( )
virtual

Called after saving everything.

Does nothing by default.

◆ AfterSaveNotebooks()

virtual void wxAuiSerializer::AfterSaveNotebooks ( )
virtual

Called after the last call to SaveNotebook().

Does nothing by default.

This function is called after all wxAuiBookSerializer member functions

◆ AfterSavePanes()

virtual void wxAuiSerializer::AfterSavePanes ( )
virtual

Called after the last call to SavePane().

Does nothing by default.

◆ BeforeSave()

virtual void wxAuiSerializer::BeforeSave ( )
virtual

Called before doing anything else.

Does nothing by default.

◆ BeforeSaveNotebooks()

virtual void wxAuiSerializer::BeforeSaveNotebooks ( )
virtual

Called before starting to save information about the notebooks.

Does nothing by default.

Note that this function is called after AfterSavePanes() but may not be called at all if there are no panes containing wxAuiNotebook.

wxAuiBookSerializer member functions will be called after this function if it is called at all.

◆ BeforeSavePanes()

virtual void wxAuiSerializer::BeforeSavePanes ( )
virtual

Called before starting to save information about the panes.

Does nothing by default.

◆ SavePane()

virtual void wxAuiSerializer::SavePane ( const wxAuiPaneLayoutInfo pane)
pure virtual

Save information about the given pane.

This function will be called for all panes and must be implemented to save their data in a format from which it can be restored later using a matching wxAuiDeserializer implementation.

Note that all sizes and positions in pane are using DIPs, i.e. resolution-independent pixels, when it is passed to this function, so it does not need to perform any scaling itself to ensure that the stored values are restored correctly if the resolution changes.