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¶
Known Subclasses¶
Methods Summary¶
Trivial default constructor. |
|
Determine what should be done with the pages not attached to any tab control after restoring the pages order. |
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
LoadNotebookTabsdoesn’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
Truewithout modifying the output arguments, which results in the page being appended to the main tab control. The overridden version may returnTruebut 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
Falseto indicate that the page should be removed from the notebook.- Parameters:
book (wx.aui.AuiNotebook)
page (int)
tabCtrl (AuiTabCtrl)
tabIndex (int)
- 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.GetMainTabCtrlorwx.aui.AuiNotebook.GetAllTabCtrlson it, but this function must not attempt to modify it by adding or removing pages to/from it.