phoenix_title wx.aui.AuiBookDeserializer

wx.aui.AuiBookDeserializer is used for deserializing wx.aui.AuiNotebook layout.

Similarly to wx.aui.AuiBookSerializer, it can be used standalone with wx.aui.AuiNotebook.LoadLayout or as base class of wx.aui.AuiDeserializer.

Added in version 4.3/wxWidgets-3.3.0.


class_hierarchy Class Hierarchy

Inheritance diagram for class AuiBookDeserializer:

sub_classes Known Subclasses

wx.aui.AuiDeserializer


method_summary Methods Summary

__init__

Trivial default constructor.

HandleOrphanedPage

Determine what should be done with the pages not attached to any tab control after restoring the pages order.


api Class API

class wx.aui.AuiBookDeserializer(object)

Possible constructors:

AuiBookDeserializer() -> None

AuiBookDeserializer is used for deserializing AuiNotebook layout.


Methods

__init__(self)

Trivial default constructor.

Return type:

None



HandleOrphanedPage(self, book, page, tabCtrl, tabIndex)

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.

Parameters:
Return type:

bool

Note

The book parameter can be used to retrieve the total number of pages or to call functions such as wx.aui.AuiNotebook.GetMainTabCtrl or wx.aui.AuiNotebook.GetAllTabCtrls on it, but this function must not attempt to modify it by adding or removing pages to/from it.