Version: 3.3.0
wxAuiBookSerializer Class Referenceabstract

#include <wx/aui/serializer.h>

+ Inheritance diagram for wxAuiBookSerializer:

Detailed Description

wxAuiBookSerializer is used for serializing wxAuiNotebook layout.

This includes the tab controls layout and the order of pages in them.

It can be used standalone with wxAuiNotebook::SaveLayout() or as base class of wxAuiSerializer for saving and restoring the entire layout.

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

Public Member Functions

 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

◆ wxAuiBookSerializer()

wxAuiBookSerializer::wxAuiBookSerializer ( )
default

Trivial default ctor.

◆ ~wxAuiBookSerializer()

virtual wxAuiBookSerializer::~wxAuiBookSerializer ( )
virtualdefault

Trivial but virtual destructor.

Member Function Documentation

◆ AfterSaveNotebook()

virtual void wxAuiBookSerializer::AfterSaveNotebook ( )
virtual

Called after saving information about all the pages of the notebook in the AUI pane with the given name.

Does nothing by default.

◆ BeforeSaveNotebook()

virtual void wxAuiBookSerializer::BeforeSaveNotebook ( const wxString name)
pure virtual

Called before starting to save information about the tabs in the notebook in the AUI pane with the given name.

This function needs to be overridden to keep record of the notebook for which SaveNotebookTabControl() will be called next.

If this class is used as a base class of wxAuiSerializer, saving notebook layout may be unnecessary, e.g. because the program doesn't use wxAuiNotebook at all, and the implementation can be trivial and just do nothing because it is not going to be called at all if there are no notebooks in the full layout.

When using wxAuiNotebook::SaveLayout() directly, this function is always called and is the first function of this class to be called.

◆ SaveNotebookTabControl()

virtual void wxAuiBookSerializer::SaveNotebookTabControl ( const wxAuiTabLayoutInfo tab)
pure virtual

Called to save information about a single tab control in the given notebook.

This function will be called for all tab controls in the notebook after BeforeSaveNotebook().

As with that function, it has to be implemented, but can simply do nothing if saving notebook layout is not necessary.