AGW Logo

agw_title AuiManager

AuiManager manages the panes associated with it for a particular wx.Frame, using a pane’s 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, the 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 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 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 (AUI.py).

hierarchy Inheritance Diagram

Inheritance diagram for: AuiManager

Inheritance diagram of AuiManager


appearance Control Appearance


AuiManager

AuiManager


method_summary Methods Summary

__init__Default class constructor.
ActivatePaneActivates the pane to which window is associated.
AddPaneTells the frame manager to start managing a child window.
AddPane1See comments on AddPane.
AddPane2See comments on AddPane.
AddPane3See comments on AddPane.
AddPane4See comments on AddPane.
AnimateDockingAnimates the minimization/docking of a pane a la Eclipse, using a wx.ScreenDC
CalculateDockSizerLimitsCalculates the minimum and maximum sizes allowed for the input dock.
CalculateHintRectCalculates the drop hint rectangle.
CalculatePaneSizerLimitsCalculates the minimum and maximum sizes allowed for the input pane.
CanDockPanelReturns whether a pane can be docked or not.
CanUseModernDockArtReturns whether ModernDockArt can be used (Windows XP / Vista / 7 only,
CheckMovableSizerChecks if a UI part can be actually resized.
CheckPaneMoveChecks if a pane has moved by a visible amount.
ClosePaneDestroys or hides the pane depending on its flags.
CopyTargetCopies all the attributes of the input target into another AuiPaneInfo.
CreateFloatingFrameCreates a floating frame for the windows.
CreateGuideWindowsCreates the VS2005 HUD guide windows.
CreateHintWindowCreates the standard wxAUI hint window.
CreateNotebookCreates an automatic AuiNotebook when a pane is docked on
CreateNotebookBaseCreates an auto-notebook base from a pane, and then add that pane as a page.
DestroyGuideWindowsDestroys the VS2005 HUD guide windows.
DestroyHintWindowDestroys the standard wxAUI hint window.
DetachPaneTells the AuiManager to stop managing the pane specified
DoDropThis is an important function.
DoDropFloatingPaneHandles the situation in which the dropped pane contains a normal window.
DoDropLayerHandles the situation in which target is a single dock guide.
DoDropNonFloatingPaneHandles the situation in which the dropped pane is not floating.
DoDropPaneDrop a pane in the interface.
DoDropRowInsert a row in the interface before dropping.
DoDropToolbarHandles the situation in which the dropped pane contains a toolbar.
DoEndResizeActionEnds a resize action, or for live update, resizes the sash.
DoFrameLayoutThis is an internal function which invokes wx.Sizer.Layout
DrawHintRectCalculates the hint rectangle by calling
DrawPaneButtonDraws a pane button in the caption (convenience function).
FireEventFires one of the EVT_AUI_PANE_FLOATED/FLOATING/DOCKING/DOCKED/ACTIVATED event.
GetAGWFlagsReturns the current manager’s flags.
GetAllPanesReturns a reference to all the pane info structures.
GetAnimationStepReturns the animation step speed (a float) to use in AnimateDocking.
GetArtProviderReturns the current art provider being used.
GetAttributesReturns all the attributes of a AuiPaneInfo.
GetAutoNotebookStyleReturns the default AGW-specific window style for automatic notebooks.
GetAutoNotebookTabArtReturns the default tab art provider for automatic notebooks.
GetDockPixelOffsetThis 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).
GetDockSizeConstraintReturns the current dock constraint values.
GetFrameReturns the window being managed by AuiManager.
GetManagedWindowReturns the window being managed by AuiManager.
GetNotebooksReturns all the automatic AuiNotebook in the AuiManager.
GetOppositeDockTotalSizeReturns the dimensions of the dock which lives opposite of the input dock.
GetPaneLooks up a AuiPaneInfo structure based
GetPaneByNameThis version of GetPane looks up a pane based on a
GetPaneByWidgetThis version of GetPane looks up a pane based on a
GetPanePartLooks up the pane border UI part of the
GetPanePositionsAndSizesReturns all the panes positions and sizes in a dock.
GetPartSizerRectReturns the rectangle surrounding the specified UI parts.
GetPartnerDockReturns the partner dock for the input dock.
GetPartnerPaneReturns the partner pane for the input pane.
GetSnapPositionReturns the main frame snapping position.
GetTotalPixSizeAndProportionReturns the dimensions and proportion of the input dock.
HideHintHides a transparent window hint if there is one.
HitTestThis is an internal function which determines
InsertPaneThis method is used to insert either a previously unmanaged pane window into the frame manager, or to insert a currently managed pane somewhere else.
IsPaneButtonVisibleReturns whether a pane button in the pane caption is visible.
LayoutAddDockAdds a dock into the existing layout.
LayoutAddPaneAdds a pane into the existing layout (in an existing dock).
LayoutAllLayouts all the UI structures in the interface.
LoadPaneInfoThis method is similar to to LoadPerspective, with the exception that
LoadPerspectiveLoads a layout which was saved with SavePerspective.
MaximizePaneMaximizes the input pane.
MinimizePaneMinimizes a pane in a newly and automatically created AuiToolBar.
OnCaptionDoubleClickedHandles the mouse double click on the pane caption.
OnCaptureLostHandles the wx.EVT_MOUSE_CAPTURE_LOST event for AuiManager.
OnChildFocusHandles the wx.EVT_CHILD_FOCUS event for AuiManager.
OnEraseBackgroundHandles the wx.EVT_ERASE_BACKGROUND event for AuiManager.
OnFindManagerHandles the EVT_AUI_FIND_MANAGER event for AuiManager.
OnFloatingPaneActivatedHandles the activation event of a floating pane.
OnFloatingPaneClosedHandles the close event of a floating pane.
OnFloatingPaneMovedHandles the move event of a floating pane.
OnFloatingPaneResizedHandles the resizing of a floating pane.
OnGripperClickedHandles the mouse click on the pane gripper.
OnHintFadeTimerHandles the wx.EVT_TIMER event for AuiManager.
OnLeaveWindowHandles the wx.EVT_LEAVE_WINDOW event for AuiManager.
OnLeftDClickHandles the wx.EVT_LEFT_DCLICK event for AuiManager.
OnLeftDownHandles the wx.EVT_LEFT_DOWN event for AuiManager.
OnLeftUpHandles the wx.EVT_LEFT_UP event for AuiManager.
OnLeftUp_ClickButtonSub-handler for the OnLeftUp event.
OnLeftUp_DragFloatingPaneSub-handler for the OnLeftUp event.
OnLeftUp_DragToolbarPaneSub-handler for the OnLeftUp event.
OnLeftUp_ResizeSub-handler for the OnLeftUp event.
OnMotionHandles the wx.EVT_MOTION event for AuiManager.
OnMotion_ClickCaptionSub-handler for the OnMotion event.
OnMotion_DragFloatingPaneSub-handler for the OnMotion event.
OnMotion_DragToolbarPaneSub-handler for the OnMotion event.
OnMotion_OtherSub-handler for the OnMotion event.
OnMotion_ResizeSub-handler for the OnMotion event.
OnMoveHandles the wx.EVT_MOVE event for AuiManager.
OnPaintHandles the wx.EVT_PAINT event for AuiManager.
OnPaneButtonHandles the EVT_AUI_PANE_BUTTON event for AuiManager.
OnPaneDockedHandles the EVT_AUI_PANE_DOCKED event for AuiManager.
OnRenderDraws all of the pane captions, sashes, backgrounds, captions, grippers, pane borders and buttons.
OnRestoreMinimizedPaneHandles the EVT_AUI_PANE_MIN_RESTORE event for AuiManager.
OnSetCursorHandles the wx.EVT_SET_CURSOR event for AuiManager.
OnSizeHandles the wx.EVT_SIZE event for AuiManager.
OnSysColourChangedHandles the wx.EVT_SYS_COLOUR_CHANGED event for AuiManager.
OnTabBeginDragHandles the EVT_AUINOTEBOOK_BEGIN_DRAG event.
OnTabPageCloseHandles the EVT_AUINOTEBOOK_PAGE_CLOSE event.
OnTabSelectedHandles the EVT_AUINOTEBOOK_PAGE_CHANGED event.
PaneFromTabEventReturns a AuiPaneInfo from a AuiNotebookEvent event.
PaneHitTestSimilar to HitTest, but it checks in which AuiPaneInfo rectangle the
ProcessDockResultThis is a utility function used by DoDrop - it checks
ProcessMgrEventProcess the AUI events sent to the manager.
RefreshButtonRefreshes a pane button in the caption.
RefreshCaptionsRefreshes all pane captions.
RemoveAutoNBCaptionRemoves the caption on newly created automatic notebooks.
RenderFires a render event, which is normally handled by
RepaintRepaints the entire frame decorations (sashes, borders, buttons and so on).
RepositionPaneRepositions a pane after the main frame has been moved/resized.
RequestUserAttentionRequests the user attention by intermittently highlighting the pane caption.
RestoreMaximizedPaneRestores the current maximized pane (if any).
RestoreMinimizedPaneRestores a previously minimized pane.
RestorePaneRestores the input pane from a previous maximized or minimized state.
RestrictResizeCommon method between DoEndResizeAction and OnLeftUp_Resize.
SavePaneInfoThis method is similar to SavePerspective, with the exception
SavePerspectiveSaves the entire user interface layout into an encoded string, which can then
SavePreviousDockSizesStores the previous dock sizes, to be used in a “restore” action later.
SetAGWFlagsThis method is used to specify AuiManager‘s settings flags.
SetAnimationStepSets the animation step speed (a float) to use in AnimateDocking.
SetArtProviderInstructs AuiManager to use art provider specified by the parameter
SetAttributesSets all the attributes contained in attrs to a AuiPaneInfo.
SetAutoNotebookStyleSets the default AGW-specific window style for automatic notebooks.
SetAutoNotebookTabArtSets the default tab art provider for automatic notebooks.
SetDockSizeConstraintWhen 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.
SetFrameCalled to specify the frame or window which is to be managed by AuiManager.
SetManagedWindowCalled to specify the frame or window which is to be managed by AuiManager.
SetMasterManagerSets the master manager for an automatic AuiNotebook.
SetSnapLimitsModifies the snap limits used when snapping the managed_window to the screen
ShowHintShows the AUI hint window.
ShowPaneShows or hides a pane based on the window passed as input.
SlideInHandles the wx.EVT_TIMER event for AuiManager.
SlideOutSlides out a preview of a minimized pane.
SmartShrinkUsed to intelligently shrink the docks’ size (if needed).
SmoothDockThis method implements a smooth docking effect for floating panes, similar to
SnapSnaps the main frame to specified position on the screen.
SnapPaneSnaps a floating pane to one of the main frame sides.
SnapToScreenSnaps the main frame to specified position on the screen.
StartPreviewTimerStarts a timer for sliding in and out a minimized pane.
StopPreviewTimerStops a timer for sliding in and out a minimized pane.
SwitchToolBarOrientationSwitches the toolbar orientation from vertical to horizontal and vice-versa.
UnInitUninitializes the framework and should be called before a managed frame or window is destroyed.
UpdateThis method is called after any number of changes are made to any of the managed panes.
UpdateButtonOnScreenUpdates/redraws the UI part containing a pane button.
UpdateDockingGuidesUpdates the docking guide windows positions and appearance.
UpdateNotebookUpdates the automatic AuiNotebook in the layout (if any exists).

API Class API

class AuiManager(wx.EvtHandler)[source]

AuiManager manages the panes associated with it for a particular wx.Frame, using a pane’s 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, the AuiManager.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 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 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 (AUI.py).



__init__(managed_window=None, agwFlags=None)[source]

Default class constructor.

Parameters:
  • managed_window – specifies the window which should be managed;
  • agwFlags – specifies options which allow the frame management behavior to be modified. agwFlags 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
    AUI_MGR_ANIMATE_FRAMES Fade-out floating panes when they are closed (all platforms which support frames transparency) and show a moving rectangle when they are docked (Windows < Vista and GTK only)
    AUI_MGR_AERO_DOCKING_GUIDES Use the new Aero-style bitmaps as docking guides
    AUI_MGR_PREVIEW_MINIMIZED_PANES Slide in and out minimized panes to preview them
    AUI_MGR_WHIDBEY_DOCKING_GUIDES Use the new Whidbey-style bitmaps as docking guides
    AUI_MGR_SMOOTH_DOCKING Performs a “smooth” docking of panes (a la PyQT)
    AUI_MGR_USE_NATIVE_MINIFRAMES Use miniframes with native caption bar as floating panes instead or custom drawn caption bars (forced on wxMac)
    AUI_MGR_AUTONB_NO_CAPTION Panes that merge into an automatic notebook will not have the pane caption visible

    Default value for agwFlags is: AUI_MGR_DEFAULT = AUI_MGR_ALLOW_FLOATING | AUI_MGR_TRANSPARENT_HINT | AUI_MGR_HINT_FADE | AUI_MGR_NO_VENETIAN_BLINDS_FADE

    Note

    If using the AUI_MGR_USE_NATIVE_MINIFRAMES, double-clicking on a floating pane caption will not re-dock the pane, but simply maximize it (if AuiPaneInfo.MaximizeButton() has been set to True) or do nothing.



ActivatePane(window)[source]

Activates the pane to which window is associated.

Parameters:window – a wx.Window derived window.


AddPane(window, arg1=None, arg2=None, target=None)[source]

Tells the frame manager to start managing a child window. There are four 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 AddPane3 version allows a drop position to be specified, which will determine where the pane will be added. The AddPane4 version allows to turn the target AuiPaneInfo pane into a notebook and the added pane into a page.

In wxPython, simply call AddPane.

Parameters:
  • window – the child window to manage;
  • arg1 – a AuiPaneInfo or an integer value (direction);
  • arg2 – a AuiPaneInfo or a wx.Point (drop position);
  • target – a AuiPaneInfo to be turned into a notebook and new pane added to it as a page. (additionally, target can be any pane in an existing notebook)


AddPane1(window, pane_info)[source]

See comments on AddPane.



AddPane2(window, direction, caption)[source]

See comments on AddPane.



AddPane3(window, pane_info, drop_pos)[source]

See comments on AddPane.



AddPane4(window, pane_info, target)[source]

See comments on AddPane.



AnimateDocking(win_rect, pane_rect)[source]

Animates the minimization/docking of a pane a la Eclipse, using a wx.ScreenDC to draw a “moving docking rectangle” on the screen.

Parameters:
  • win_rect – the original pane screen rectangle;
  • pane_rect – the newly created toolbar/pane screen rectangle.

Note

This functionality is not available on wxMAC as this platform doesn’t have the ability to use wx.ScreenDC to draw on-screen and on Windows > Vista.



CalculateDockSizerLimits(dock)[source]

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

Parameters:dock – the AuiDockInfo structure to analyze.


CalculateHintRect(pane_window, pt, offset)[source]

Calculates the drop hint rectangle.

The method first calls 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)[source]

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

Parameters:
  • dock – the AuiDockInfo structure to which pane belongs to;
  • pane – a AuiPaneInfo class for which calculation are requested.


CanDockPanel(p)[source]

Returns whether a pane can be docked or not.

Parameters:p – the AuiPaneInfo class with all the pane’s information.


CanUseModernDockArt()[source]

Returns whether ModernDockArt can be used (Windows XP / Vista / 7 only, requires Mark Hammonds’s pywin32 package).



CheckMovableSizer(part)[source]

Checks if a UI part can be actually resized.

Parameters:part – a UI part.


CheckPaneMove(pane)[source]

Checks if a pane has moved by a visible amount.

Parameters:pane – an instance of AuiPaneInfo.


ClosePane(pane_info)[source]

Destroys or hides the pane depending on its flags.

Parameters:pane_info – a AuiPaneInfo instance.


CopyTarget(target)[source]

Copies all the attributes of the input target into another AuiPaneInfo.

Parameters:target – the source AuiPaneInfo from where to copy attributes.


CreateFloatingFrame(parent, pane_info)[source]

Creates a floating frame for the windows.

Parameters:
  • parent – the floating frame parent;
  • pane_info – the AuiPaneInfo class with all the pane’s information.


CreateGuideWindows()[source]

Creates the VS2005 HUD guide windows.



CreateHintWindow()[source]

Creates the standard wxAUI hint window.



CreateNotebook()[source]

Creates an automatic AuiNotebook when a pane is docked on top of another pane.



CreateNotebookBase(panes, paneInfo)[source]

Creates an auto-notebook base from a pane, and then add that pane as a page.

Parameters:
  • panes – Set of panes to append new notebook base pane to
  • paneInfoAuiPaneInfo instance to convert to new notebook.


DestroyGuideWindows()[source]

Destroys the VS2005 HUD guide windows.



DestroyHintWindow()[source]

Destroys the standard wxAUI hint window.



DetachPane(window)[source]

Tells the AuiManager to stop managing the pane specified by window. The window, if in a floated frame, is reparented to the frame managed by AuiManager.

Parameters:window – the window to be un-managed.


DoDrop(docks, panes, target, pt, offset=wx.Point(0, 0))[source]

This 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 AuiDockInfo classes;
  • panes – a list of 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)[source]

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

Parameters:
  • docks – a list of AuiDockInfo classes;
  • panes – a list of AuiPaneInfo instances;
  • target – the target pane containing the window;
  • pt – a mouse position to check for a drop operation.


DoDropLayer(docks, target, dock_direction)[source]

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

Parameters:
  • docks – a list of AuiDockInfo classes;
  • target – the target pane;
  • dock_direction – the docking direction.


DoDropNonFloatingPane(docks, panes, target, pt)[source]

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

Parameters:
  • docks – a list of AuiDockInfo classes;
  • panes – a list of 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)[source]

Drop a pane in the interface.

Parameters:
  • panes – a list of 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)[source]

Insert a row in the interface before dropping.

Parameters:
  • panes – a list of 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)[source]

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

Parameters:
  • docks – a list of AuiDockInfo classes;
  • panes – a list of 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)[source]

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

Parameters:event – a wx.MouseEvent to be processed.


DoFrameLayout()[source]

This is an internal function which invokes wx.Sizer.Layout on the frame’s main sizer, then measures all the various UI items and updates their internal rectangles.

Note

This should always be called instead of calling self._managed_window.Layout() directly.



DrawHintRect(pane_window, pt, offset)[source]

Calculates the hint rectangle by calling CalculateHintRect. If there is a rectangle, it shows it by calling 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)[source]

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

Parameters:
  • dc – a wx.DC device context object;
  • part – the UI part to analyze;
  • pt – a wx.Point object, specifying the mouse location.



FireEvent(evtType, pane, canVeto=False)[source]

Fires one of the EVT_AUI_PANE_FLOATED/FLOATING/DOCKING/DOCKED/ACTIVATED event.

Parameters:
  • evtType – one of the aforementioned events;
  • pane – the AuiPaneInfo instance associated to this event;
  • canVeto – whether the event can be vetoed or not.


GetAGWFlags()[source]

Returns the current manager’s flags.

See also

SetAGWFlags for a list of possible AuiManager flags.



GetAllPanes()[source]

Returns a reference to all the pane info structures.



GetAnimationStep()[source]

Returns the animation step speed (a float) to use in AnimateDocking.



GetArtProvider()[source]

Returns the current art provider being used.



GetAttributes(pane)[source]

Returns all the attributes of a AuiPaneInfo.

Parameters:pane – a AuiPaneInfo instance.


GetAutoNotebookStyle()[source]

Returns the default AGW-specific window style for automatic notebooks.

See also

SetAutoNotebookStyle method for a list of possible styles.



GetAutoNotebookTabArt()[source]

Returns the default tab art provider for automatic notebooks.



GetDockPixelOffset(test)[source]

This 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.

Parameters:test – a fake AuiPaneInfo for testing purposes.


GetDockSizeConstraint()[source]

Returns the current dock constraint values.



GetFrame()[source]

Returns the window being managed by AuiManager.

Warning

This method is now deprecated, use GetManagedWindow instead.



GetManagedWindow()[source]

Returns the window being managed by AuiManager.



GetNotebooks()[source]

Returns all the automatic AuiNotebook in the AuiManager.



GetOppositeDockTotalSize(docks, direction)[source]

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

Parameters:
  • docks – a list of AuiDockInfo structures to analyze;
  • direction – the direction in which to look for the opposite dock.


GetPane(item)[source]

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

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

Parameters:item – either a pane name or a wx.Window.



GetPaneByName(name)[source]

This version of GetPane looks up a pane based on a ‘pane name’.

Parameters:name – the pane name.

See also

GetPane



GetPaneByWidget(window)[source]

This version of GetPane looks up a pane based on a ‘pane window’.

Parameters:window – a wx.Window derived window.

See also

GetPane



GetPanePart(wnd)[source]

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.

Parameters:wnd – the window to which the pane border belongs to.


GetPanePositionsAndSizes(dock)[source]

Returns all the panes positions and sizes in a dock.

Parameters:dock – a AuiDockInfo instance.


GetPartSizerRect(uiparts)[source]

Returns the rectangle surrounding the specified UI parts.

Parameters:uiparts – UI parts.


GetPartnerDock(dock)[source]

Returns the partner dock for the input dock.

Parameters:dock – a AuiDockInfo instance.


GetPartnerPane(dock, pane)[source]

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

Parameters:


GetSnapPosition()[source]

Returns the main frame snapping position.



GetTotalPixSizeAndProportion(dock)[source]

Returns the dimensions and proportion of the input dock.

Parameters:dock – the AuiDockInfo structure to analyze.


HideHint()[source]

Hides a transparent window hint if there is one.



HitTest(x, y)[source]

This is an internal function which determines which UI item the specified coordinates are over.

Parameters:
  • x – specifies a x position in client coordinates;
  • y – specifies a y position in client coordinates.


InsertPane(window, pane_info, insert_level=AUI_INSERT_PANE)[source]

This method 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)[source]

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

Parameters:part – the UI part to analyze.


LayoutAddDock(cont, dock, uiparts, spacer_only)[source]

Adds a dock into the existing layout.

Parameters:
  • cont – a wx.Sizer object;
  • dock – the 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)[source]

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

Parameters:
  • cont – a wx.Sizer object;

  • dock – the AuiDockInfo structure in which to add the pane;
  • pane – the 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)[source]

Layouts all the UI structures in the interface.

Parameters:
  • panes – a list of AuiPaneInfo instances;
  • docks – a list of 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)[source]

This method is similar to to LoadPerspective, with the exception that it only loads information about a single pane. It is used in combination with SavePaneInfo.

Parameters:
  • pane_part – the string to analyze;
  • pane – the AuiPaneInfo structure in which to load pane_part.


LoadPerspective(layout, update=True)[source]

Loads a layout which was saved with SavePerspective.

If the update flag parameter is True, 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 window or not.


MaximizePane(pane_info, savesizes=True)[source]

Maximizes the input pane.

Parameters:
  • pane_info – a AuiPaneInfo instance.
  • savesizes – whether to save previous dock sizes.


MinimizePane(paneInfo)[source]

Minimizes a pane in a newly and automatically created AuiToolBar.

Clicking on the minimize button causes a new 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.

Parameters:paneInfo – a AuiPaneInfo instance for the pane to be minimized.


OnCaptionDoubleClicked(pane_window)[source]

Handles the mouse double click on the pane caption.

Parameters:pane_window – a wx.Window derived window, managed by the pane.



OnCaptureLost(event)[source]

Handles the wx.EVT_MOUSE_CAPTURE_LOST event for AuiManager.

Parameters:event – a wx.MouseCaptureLostEvent to be processed.


OnChildFocus(event)[source]

Handles the wx.EVT_CHILD_FOCUS event for AuiManager.

Parameters:event – a wx.ChildFocusEvent to be processed.


OnEraseBackground(event)[source]

Handles the wx.EVT_ERASE_BACKGROUND event for AuiManager.

Parameters:eventwx.EraseEvent to be processed.

Note

This is intentionally empty (excluding wxMAC) to reduce flickering while drawing.



OnFindManager(event)[source]

Handles the EVT_AUI_FIND_MANAGER event for AuiManager.

Parameters:event – a AuiManagerEvent event to be processed.


OnFloatingPaneActivated(wnd)[source]

Handles the activation event of a floating pane.

Parameters:wnd – a wx.Window derived window, managed by the pane.



OnFloatingPaneClosed(wnd, event)[source]

Handles the close event of a floating pane.

Parameters:


OnFloatingPaneMoved(wnd, eventOrPt)[source]

Handles the move event of a floating pane.

Parameters:
  • wnd – a wx.Window derived window, managed by the pane;

  • eventOrPt – a wx.MoveEvent to be processed or an instance of wx.Point.



OnFloatingPaneResized(wnd, size)[source]

Handles the resizing of a floating pane.

Parameters:
  • wnd – a wx.Window derived window, managed by the pane;

  • size – a wx.Size object, specifying the new pane floating size.


OnGripperClicked(pane_window, start, offset)[source]

Handles the mouse click on the pane gripper.

Parameters:
  • pane_window – a wx.Window derived window, managed by the pane;

  • start – a wx.Point object, specifying the clicking position;

  • offset – an offset point from the start position.


OnHintFadeTimer(event)[source]

Handles the wx.EVT_TIMER event for AuiManager.

Parameters:event – a wx.TimerEvent to be processed.


OnLeaveWindow(event)[source]

Handles the wx.EVT_LEAVE_WINDOW event for AuiManager.

Parameters:event – a wx.MouseEvent to be processed.



OnLeftDClick(event)[source]

Handles the wx.EVT_LEFT_DCLICK event for AuiManager.

Parameters:event – a wx.MouseEvent to be processed.



OnLeftDown(event)[source]

Handles the wx.EVT_LEFT_DOWN event for AuiManager.

Parameters:event – a wx.MouseEvent to be processed.



OnLeftUp(event)[source]

Handles the wx.EVT_LEFT_UP event for AuiManager.

Parameters:event – a wx.MouseEvent to be processed.



OnLeftUp_ClickButton(event)[source]

Sub-handler for the OnLeftUp event.

Parameters:event – a wx.MouseEvent to be processed.



OnLeftUp_DragFloatingPane(eventOrPt)[source]

Sub-handler for the OnLeftUp event.

Parameters:event – a wx.MouseEvent to be processed.



OnLeftUp_DragToolbarPane(eventOrPt)[source]

Sub-handler for the OnLeftUp event.

Parameters:event – a wx.MouseEvent to be processed.



OnLeftUp_Resize(event)[source]

Sub-handler for the OnLeftUp event.

Parameters:event – a wx.MouseEvent to be processed.



OnMotion(event)[source]

Handles the wx.EVT_MOTION event for AuiManager.

Parameters:event – a wx.MouseEvent to be processed.



OnMotion_ClickCaption(event)[source]

Sub-handler for the OnMotion event.

Parameters:event – a wx.MouseEvent to be processed.



OnMotion_DragFloatingPane(eventOrPt)[source]

Sub-handler for the OnMotion event.

Parameters:event – a wx.MouseEvent to be processed.



OnMotion_DragToolbarPane(eventOrPt)[source]

Sub-handler for the OnMotion event.

Parameters:event – a wx.MouseEvent to be processed.



OnMotion_Other(event)[source]

Sub-handler for the OnMotion event.

Parameters:event – a wx.MouseEvent to be processed.



OnMotion_Resize(event)[source]

Sub-handler for the OnMotion event.

Parameters:event – a wx.MouseEvent to be processed.



OnMove(event)[source]

Handles the wx.EVT_MOVE event for AuiManager.

Parameters:event – a wx.MoveEvent to be processed.


OnPaint(event)[source]

Handles the wx.EVT_PAINT event for AuiManager.

Parameters:event – an instance of wx.PaintEvent to be processed.


OnPaneButton(event)[source]

Handles the EVT_AUI_PANE_BUTTON event for AuiManager.

Parameters:event – a AuiManagerEvent event to be processed.


OnPaneDocked(event)[source]

Handles the EVT_AUI_PANE_DOCKED event for AuiManager.

Parameters:event – an instance of AuiManagerEvent to be processed.


OnRender(event)[source]

Draws all of the pane captions, sashes, backgrounds, captions, grippers, pane borders and buttons. It renders the entire user interface. It binds the EVT_AUI_RENDER event.

Parameters:event – an instance of AuiManagerEvent.


OnRestoreMinimizedPane(event)[source]

Handles the EVT_AUI_PANE_MIN_RESTORE event for AuiManager.

Parameters:event – an instance of AuiManagerEvent to be processed.


OnSetCursor(event)[source]

Handles the wx.EVT_SET_CURSOR event for AuiManager.

Parameters:event – a wx.SetCursorEvent to be processed.


OnSize(event)[source]

Handles the wx.EVT_SIZE event for AuiManager.

Parameters:event – a wx.SizeEvent to be processed.


OnSysColourChanged(event)[source]

Handles the wx.EVT_SYS_COLOUR_CHANGED event for AuiManager.

Parameters:event – a wx.SysColourChangedEvent to be processed.


OnTabBeginDrag(event)[source]

Handles the EVT_AUINOTEBOOK_BEGIN_DRAG event.

Parameters:event – a AuiNotebookEvent event to be processed.


OnTabPageClose(event)[source]

Handles the EVT_AUINOTEBOOK_PAGE_CLOSE event.

Parameters:event – a AuiNotebookEvent event to be processed.


OnTabSelected(event)[source]

Handles the EVT_AUINOTEBOOK_PAGE_CHANGED event.

Parameters:event – a AuiNotebookEvent event to be processed.


PaneFromTabEvent(event)[source]

Returns a AuiPaneInfo from a AuiNotebookEvent event.

Parameters:event – a AuiNotebookEvent event.


PaneHitTest(panes, pt)[source]

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

Parameters:


ProcessDockResult(target, new_pos)[source]

This 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 AuiPaneInfo instance to be docked;
  • new_pos – the new docking position if the docking operation is allowed.


ProcessMgrEvent(event)[source]

Process the AUI events sent to the manager.

Parameters:event – the event to process, an instance of AuiManagerEvent.


RefreshButton(part)[source]

Refreshes a pane button in the caption.

Parameters:part – the UI part to analyze.


RefreshCaptions()[source]

Refreshes all pane captions.



RemoveAutoNBCaption(pane)[source]

Removes the caption on newly created automatic notebooks.

Parameters:pane – an instance of AuiPaneInfo (the target notebook).


Render(dc)[source]

Fires a render event, which is normally handled by 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.

Parameters:dc – a wx.DC device context object.



Repaint(dc=None)[source]

Repaints the entire frame decorations (sashes, borders, buttons and so on). It renders the entire user interface.

Parameters:dc – if not None, an instance of wx.PaintDC.


RepositionPane(pane, wnd_pos, wnd_size)[source]

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

Parameters:
  • pane – a AuiPaneInfo instance;
  • wnd_pos – the main frame position;
  • wnd_size – the main frame size.


RequestUserAttention(pane_window)[source]

Requests the user attention by intermittently highlighting the pane caption.

Parameters:pane_window – a wx.Window derived window, managed by the pane.



RestoreMaximizedPane()[source]

Restores the current maximized pane (if any).



RestoreMinimizedPane(paneInfo)[source]

Restores a previously minimized pane.

Parameters:paneInfo – a AuiPaneInfo instance for the pane to be restored.


RestorePane(pane_info)[source]

Restores the input pane from a previous maximized or minimized state.

Parameters:pane_info – a AuiPaneInfo instance.


RestrictResize(clientPt, screenPt, createDC)[source]

Common method between DoEndResizeAction and OnLeftUp_Resize.



SavePaneInfo(pane)[source]

This method is similar to SavePerspective, with the exception that it only saves information about a single pane. It is used in combination with LoadPaneInfo.

Parameters:pane – a AuiPaneInfo instance to save.


SavePerspective()[source]

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 LoadPerspective, the entire user interface will return to the state it was when the perspective was saved.



SavePreviousDockSizes(pane_info)[source]

Stores the previous dock sizes, to be used in a “restore” action later.

Parameters:pane_info – a AuiPaneInfo instance.


SetAGWFlags(agwFlags)[source]

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

Parameters:agwFlags – specifies options which allow the frame management behavior to be modified. agwFlags 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
AUI_MGR_ANIMATE_FRAMES Fade-out floating panes when they are closed (all platforms which support frames transparency) and show a moving rectangle when they are docked (Windows < Vista and GTK only)
AUI_MGR_AERO_DOCKING_GUIDES Use the new Aero-style bitmaps as docking guides
AUI_MGR_PREVIEW_MINIMIZED_PANES Slide in and out minimized panes to preview them
AUI_MGR_WHIDBEY_DOCKING_GUIDES Use the new Whidbey-style bitmaps as docking guides
AUI_MGR_SMOOTH_DOCKING Performs a “smooth” docking of panes (a la PyQT)
AUI_MGR_USE_NATIVE_MINIFRAMES Use miniframes with native caption bar as floating panes instead or custom drawn caption bars (forced on wxMac)
AUI_MGR_AUTONB_NO_CAPTION Panes that merge into an automatic notebook will not have the pane caption visible

Note

If using the AUI_MGR_USE_NATIVE_MINIFRAMES, double-clicking on a floating pane caption will not re-dock the pane, but simply maximize it (if AuiPaneInfo.MaximizeButton() has been set to True) or do nothing.



SetAnimationStep(step)[source]

Sets the animation step speed (a float) to use in AnimateDocking.

Parameters:step – a floating point value for the animation speed.


SetArtProvider(art_provider)[source]

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

Parameters:art_provider – a AUI dock art provider.

Note

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



SetAttributes(pane, attrs)[source]

Sets all the attributes contained in attrs to a AuiPaneInfo.

Parameters:
  • pane – a AuiPaneInfo instance;
  • attrs – a list of attributes.


SetAutoNotebookStyle(agwStyle)[source]

Sets the default AGW-specific window style for automatic notebooks.

Parameters:agwStyle – the underlying AuiNotebook window style. This can be a combination of the following bits:


Flag name Description
AUI_NB_TOP With this style, tabs are drawn along the top of the notebook
AUI_NB_LEFT With this style, tabs are drawn along the left of the notebook. Not implemented yet.
AUI_NB_RIGHT With this style, tabs are drawn along the right of the notebook. Not implemented yet.
AUI_NB_BOTTOM With this style, tabs are drawn along the bottom of the notebook
AUI_NB_TAB_SPLIT Allows the tab control to be split by dragging a tab
AUI_NB_TAB_MOVE Allows a tab to be moved horizontally by dragging
AUI_NB_TAB_EXTERNAL_MOVE Allows a tab to be moved to another tab control
AUI_NB_TAB_FIXED_WIDTH With this style, all tabs have the same width
AUI_NB_SCROLL_BUTTONS With this style, left and right scroll buttons are displayed
AUI_NB_WINDOWLIST_BUTTON With this style, a drop-down list of windows is available
AUI_NB_CLOSE_BUTTON With this style, a close button is available on the tab bar
AUI_NB_CLOSE_ON_ACTIVE_TAB With this style, a close button is available on the active tab
AUI_NB_CLOSE_ON_ALL_TABS With this style, a close button is available on all tabs
AUI_NB_MIDDLE_CLICK_CLOSE Allows to close AuiNotebook tabs by mouse middle button click
AUI_NB_SUB_NOTEBOOK This style is used by {AuiManager} to create automatic AuiNotebooks
AUI_NB_HIDE_ON_SINGLE_TAB Hides the tab window if only one tab is present
AUI_NB_SMART_TABS Use Smart Tabbing, like Alt + Tab on Windows
AUI_NB_USE_IMAGES_DROPDOWN Uses images on dropdown window list menu instead of check items
AUI_NB_CLOSE_ON_TAB_LEFT Draws the tab close button on the left instead of on the right (a la Camino browser)
AUI_NB_TAB_FLOAT Allows the floating of single tabs. Known limitation: when the notebook is more or less full screen, tabs cannot be dragged far enough outside of the notebook to become floating pages
AUI_NB_DRAW_DND_TAB Draws an image representation of a tab while dragging (on by default)


SetAutoNotebookTabArt(art)[source]

Sets the default tab art provider for automatic notebooks.

Parameters:art – a tab art provider.


SetDockSizeConstraint(width_pct, height_pct)[source]

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.

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 SetDockSizeConstraint 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.


SetFrame(managed_window)[source]

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

Parameters:managed_window – specifies the window which should be managed by the AUI manager.

Warning

This method is now deprecated, use SetManagedWindow instead.



SetManagedWindow(managed_window)[source]

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

Parameters:managed_window – specifies the window which should be managed by the AUI manager.


SetMasterManager(manager)[source]

Sets the master manager for an automatic AuiNotebook.

Parameters:manager – an instance of AuiManager.


SetSnapLimits(x, y)[source]

Modifies the snap limits used when snapping the managed_window to the screen (using SnapToScreen) or when snapping the floating panes to one side of the managed_window (using 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;
  • y – the minimum vertical distance below which the snap occurs.


ShowHint(rect)[source]

Shows the AUI hint window.

Parameters:rect – the hint rect calculated in advance.


ShowPane(window, show)[source]

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

Parameters:
  • window – a wx.Window derived window;

  • showTrue to show the pane, False otherwise.


SlideIn(event)[source]

Handles the wx.EVT_TIMER event for AuiManager.

Parameters:event – a wx.TimerEvent to be processed.

Note

This is used solely for sliding in and out minimized panes.



SlideOut()[source]

Slides out a preview of a minimized pane.

Note

This is used solely for sliding in and out minimized panes.



SmartShrink(docks, direction)[source]

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

Parameters:
  • docks – a list of AuiDockInfo instances;
  • direction – the direction in which to shrink.


SmoothDock(paneInfo)[source]

This method implements a smooth docking effect for floating panes, similar to what the PyQT library does with its floating windows.

Parameters:paneInfo – an instance of AuiPaneInfo.

Note

The smooth docking effect can only be used if you set the AUI_MGR_SMOOTH_DOCKING style to AuiManager.



Snap()[source]

Snaps the main frame to specified position on the screen.

See also

SnapToScreen



SnapPane(pane, pane_pos, pane_size, toSnap=False)[source]

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

Parameters:
  • pane – a 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=wx.RIGHT, vAlign=wx.TOP)[source]

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.


StartPreviewTimer(toolbar)[source]

Starts a timer for sliding in and out a minimized pane.

Parameters:toolbar – the AuiToolBar containing the minimized pane tool.


StopPreviewTimer()[source]

Stops a timer for sliding in and out a minimized pane.



SwitchToolBarOrientation(pane)[source]

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

Parameters:pane – an instance of AuiPaneInfo, which may have a AuiToolBar window associated with it.


UnInit()[source]

Uninitializes the framework and should be called before a managed frame or window is destroyed. UnInit is usually called in the managed wx.Frame / wx.Window 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()[source]

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

In addition, any number of changes may be made to AuiPaneInfo structures (retrieved with 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)[source]

Updates/redraws the UI part containing a pane button.

Parameters:
  • button_ui_part – the UI part the button belongs to;
  • event – a wx.MouseEvent to be processed.



UpdateDockingGuides(paneInfo)[source]

Updates the docking guide windows positions and appearance.

Parameters:paneInfo – a AuiPaneInfo instance.


UpdateNotebook()[source]

Updates the automatic AuiNotebook in the layout (if any exists).

Tree

Table Of Contents

Previous topic

AuiFloatingFrame

Next topic

AuiManagerEvent