.. wxPython Phoenix documentation
This file was generated by Phoenix's sphinx generator and associated
tools, do not edit by hand.
Copyright: (c) 2011-2020 by Total Control Software
License: wxWindows License
.. include:: headings.inc
.. _wx.aui.AuiSerializer:
==========================================================================================================================================
|phoenix_title| **wx.aui.AuiSerializer**
==========================================================================================================================================
:ref:`wx.aui.AuiSerializer` is used by :meth:`wx.aui.AuiManager.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 :ref:`wx.aui.AuiBookSerializer` class, in your derived class.
In particular, :meth:`~wx.aui.AuiSerializer.SavePane` must be overridden and will be called by :ref:`wx.aui.AuiManager` 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 :meth:`wx.aui.AuiManager.SaveLayout` and it's callers responsibility to handle it.
.. versionadded:: 4.3/wxWidgets-3.3.0
|
|class_hierarchy| Class Hierarchy
=================================
.. raw:: html

Inheritance diagram for class
AuiSerializer:
|
|method_summary| Methods Summary
================================
================================================================================ ================================================================================
:meth:`~wx.aui.AuiSerializer.__init__` Trivial default constructor.
:meth:`~wx.aui.AuiSerializer.AfterSave` Called after saving everything.
:meth:`~wx.aui.AuiSerializer.AfterSaveNotebooks` Called after the last call to SaveNotebook().
:meth:`~wx.aui.AuiSerializer.AfterSavePanes` Called after the last call to :meth:`~AuiSerializer.SavePane` .
:meth:`~wx.aui.AuiSerializer.BeforeSave` Called before doing anything else.
:meth:`~wx.aui.AuiSerializer.BeforeSaveNotebooks` Called before starting to save information about the notebooks.
:meth:`~wx.aui.AuiSerializer.BeforeSavePanes` Called before starting to save information about the panes.
:meth:`~wx.aui.AuiSerializer.SavePane` Save information about the given pane.
================================================================================ ================================================================================
|
|api| Class API
===============
.. class:: wx.aui.AuiSerializer(AuiBookSerializer)
**Possible constructors**::
AuiSerializer() -> None
AuiSerializer is used by `AuiManager.SaveLayout()` to store layout
information.
.. method:: __init__(self)
Trivial default constructor.
:rtype: `None`
.. method:: AfterSave(self)
Called after saving everything.
Does nothing by default.
:rtype: `None`
.. method:: AfterSaveNotebooks(self)
Called after the last call to SaveNotebook().
Does nothing by default.
This function is called after all :ref:`wx.aui.AuiBookSerializer` member functions
:rtype: `None`
.. method:: AfterSavePanes(self)
Called after the last call to :meth:`SavePane` .
Does nothing by default.
:rtype: `None`
.. method:: BeforeSave(self)
Called before doing anything else.
Does nothing by default.
:rtype: `None`
.. method:: BeforeSaveNotebooks(self)
Called before starting to save information about the notebooks.
Does nothing by default.
Note that this function is called after :meth:`AfterSavePanes` but may not be called at all if there are no panes containing :ref:`wx.aui.AuiNotebook`.
:ref:`wx.aui.AuiBookSerializer` member functions will be called after this function if it is called at all.
:rtype: `None`
.. method:: BeforeSavePanes(self)
Called before starting to save information about the panes.
Does nothing by default.
:rtype: `None`
.. method:: SavePane(self, pane)
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 :ref:`wx.aui.AuiDeserializer` 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.
:param `pane`:
:type `pane`: wx.aui.AuiPaneLayoutInfo
:rtype: `None`