framemanager.AuiManager

Inheritance diagram for AuiManager:


digraph inheritancece5158ad5a {
rankdir=LR;
size="8.0, 12.0";
  "framemanager.AuiManager" [style="setlinewidth(0.5)",URL="#framemanager.AuiManager",fontname=Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans,height=0.25,shape=box,fontsize=10];
  "wx._core.EvtHandler" -> "framemanager.AuiManager" [arrowsize=0.5,style="setlinewidth(0.5)"];
  "wx._core.EvtHandler" [shape=box,style="setlinewidth(0.5)",fontsize=10,fontname=Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans,height=0.25];
  "wx._core.Object" -> "wx._core.EvtHandler" [arrowsize=0.5,style="setlinewidth(0.5)"];
  "wx._core.Object" [shape=box,style="setlinewidth(0.5)",fontsize=10,fontname=Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans,height=0.25];
}


Description

AuiManager manages the panes associated with it for a particular L{wx.Frame}, using a pane’s L{AuiPaneInfo} information to determine each pane’s docking and floating behavior. AuiManager uses wxPython’s sizer mechanism to plan the layout of each frame. It uses a replaceable dock art class to do all drawing, so all drawing is localized in one area, and may be customized depending on an applications’ specific needs.

AuiManager 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, AuiManager’s L{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:

text1 = wx.TextCtrl(self, -1)
text2 = wx.TextCtrl(self, -1)
self._mgr.AddPane(text1, AuiPaneInfo().Left().Caption("Pane Number One"))
self._mgr.AddPane(text2, AuiPaneInfo().Bottom().Caption("Pane Number Two"))

self._mgr.Update()

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

self._mgr.GetPane(text1).Float()

Layers, Rows and Directions, Positions:

Inside AUI, 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 to 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 it’s 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 in row 0, and the second in 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. The best way to understand layers is by running the AUI sample (AUIDemo.py).

Methods Summary

Class API

Methods

class AuiManager(managed_window=None, flags=None)

Bases: wx._core.EvtHandler

AuiManager manages the panes associated with it for a particular L{wx.Frame}, using a pane’s L{AuiPaneInfo} information to determine each pane’s docking and floating behavior. AuiManager uses wxPython’s sizer mechanism to plan the layout of each frame. It uses a replaceable dock art class to do all drawing, so all drawing is localized in one area, and may be customized depending on an applications’ specific needs.

AuiManager 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, AuiManager’s L{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:

text1 = wx.TextCtrl(self, -1)
text2 = wx.TextCtrl(self, -1)
self._mgr.AddPane(text1, AuiPaneInfo().Left().Caption("Pane Number One"))
self._mgr.AddPane(text2, AuiPaneInfo().Bottom().Caption("Pane Number Two"))

self._mgr.Update()

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

self._mgr.GetPane(text1).Float()

Layers, Rows and Directions, Positions:

Inside AUI, 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 to 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 it’s 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 in row 0, and the second in 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. The best way to understand layers is by running the AUI sample (AUIDemo.py).

__init__()

Default class constructor.

Parameters:
  • managed_window – specifies the window which should be managed.
  • flags – specifies options which allow the frame management behavior to be modified. flags can be a combination of the following style bits:
Flag name Description
AUI_MGR_ALLOW_FLOATING Allow floating of panes
AUI_MGR_ALLOW_ACTIVE_PANE If a pane becomes active, “highlight” it in the interface
AUI_MGR_TRANSPARENT_DRAG If the platform supports it, set transparency on a floating pane while it is dragged by the user
AUI_MGR_TRANSPARENT_HINT If the platform supports it, show a transparent hint window when the user is about to dock a floating pane
AUI_MGR_VENETIAN_BLINDS_HINT Show a “venetian blind” effect when the user is about to dock a floating pane
AUI_MGR_RECTANGLE_HINT Show a rectangle hint effect when the user is about to dock a floating pane
AUI_MGR_HINT_FADE If the platform supports it, the hint window will fade in and out
AUI_MGR_NO_VENETIAN_BLINDS_FADE Disables the “venetian blind” fade in and out
AUI_MGR_LIVE_RESIZE Live resize when the user drag a sash

Default value for flags is: AUI_MGR_DEFAULT = AUI_MGR_ALLOW_FLOATING |

AUI_MGR_TRANSPARENT_HINT | AUI_MGR_HINT_FADE | AUI_MGR_NO_VENETIAN_BLINDS_FADE
ActivatePane(window)

Activates the pane to which window is associated.

Parameter:window – a L{wx.Window} derived window.
AddPane(window, arg1=None, arg2=None)

Tells the frame manager to start managing a child window. There are three versions of this function. The first verison allows the full spectrum of pane parameter possibilities (AddPane1). The second version is used for simpler user interfaces which do not require as much configuration (AddPane2). The last version allows a drop position to be specified, which will determine where the pane will be added.

In wxPython, simply call AddPane.

Parameters:
  • window – the child window to manage;
  • arg1 – a L{AuiPaneInfo} or an integer value (direction);
  • arg2 – a L{AuiPaneInfo} or a L{wx.Point} (drop position).
AddPane1(window, pane_info)
See comments on L{AddPane}.
AddPane2(window, direction, caption)
See comments on L{AddPane}.
AddPane3(window, pane_info, drop_pos)
See comments on L{AddPane}.
CalculateDockSizerLimits(dock)

Calculates the minimum and maximum sizes allowed for the input dock.

Parameter:dock – the L{AuiDockInfo} structure to analyze.
CalculateHintRect(pane_window, pt, offset)

CalculateHintRect() calculates the drop hint rectangle.

The method first calls L{DoDrop} to determine the exact position the pane would be at were if dropped. If the pane would indeed become docked at the specified drop point, the the rectangle hint will be returned in screen coordinates. Otherwise, an empty rectangle is returned.

Parameters:
  • pane_window – it is the window pointer of the pane being dragged;
  • pt – is the mouse position, in client coordinates;
  • offset – describes the offset that the mouse is from the upper-left corner of the item being dragged.
CalculatePaneSizerLimits(dock, pane)

Calculates the minimum and maximum sizes allowed for the input pane.

Parameters:
  • dock – the L{AuiDockInfo} structure to which pane belongs to;
  • pane – a L{AuiPaneInfo} class for which calculation are requested.
CanDockPanel(p)

Returns whether a pane can be docked or not.

Parameter:p – the L{AuiPaneInfo} class with all the pane’s information.
CanUseModernDockArt()
Returns whether L{dockart.ModernDockArt} can be used (Windows XP only, requires Mark Hammonds’s pywin32 package).
CheckMovableSizer(part)

Checks if a UI part can be actually resized.

Parameter:part – a UI part.
ClosePane(pane_info)

ClosePane() destroys or hides the pane depending on its flags.

Parameter:pane_info – a L{AuiPaneInfo} instance.
CopyTarget(target)

Copies all the attributes of the input target into another L{AuiPaneInfo}.

Parameter:target – the source L{AuiPaneInfo} from where to copy attributes.
CreateFloatingFrame(parent, pane_info)

Creates a floating frame for the windows.

Parameters:
  • parent – the floating frame parent
  • pane_info – the L{AuiPaneInfo} class with all the pane’s information.
CreateGuideWindows()
Creates the VS2005 HUD guide windows.
CreateHintWindow()
Creates the standard wxAUI hint window.
CreateNotebook()
Creates an automatic L{auibook.AuiNotebook} when a pane is docked on top of another pane.
DestroyGuideWindows()
Destroys the VS2005 HUD guide windows.
DestroyHintWindow()
Destroys the standard wxAUI hint window.
DetachPane(window)

DetachPane() tells the L{AuiManager} to stop managing the pane specified by window. The window, if in a floated frame, is reparented to the frame managed by AuiManager.

Parameter:window – the window to be un-managed by the AuiManager.
DoDrop(docks, panes, target, pt, offset=wx.Point(0, 0))

DoDrop() is an important function. It basically takes a mouse position, and determines where the panes new position would be. If the pane is to be dropped, it performs the drop operation using the specified dock and pane arrays. By specifying copy dock and pane arrays when calling, a “what-if” scenario can be performed, giving precise coordinates for drop hints.

Parameters:
  • docks – a list of L{AuiDockInfo} classes;
  • panes – a list of L{AuiPaneInfo} instances;
  • pt – a mouse position to check for a drop operation;
  • offset – a possible offset from the input point pt.
DoDropFloatingPane(docks, panes, target, pt)

Handles the situation in which the dropped pane contains a normal window.

Parameters:
  • docks – a list of L{AuiDockInfo} classes;
  • panes – a list of L{AuiPaneInfo} instances;
  • target – the target pane containing the window;
  • pt – a mouse position to check for a drop operation.
DoDropLayer(docks, target, dock_direction)

Handles the situation in which target is a single dock guide.

Parameters:
  • docks – a list of L{AuiDockInfo} classes;
  • target – the target pane;
  • dock_direction – the docking direction.
DoDropNonFloatingPane(docks, panes, target, pt)

Handles the situation in which the dropped pane is not floating.

Parameters:
  • docks – a list of L{AuiDockInfo} classes;
  • panes – a list of L{AuiPaneInfo} instances;
  • target – the target pane containing the toolbar;
  • pt – a mouse position to check for a drop operation.
DoDropPane(panes, target, dock_direction, dock_layer, dock_row, dock_pos)

Drop a pane in the interface.

Parameters:
  • panes – a list of L{AuiPaneInfo} classes;
  • target – the target pane;
  • dock_direction – the docking direction;
  • dock_layer – the docking layer;
  • dock_row – the docking row;
  • dock_pos – the docking position.
DoDropRow(panes, target, dock_direction, dock_layer, dock_row)

Insert a row in the interface before dropping.

Parameters:
  • panes – a list of L{AuiPaneInfo} classes;
  • target – the target pane;
  • dock_direction – the docking direction;
  • dock_layer – the docking layer;
  • dock_row – the docking row.
DoDropToolbar(docks, panes, target, pt, offset)

Handles the situation in which the dropped pane contains a toolbar.

Parameters:
  • docks – a list of L{AuiDockInfo} classes;
  • panes – a list of L{AuiPaneInfo} instances;
  • target – the target pane containing the toolbar;
  • pt – a mouse position to check for a drop operation;
  • offset – a possible offset from the input point pt.
DoEndResizeAction(event)

Ends a resize action, or for live update, resizes the sash.

Parameter:event – a L{wx.MouseEvent} to be processed.
DoFrameLayout()
DoFrameLayout() is an internal function which invokes L{wx.Sizer.Layout} on the frame’s main sizer, then measures all the various UI items and updates their internal rectangles. This should always be called instead of calling self._managed_window.Layout() directly.
DrawHintRect(pane_window, pt, offset)

DrawHintRect() calculates the hint rectangle by calling L{CalculateHintRect}. If there is a rectangle, it shows it by calling L{ShowHint}, otherwise it hides any hint rectangle currently shown.

Parameters:
  • pane_window – it is the window pointer of the pane being dragged;
  • pt – is the mouse position, in client coordinates;
  • offset – describes the offset that the mouse is from the upper-left corner of the item being dragged.
DrawPaneButton(dc, part, pt)

Draws a pane button in the caption (convenience function).

Parameters:
  • dc – a L{wx.DC} device context object;
  • part – the UI part to analyze;
  • pt – a L{wx.Point} object, specifying the mouse location.
GetAllPanes()
Returns a reference to all the pane info structures.
GetArtProvider()
Returns the current art provider being used.
GetAttributes(pane)

Returns all the attributes of a L{AuiPaneInfo}.

Parameter:pane – a L{AuiPaneInfo} instance.
GetDockPixelOffset(test)

GetDockPixelOffset() is an internal function which returns a dock’s offset in pixels from the left side of the window (for horizontal docks) or from the top of the window (for vertical docks). This value is necessary for calculating fixed-pane/toolbar offsets when they are dragged.

Parameter:test – a fake L{AuiPaneInfo} for testing purposes.
GetDockSizeConstraint()

Returns the current dock constraint values.

See L{SetDockSizeConstraint} for more information.

GetFlags()
Returns the current manager’s flags.
GetFrame()
Deprecated, use L{GetManagedWindow} instead.
GetManagedWindow()
Returns the window being managed by L{AuiManager}.
static GetManager(window)

This function will return the aui manager for a given window.

Parameter:window – this parameter should be any child window or grand-child window (and so on) of the frame/window managed by L{AuiManager}. The window does not need to be managed by the manager itself, nor does it even need to be a child or sub-child of a managed window. It must however be inside the window hierarchy underneath the managed window.
GetNotebooks()
Returns all the automatic L{auibook.AuiNotebook} in the L{AuiManager}.
GetOppositeDockTotalSize(docks, direction)

Returns the dimensions of the dock which lives opposite of the input dock.

Parameters:
  • docks – a list of L{AuiDockInfo} structures to analyze;
  • direction – the direction in which to look for the opposite dock.
GetPane(item)

GetPane() looks up a L{AuiPaneInfo} structure based on the supplied window pointer. Upon failure, GetPane() returns an empty L{AuiPaneInfo}, a condition which can be checked by calling L{AuiPaneInfo.IsOk()}.

The pane info’s structure may then be modified. Once a pane’s info is modified, L{AuiManager.Update()} must be called to realize the changes in the UI.

Parameter:item – either a pane name or a L{wx.Window}.

@note: AG: added to handle 2 different versions of GetPane() for wxPython.

GetPaneByName(name)

This version of L{GetPane()} looks up a pane based on a ‘pane name’, see below comment for more info.

Parameter:name – the pane name.
GetPaneByWidget(window)

This version of L{GetPane()} looks up a pane based on a ‘pane window’, see below comment for more info.

Parameter:window – a L{wx.Window} derived window.
GetPanePart(wnd)

GetPanePart() looks up the pane border UI part of the pane specified. This allows the caller to get the exact rectangle of the pane in question, including decorations like caption and border.

Parameter:wnd – the window to which the pane border belongs to.
GetPanePositionsAndSizes(dock)

Returns all the panes positions and sizes in a dock.

Parameter:dock – a L{AuiDockInfo} instance.
GetPartSizerRect(uiparts)

Returns the rectangle surrounding the specified UI parts.

Parameter:uiparts – UI parts.
GetPartnerDock(dock)

Returns the partner dock for the input dock.

Parameter:dock – a L{AuiDockInfo} instance.
GetPartnerPane(dock, pane)

Returns the partner pane for the input pane. They both need to live in the same L{AuiDockInfo}.

Parameters:
  • dock – a L{AuiDockInfo} instance;
  • pane – a L{AuiPaneInfo} class.
GetSnapPosition()
Returns the main frame snapping position.
GetTotalPixsizeAndProportion(dock)

Returns the dimensions and proportion of the input dock.

Parameter:dock – the L{AuiDockInfo} structure to analyze.
HideHint()
Hides a transparent window hint if there is one.
HitTest(x, y)

HitTest() is an internal function which determines which UI item the specified coordinates are over.

Parameter:(x, y) – specify a position in client coordinates.
InsertPane(window, pane_info, insert_level=0)

InsertPane() 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 pane_info. Because pane_info 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 AUI_INSERT_PANE, AUI_INSERT_ROW or AUI_INSERT_DOCK.

Parameters:
  • window – the window to be inserted and managed;
  • pane_info – the insert location for the new window;
  • insert_level – the insertion level of the new pane.
IsPaneButtonVisible(part)

Returns whether a pane button in the pane caption is visible.

Parameter:part – the UI part to analyze.
LayoutAddDock(cont, dock, uiparts, spacer_only)

Adds a dock into the existing layout.

Parameters:
  • cont – a L{wx.Sizer} object;
  • dock – the L{AuiDockInfo} structure to add to the layout;
  • uiparts – a list of UI parts in the interface;
  • spacer_only – whether to add a simple spacer or a real window.
LayoutAddPane(cont, dock, pane, uiparts, spacer_only)

Adds a pane into the existing layout (in an existing dock).

Parameters:
  • cont – a L{wx.Sizer} object;
  • dock – the L{AuiDockInfo} structure in which to add the pane;
  • pane – the L{AuiPaneInfo} instance to add to the dock;
  • uiparts – a list of UI parts in the interface;
  • spacer_only – whether to add a simple spacer or a real window.
LayoutAll(panes, docks, uiparts, spacer_only=False, oncheck=True)

Layouts all the UI structures in the interface.

Parameters:
  • panes – a list of L{AuiPaneInfo} instances;
  • docks – a list of L{AuiDockInfo} classes;
  • uiparts – a list of UI parts in the interface;
  • spacer_only – whether to add a simple spacer or a real window;
  • oncheck – whether to store the results in a class member or not.
LoadPaneInfo(pane_part, pane)

LoadPaneInfo() is similar to to L{LoadPerspective}, with the exception that it only loads information about a single pane. It is used in combination with L{SavePaneInfo()}.

Parameters:
  • pane_part – the string to analyze;
  • pane – the L{AuiPaneInfo} structure in which to load pane_part.
LoadPerspective(layout, update=True)

LoadPerspective() loads a layout which was saved with L{SavePerspective()} If the update flag parameter is True, L{AuiManager.Update()} will be automatically invoked, thus realizing the saved perspective on screen.

Parameters:
  • layout – a string which contains a saved AUI layout;
  • update – whether to update immediately the GUI or not.
MaximizePane(pane_info)

MaximizePane() maximizes the input pane.

Parameter:pane_info – a L{AuiPaneInfo} instance.
MinimizePane(paneInfo)

Minimizes a pane in a newly and automatically created L{auibar.AuiToolBar}.

Clicking on the minimize button causes a new L{auibar.AuiToolBar} to be created and added to the frame manager, (currently the implementation is such that panes at West will have a toolbar at the right, panes at South will have toolbars at the bottom etc...) and the pane is hidden in the manager.

Clicking on the restore button on the newly created toolbar will result in the toolbar being removed and the original pane being restored.

Parameter:paneInfo – a L{AuiPaneInfo} instance for the pane to be minimized.
OnCaptionDoubleClicked(pane_window)

Handles the mouse double click on the pane caption.

Parameter:pane_window – a L{wx.Window} derived window, managed by the pane.
OnCaptureLost(event)

Handles the wx.EVT_MOUSE_CAPTURE_LOST event for L{AuiManager}.

Parameter:event – a L{wx.MouseCaptureLostEvent} to be processed.
OnChildFocus(event)

Handles the wx.EVT_CHILD_FOCUS event for L{AuiManager}.

Parameter:event – a L{wx.ChildFocusEvent} to be processed.
OnEraseBackground(event)

Handles the wx.EVT_ERASE_BACKGROUND event for L{AuiManager}. This is intentiobnally empty (excluding wxMAC) to reduce flickering while drawing.

Parameter:event – L{wx.EraseEvent} to be processed.
OnFindManager(event)

Handles the EVT_AUI_FIND_MANAGER event for L{AuiManager}.

Parameter:event – a EVT_AUI_FIND_MANAGER event to be processed.
OnFloatingPaneActivated(wnd)

Handles the activation event of a floating pane.

:param wnd a L{wx.Window} derived window, managed by the pane.

OnFloatingPaneClosed(wnd, event)

Handles the close event of a floating pane.

:param wnd a L{wx.Window} derived window, managed by the pane; :param event: a L{wx.CloseEvent} to be processed.

OnFloatingPaneMoved(wnd, event)

Handles the move event of a floating pane.

:param wnd a L{wx.Window} derived window, managed by the pane; :param event: a L{wx.MoveEvent} to be processed.

OnFloatingPaneResized(wnd, size)

Handles the resizing of a floating pane.

:param wnd a L{wx.Window} derived window, managed by the pane; :param size: a L{wx.Size} object, specifying the new pane floating size.

OnGripperClicked(pane_window, start, offset)

Handles the mouse click on the pane gripper.

Parameters:
  • pane_window – a L{wx.Window} derived window, managed by the pane;
  • start – a L{wx.Point} object, specifying the clicking position;
  • offset – an offset point from the start position.
OnHintFadeTimer(event)

Handles the wx.EVT_TIMER event for L{AuiManager}.

Parameter:event – a L{wx.TimerEvent} to be processed.
OnLeaveWindow(event)

Handles the wx.EVT_LEAVE_WINDOW event for L{AuiManager}.

Parameter:event – a L{wx.MouseEvent} to be processed.
OnLeftDClick(event)

Handles the wx.EVT_LEFT_DCLICK event for L{AuiManager}.

Parameter:event – a L{wx.MouseEvent} to be processed.
OnLeftDown(event)

Handles the wx.EVT_LEFT_DOWN event for L{AuiManager}.

Parameter:event – a L{wx.MouseEvent} to be processed.
OnLeftUp(event)

Handles the wx.EVT_LEFT_UP event for L{AuiManager}.

Parameter:event – a L{wx.MouseEvent} to be processed.
OnLeftUp_ClickButton(event)

Sub-handler for the L{OnLeftUp} event.

Parameter:event – a L{wx.MouseEvent} to be processed.
OnLeftUp_DragFloatingPane(event)

Sub-handler for the L{OnLeftUp} event.

Parameter:event – a L{wx.MouseEvent} to be processed.
OnLeftUp_DragToolbarPane(event)

Sub-handler for the L{OnLeftUp} event.

Parameter:event – a L{wx.MouseEvent} to be processed.
OnLeftUp_Resize(event)

Sub-handler for the L{OnLeftUp} event.

Parameter:event – a L{wx.MouseEvent} to be processed.
OnMotion(event)

Handles the wx.EVT_MOTION event for L{AuiManager}.

Parameter:event – a L{wx.MouseEvent} to be processed.
OnMotion_ClickCaption(event)

Sub-handler for the L{OnMotion} event.

Parameter:event – a L{wx.MouseEvent} to be processed.
OnMotion_DragFloatingPane(event)

Sub-handler for the L{OnMotion} event.

Parameter:event – a L{wx.MouseEvent} to be processed.
OnMotion_DragToolbarPane(event)

Sub-handler for the L{OnMotion} event.

Parameter:event – a L{wx.MouseEvent} to be processed.
OnMotion_Other(event)

Sub-handler for the L{OnMotion} event.

Parameter:event – a L{wx.MouseEvent} to be processed.
OnMotion_Resize(event)

Sub-handler for the L{OnMotion} event.

Parameter:event – a L{wx.MouseEvent} to be processed.
OnMove(event)

Handles the wx.EVT_MOVE event for L{AuiManager}.

Parameter:event – a L{wx.MoveEvent} to be processed.
OnPaint(event)

Handles the wx.EVT_PAINT event for L{AuiManager}.

Parameter:event – an instance of L{wx.PaintEvent} to be processed.
OnPaneButton(event)

Handles the EVT_AUI_PANE_BUTTON event for L{AuiManager}.

Parameter:event – a EVT_AUI_PANE_BUTTON to be processed.
OnRender(event)

OnRender() draws all of the pane captions, sashes, backgrounds, captions, grippers, pane borders and buttons. It renders the entire user interface.

Parameter:event – an instance of L{AuiManagerEvent}.
OnRestoreMinimizedPane(event)

Handles the EVT_AUI_PANE_MIN_RESTORE event for L{AuiManager}.

Parameter:event – an instance of EVT_AUI_PANE_MIN_RESTORE to be processed.
OnSetCursor(event)

Handles the wx.EVT_SET_CURSOR event for L{AuiManager}.

Parameter:event – a L{wx.SetCursorEvent} to be processed.
OnSize(event)

Handles the wx.EVT_SIZE event for L{AuiManager}.

Parameter:event – a L{wx.SizeEvent} to be processed.
OnTabBeginDrag(event)

Handles the L{auibook.EVT_AUINOTEBOOK_BEGIN_DRAG} event.

Parameter:event – a L{auibook.EVT_AUINOTEBOOK_BEGIN_DRAG} event.
OnTabPageClose(event)

Handles the L{auibook.EVT_AUINOTEBOOK_PAGE_CLOSE} event.

Parameter:event – a L{auibook.EVT_AUINOTEBOOK_PAGE_CLOSE} event.
OnTabSelected(event)

Handles the L{auibook.EVT_AUINOTEBOOK_PAGE_CHANGED} event.

Parameter:event – a L{auibook.EVT_AUINOTEBOOK_PAGE_CHANGED} event.
PaneFromTabEvent(event)

Returns a L{AuiPaneInfo} from a L{auibook.AuiNotebookEvent} event.

Parameter:event – a L{auibook.AuiNotebookEvent} event.
PaneHitTest(panes, pt)

Similar to L{HitTest}, but it checks in which L{AuiPaneInfo} rectangle the input point belongs to.

Parameters:
  • panes – a list of L{AuiPaneInfo} instances;
  • pt – a L{wx.Point} object.
ProcessDockResult(target, new_pos)

ProcessDockResult() is a utility function used by DoDrop() - it checks if a dock operation is allowed, the new dock position is copied into the target info. If the operation was allowed, the function returns True.

Parameters:
  • target – the L{AuiPaneInfo} instance to be docked;
  • new_pos – the new docking position if the docking operation is allowed.
ProcessMgrEvent(event)

Process the AUI events sent to the manager.

Parameter:event – the event to process.
RefreshButton(part)

Refreshes a pane button in the caption.

Parameter:part – the UI part to analyze.
RefreshCaptions()
Refreshes all pane captions.
Render(dc)

Render() fires a render event, which is normally handled by L{AuiManager.OnRender}. This allows the render function to be overridden via the render event.

This can be useful for painting custom graphics in the main window. Default behavior can be invoked in the overridden function by calling OnRender().

Parameter:dc – : a L{wx.DC} device context object.
RepositionPane(pane, wnd_pos, wnd_size)

Repositions a pane after the main frame has been moved/resized.

Parameters:
  • pane – a L{AuiPaneInfo} instance;
  • wnd_pos – the main frame position;
  • wnd_size – the main frame size.
RestoreMaximizedPane()
Restores the current maximized pane (if any).
RestoreMinimizedPane(paneInfo)

Restores a previously minimized pane.

Parameter:paneInfo – a L{AuiPaneInfo} instance for the pane to be restored.
RestorePane(pane_info)

RestorePane() restores the input pane from a previous maximized or minimized state.

Parameter:pane_info – a L{AuiPaneInfo} instance.
SavePaneInfo(pane)

SavePaneInfo() is similar to L{SavePerspective}, with the exception that it only saves information about a single pane. It is used in combination with L{LoadPaneInfo()}.

Parameter:pane – a L{AuiPaneInfo} instance to save.
SavePerspective()
Saves the entire user interface layout into an encoded string, which can then be stored by the application (probably using wx.Config). When a perspective is restored using L{LoadPerspective()}, the entire user interface will return to the state it was when the perspective was saved.
SetArtProvider(art_provider)

Instructs AuiManager to use art provider specified by the parameter art_provider for all drawing calls. This allows plugable look-and-feel features.

The previous art provider object, if any, will be deleted by L{AuiManager}.

Parameter:art_provider – a AUI dock art provider.
SetAttributes(pane, attrs)

Sets all the attributes contained in attrs to a L{AuiPaneInfo}.

Parameters:
  • pane – a L{AuiPaneInfo} instance;
  • attrs – a list of attributes.
SetDockSizeConstraint(width_pct, height_pct)

When a user creates a new dock by dragging a window into a docked position, often times the large size of the window will create a dock that is unwieldly large.

L{AuiManager} by default limits the size of any new dock to 1/3 of the window size. For horizontal docks, this would be 1/3 of the window height. For vertical docks, 1/3 of the width. Calling this function will adjust this constraint value.

The numbers must be between 0.0 and 1.0. For instance, calling SetDockSizeContraint with 0.5, 0.5 will cause new docks to be limited to half of the size of the entire managed window.

Parameters:
  • width_pct – a float number representing the x dock size constraint;
  • width_pct – a float number representing the y dock size constraint.
SetFlags(flags)

This method is used to specify AuiManager’s settings flags.

Parameter:flags – specifies options which allow the frame management behavior to be modified. flags can be one of the following style bits:
Flag name Description
AUI_MGR_ALLOW_FLOATING Allow floating of panes
AUI_MGR_ALLOW_ACTIVE_PANE If a pane becomes active, “highlight” it in the interface
AUI_MGR_TRANSPARENT_DRAG If the platform supports it, set transparency on a floating pane while it is dragged by the user
AUI_MGR_TRANSPARENT_HINT If the platform supports it, show a transparent hint window when the user is about to dock a floating pane
AUI_MGR_VENETIAN_BLINDS_HINT Show a “venetian blind” effect when the user is about to dock a floating pane
AUI_MGR_RECTANGLE_HINT Show a rectangle hint effect when the user is about to dock a floating pane
AUI_MGR_HINT_FADE If the platform supports it, the hint window will fade in and out
AUI_MGR_NO_VENETIAN_BLINDS_FADE Disables the “venetian blind” fade in and out
AUI_MGR_LIVE_RESIZE Live resize when the user drag a sash
SetFrame(managed_window)
Deprecated, use L{SetManagedWindow} instead.
SetManagedWindow(managed_window)

Called to specify the frame or window which is to be managed by L{AuiManager}. Frame management is not restricted to just frames. Child windows or custom controls are also allowed.

Parameter:managed_window – specifies the window which should be managed by the frame manager.
SetMasterManager(manager)

Sets the master manager for an automatic L{auibook.AuiNotebook}.

Parameter:manager – an instance of L{AuiManager}.
SetSnapLimits(x, y)

Modifies the snap limits used when snapping the managed_window to the screen (using L{SnapToScreen}) or when snapping the floating panes to one side of the managed_window (using L{SnapPane}).

To change the limit after which the managed_window or the floating panes are automatically stickled to the screen border (or to the managed_window side), set these two variables. Default values are 15 pixels.

Parameters:
  • x – the minimum horizontal distance below which the snap occurs;
  • x – the minimum vertical distance below which the snap occurs.
ShowHint(rect)

Shows the AUI hint window.

Parameter:rect – the hint rect calculated in advance.
ShowPane(window, show)

Shows or hides a pane based on the window passed as input.

Parameters:
  • window – a L{wx.Window} derived window;
  • show – True to show the pane, False otherwise.
SmartShrink(docks, direction)

Used to intelligently shrink the docks’ size (if needed).

Parameters:
  • docks – a list of L{AuiDockInfo} instances;
  • direction – the direction in which to shrink.
Snap()
Snaps the main frame to specified position on the screen (see L{SnapToScreen}).
SnapPane(pane, pane_pos, pane_size, toSnap=False)

Snaps a floating pane to one of the main frame sides.

Parameters:
  • pane – a L{AuiPaneInfo} instance;
  • pane_pos – the new pane floating position;
  • pane_size – the new pane floating size;
  • toSnap – a bool variable to check if SnapPane was called from a move event.
SnapToScreen(snap=True, monitor=0, hAlign=32, vAlign=64)

Snaps the main frame to specified position on the screen.

Parameters:
  • snap – whether to snap the main frame or not;
  • monitor – the monitor display in which snapping the window;
  • hAlign – the horizontal alignment of the snapping position;
  • vAlign – the vertical alignment of the snapping position.
SwitchToolBarOrientation(pane)

Switches the toolbar orientation from vertical to horizontal and vice-versa. This is especially useful for vertical docked toolbars once they float.

Parameter:pane – an instance of L{AuiPaneInfo}, which may have a L{auibar.AuiToolBar} window associated with it.
UnInit()

Uninitializes the framework and should be called before a managed frame or window is destroyed. UnInit() is usually called in the managed wx.Frame’s destructor.

It is necessary to call this function before the managed frame or window is destroyed, otherwise the manager cannot remove its custom event handlers from a window.

Update()

This method is called after any number of changes are made to any of the managed panes. Update() must be invoked after L{AddPane} or L{InsertPane} are called in order to “realize” or “commit” the changes.

In addition, any number of changes may be made to L{AuiPaneInfo} structures (retrieved with L{AuiManager.GetPane}), but to realize the changes, Update() must be called. This construction allows pane flicker to be avoided by updating the whole layout at one time.

UpdateButtonOnScreen(button_ui_part, event)

Updates/redraws the UI part containing a pane button.

Parameters:
  • button_ui_part – the UI part the button belongs to;
  • event – a L{wx.MouseEvent} to be processed.
UpdateDockingGuides(paneInfo)

Updates the docking guide windows positions and appearance.

Parameter:paneInfo – a L{AuiPaneInfo} instance.
UpdateNotebook()
Updates the automatic L{auibook.AuiNotebook} in the layout (if any).

Table Of Contents

This Page