Class: Wx::AUI::AuiBookDeserializer
- Inherits:
-
Object
- Object
- Wx::AUI::AuiBookDeserializer
- Defined in:
- lib/wx/doc/gen/aui/aui_manager.rb
Overview
This class is untracked and should not be derived from nor instances extended!
AuiBookDeserializer is used for deserializing AuiNotebook layout.
Similarly to AuiBookSerializer, it can be used standalone with Wx::AUI::AuiNotebook#load_layout or as base class of AuiDeserializer.
Category: Window Docking (wxAUI)
Direct Known Subclasses
Instance Method Summary collapse
-
#handle_orphaned_page(book, page) ⇒ Boolean, Array(Wx::AUI::AuiTabCtrl, Integer)
Determine what should be done with the pages not attached to any tab control after restoring the pages order.
-
#initialize ⇒ Wx::AUI::AuiBookDeserializer
constructor
Trivial default ctor.
-
#load_notebook_tabs(name) ⇒ Array<Wx::AuiTabLayoutInfo>
Load information about the notebook tabs previously saved by Wx::AUI::AuiBookSerializer#save_notebook_tab_control.
Constructor Details
#initialize ⇒ Wx::AUI::AuiBookDeserializer
Trivial default ctor.
700 |
# File 'lib/wx/doc/gen/aui/aui_manager.rb', line 700 def initialize; end |
Instance Method Details
#handle_orphaned_page(book, page) ⇒ Boolean, Array(Wx::AUI::AuiTabCtrl, Integer)
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 #load_notebook_tabs 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 overridden version may return a 2-element array with an AuiTabCtrl and tab index instead to change where the page should be inserted, e.g. by returning a tab index of 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.
The book parameter can be used to retrieve the total number of pages or to call functions such as Wx::AUI::AuiNotebook#get_main_tab_ctrl or Wx::AUI::AuiNotebook#get_all_tab_ctrls on it, but this function must not attempt to modify it by adding or removing pages to/from it.
725 |
# File 'lib/wx/doc/gen/aui/aui_manager.rb', line 725 def handle_orphaned_page(book, page) end |
#load_notebook_tabs(name) ⇒ Array<Wx::AuiTabLayoutInfo>
Load information about the notebook tabs previously saved by Wx::AUI::AuiBookSerializer#save_notebook_tab_control.
When using this class as a base class of Wx::AUI::AuiDeserializer, this function is called by Wx::AUI::AuiManager#load_layout after loading the pane with the name name if it is a Wx::AUI::AuiNotebook. Otherwise, i.e. when using Wx::AUI::AuiNotebook#load_layout directly, this function is called with the same name as was passed to that function. If restoring the notebook layout is not necessary, this function can just return an empty vector which is interpreted as meaning that the default notebook layout should be used.
708 |
# File 'lib/wx/doc/gen/aui/aui_manager.rb', line 708 def load_notebook_tabs(name) end |