SourceForge.net wxAuiManager

wxAuiManager

wxAuiManager

Creation Parameters
wxAuiManager is the central class of the wxAUI class framework.

See also Advanced User Interface overview.

wxAuiManager manages the panes associated with it for a particular wxFrame, using a pane's wxAuiPaneInfo information to determine each pane's docking and floating behavior. wxAuiManager uses wxWidgets' sizer mechanism to plan the layout of each frame. It uses a replaceable dock art class (not yet implemented in wxEuphoria v0.11) to do all drawing, so all drawing is localized in one area, and may be customized depending on an application's specific needs.

wxAuiManager works as follows: the programmer adds panes to the class, or makes changes to existing pane properties (dock position, floating state, show state, etc.). To apply these changes, wxAuiManager's Update() function is called. This batch processing can be used to avoid flicker, by modifying more than one pane at a time, and then "committing" all of the changes at once by calling Update().

Panes can be added quite easily:

 constant text1 = create( wxTextCtrl, parent )
 constant text2 = create( wxTextCtrl, parent )

 add_pane_simple( manager, text1, wxLEFT, "Pane Caption" )
 add_pane_simple( manager, text1, wxBOTTOM, "Pane Caption" )
 update_aui( manager )

Later on, the positions can be modified easily. The following will float an existing pane in a tool window:

 aui_float( get_pane( manager, text1 ) )

Layers, Rows and Directions, Positions

Inside wxAUI, the docking layout is figured out by checking several pane parameters. Four of these are important for determining where a pane will end up:

Direction: Each docked pane has a direction, Top, Bottom, Left, Right, or Center. This is fairly self-explanatory. The pane will be placed in the location specified by this variable.

Position: More than one pane can be placed inside of a dock. Imagine two panes being docked on the left side of a window. One pane can be placed over another. In proportionally managed docks, the pane position indicates its sequential position, starting with zero. So, in our scenario with two panes docked on the left side, the top pane in the dock would have position 0, and the second one would occupy position 1.

Row: A row can allow for two docks to be placed next to each other. One of the most common places for this to happen is in the toolbar. Multiple toolbar rows are allowed, the first row being row 0, and the second row 1. Rows can also be used on vertically docked panes.

Layer: A layer is akin to an onion. Layer 0 is the very center of the managed pane. Thus, if a pane is in layer 0, it will be closest to the center window (also sometimes known as the "content window"). Increasing layers "swallow up" all layers of a lower value. This can look very similar to multiple rows, but is different because all panes in a lower level yield to panes in higher levels.

Functions/Procedures
Supertopics

wxAuiManager

[proc]
add_pane_simple
( atom manager, atom win, atom direction, sequence caption )

Category: wxAuiManager


wxAuiManager

[proc]
add_pane_with_info
( atom manager, atom win, atom pane_info )

Category: wxAuiManager


wxAuiManager

[proc]
add_pane_with_pos
( atom manager, atom win, atom pane_info, atom x, atom y )

Category: wxAuiManager


wxAuiManager

[func]
detach_pane
( atom manager, atom window )

Category: wxAuiManager


wxAuiManager

[func]
get_managed_window
( atom manager )

Category: wxAuiManager


wxAuiManager

[func]
get_manager
( atom window )

Category: wxAuiManager


wxAuiManager

[func]
get_pane
( atom manager, atom window )

Category: wxAuiManager


wxAuiManager

[proc]
hide_hint
( atom manager )

Category: wxAuiManager


wxAuiManager

[func]
insert_pane
( atom manager, atom window, atom insert_location, atom insert_level )

Category: wxAuiManager

This routine is used to insert either a previously unmanaged pane window into the frame manager, or to insert a currently managed pane somewhere else. InsertPane will push all panes, rows, or docks aside and insert the window into the position specified by insert_location. Because insert_location can specify either a pane, dock row, or dock layer, the insert_level parameter is used to disambiguate this. The parameter insert_level can take a value of:


wxAuiManager

[proc]
load_pane_info
( atom manager, sequence pane_part, atom pane )

Category: wxAuiManager


wxAuiManager

[func]
load_perspective
( atom manager, sequence perspective, atom update )

Category: wxAuiManager


wxAuiManager

[func]
save_pane_info
( atom manager, atom pane )

Category: wxAuiManager


wxAuiManager

[func]
save_perspective
( atom manager )

Category: wxAuiManager


wxAuiManager

[proc]
set_art_provider
( atom manager, atom art_provider )

Category: wxAuiManager


wxAuiManager

[proc]
set_aui_flags
( atom manager, atom flags )

Category: wxAuiManager


wxAuiManager

[proc]
set_dock_size_constraint
( atom manager, atom widthpct, atom heightpct )

Category: wxAuiManager


wxAuiManager

[proc]
set_managed_window
( atom manager, atom managed_wnd )

Category: wxAuiManager


wxAuiManager

[proc]
uninit_aui
( atom manager )

Category: wxAuiManager


wxAuiManager

[proc]
update_aui
( atom manager )

Category: wxAuiManager

This method is called after any number of changes are made to any of the managed panes. update_aui() must be invoked after adding or inserting a pane ( add_pane_simple(), add_pane_with_info(), add_pane_with_pos, insert_pane() )are called in order to "realize" or "commit" the changes. In addition, any number of changes may be made to wxAuiPaneInfo structures (retrieved with get_pane() ), but to realize the changes, update_aui() must be called. This construction allows pane flicker to be avoided by updating the whole layout at one time.