Class: Wx::AUI::AuiDeserializer

Inherits:
AuiBookDeserializer show all
Defined in:
lib/wx/doc/gen/aui/aui_manager.rb

Overview

Note:

This class is untracked and should not be derived from nor instances extended!

AuiDeserializer is used by Wx::AUI::AuiManager#load_layout to restore layout information saved by Wx::AUI::AuiManager#save_layout.

As AuiSerializer, this is an abstract base class, you need to inherit from it and override its pure virtual functions in your derived class. Derived class function also may throw and, if any of them other than #after_load does, the existing layout is not changed, i.e. Wx::AUI::AuiManager#load_layout is exception-safe.

Category: Window Docking (wxAUI)

Requires:

  • USE_AUI

Instance Method Summary collapse

Methods inherited from AuiBookDeserializer

#handle_orphaned_page, #load_notebook_tabs

Constructor Details

#initialize(manager) ⇒ Wx::AUI::AuiDeserializer

Constructor taking the manager for which we’re restoring the layout.

The manager remains valid for the lifetime of this object.

Parameters:



746
# File 'lib/wx/doc/gen/aui/aui_manager.rb', line 746

def initialize(manager) end

Instance Method Details

#after_loadvoid

This method returns an undefined value.

Called after restoring everything.

Default implementation calls Wx::AUI::AuiManager#update. Override this function and do not call the base class version if you want to prevent this from happening, e.g. if you need to make further changes to the restored layout before updating it.



775
# File 'lib/wx/doc/gen/aui/aui_manager.rb', line 775

def after_load; end

#before_loadvoid

This method returns an undefined value.

Called before doing anything else.

Does nothing by default.



752
# File 'lib/wx/doc/gen/aui/aui_manager.rb', line 752

def before_load; end

#create_pane_window(pane) ⇒ Wx::Window

Create the window to be managed by the given pane if necessary.

This function is called if any of the panes returned by #load_panes doesn’t exist in the existing layout and allows to create windows on the fly. If this function returns nil, as it does by default, the pane is not added to the manager. If the function does create a new window, it should typically modify pane parameter to fill in the fields such as caption or icon that wouldn’t normally be serialized and so wouldn’t be restored by #load_panes.

Parameters:

Returns:



769
# File 'lib/wx/doc/gen/aui/aui_manager.rb', line 769

def create_pane_window(pane) end

#load_panesArray<Wx::AuiPaneLayoutInfo>

Load information about all the panes previously saved by Wx::AUI::AuiSerializer#save_pane.

Unlike the serializer function, this one is called only once and should return all the panes in the layout. Just as the serializer function, this one doesn’t need to perform any scaling itself as this will be done, if necessary, by Wx::AUI::AuiManager itself. If some pane in the returned vector doesn’t already exist, i.e. there is no pane with the matching name, #create_pane_window is called to allow creating it on the fly.

Returns:

  • (Array<Wx::AuiPaneLayoutInfo>)


760
# File 'lib/wx/doc/gen/aui/aui_manager.rb', line 760

def load_panes; end