Package diffpy :: Package pdfgui :: Package gui :: Module PyAUI :: Class FrameManager
[hide private]
[frames] | no frames]

Class FrameManager

source code

     object --+        
              |        
wx._core.Object --+    
                  |    
wx._core.EvtHandler --+
                      |
                     FrameManager

Instance Methods [hide private]
 
__init__(self, frame=None, flags=None)
Default Class Constructor.
source code
 
GetPaneByWidget(self, window)
This version of GetPane() looks up a pane based on a 'pane window', see below comment for more info.
source code
 
GetPaneByName(self, name)
This version of GetPane() looks up a pane based on a 'pane name', see below comment for more info.
source code
 
GetPane(self, item)
GetPane() looks up a PaneInfo structure based on the supplied window pointer.
source code
 
GetAllPanes(self)
GetAllPanes() returns a reference to all the pane info structures.
source code
 
HitTest(self, x, y)
HitTest() is an internal function which determines which UI item the specified coordinates are over (x,y) specify a position in client coordinates.
source code
 
SetFlags(self, flags)
SetFlags() is used to specify FrameManager's settings flags.
source code
 
GetFlags(self)
GetFlags() returns the current manager's flags.
source code
 
SetFrame(self, frame)
SetFrame() is usually called once when the frame manager class is being initialized.
source code
 
GetFrame(self)
GetFrame() returns the frame pointer being managed by FrameManager.
source code
 
UnInit(self)
UnInit() must be called, usually in the destructor of the frame class.
source code
 
GetArtProvider(self)
GetArtProvider() returns the current art provider being used.
source code
 
ProcessMgrEvent(self, event) source code
 
CanMakeWindowsTransparent(self) source code
 
MakeWindowTransparent(self, wnd, amount) source code
 
SetArtProvider(self, art_provider)
SetArtProvider() instructs FrameManager to use the specified art provider for all drawing calls.
source code
 
AddPane(self, window, arg1=None, arg2=None)
AddPane() tells the frame manager to start managing a child window.
source code
 
AddPane1(self, window, pane_info) source code
 
AddPane2(self, window, direction, caption) source code
 
InsertPane(self, 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.
source code
 
DetachPane(self, window)
DetachPane() tells the FrameManager to stop managing the pane specified by window.
source code
 
SavePerspective(self)
SavePerspective() saves all pane information as a single string.
source code
 
LoadPerspective(self, layout, update=True)
LoadPerspective() loads a layout which was saved with SavePerspective() If the "update" flag parameter is True, the GUI will immediately be updated.
source code
 
GetPanePositionsAndSizes(self, dock)
Returns all the panes positions and sizes.
source code
 
LayoutAddPane(self, cont, dock, pane, uiparts, spacer_only) source code
 
LayoutAddDock(self, cont, dock, uiparts, spacer_only) source code
 
LayoutAll(self, panes, docks, uiparts, spacer_only=False, oncheck=True) source code
 
Update(self)
Update() updates the layout.
source code
 
DoFrameLayout(self)
DoFrameLayout() is an internal function which invokes wxSizer.Layout on the frame's main sizer, then measures all the various UI items and updates their internal rectangles.
source code
 
GetPanePart(self, wnd)
GetPanePart() looks up the pane border UI part of the pane specified.
source code
 
GetDockPixelOffset(self, 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).
source code
 
ProcessDockResult(self, 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.
source code
 
DoDrop(self, docks, panes, target, pt, offset=wx.Point(0, 0))
DoDrop() is an important function.
source code
 
UseTransparentHint(self) source code
 
OnHintFadeTimer(self, event) source code
 
ShowHint(self, rect) source code
 
HideHint(self) source code
 
DrawHintRect(self, pane_window, pt, offset)
DrawHintRect() draws a drop hint rectangle.
source code
 
GetAttributes(self, pane) source code
 
SetAttributes(self, pane, attrs) source code
 
UseTransparentDrag(self) source code
 
OnFloatingPaneMoveStart(self, wnd) source code
 
OnFloatingPaneMoving(self, wnd) source code
 
OnFloatingPaneMoved(self, wnd) source code
 
OnFloatingPaneResized(self, wnd, size) source code
 
OnFloatingPaneClosed(self, wnd) source code
 
OnFloatingPaneActivated(self, wnd) source code
 
Render(self, dc)
Render() draws all of the pane captions, sashes, backgrounds, captions, grippers, pane borders and buttons.
source code
 
Repaint(self, dc=None) source code
 
OnPaint(self, event) source code
 
OnEraseBackground(self, event) source code
 
OnSize(self, event) source code
 
OnSetCursor(self, event) source code
 
UpdateButtonOnScreen(self, button_ui_part, event) source code
 
OnLeftDown(self, event) source code
 
OnLeftUp(self, event) source code
 
OnMotion(self, event) source code
 
OnLeaveWindow(self, event) source code
 
OnChildFocus(self, event) source code
 
OnPaneButton(self, event)
OnPaneButton() is an event handler that is called when a pane button has been pressed.
source code

Inherited from wx._core.EvtHandler: AddPendingEvent, Bind, Connect, Disconnect, GetEvtHandlerEnabled, GetNextHandler, GetPreviousHandler, ProcessEvent, ProcessPendingEvents, SetEvtHandlerEnabled, SetNextHandler, SetPreviousHandler, Unbind, __repr__

Inherited from wx._core.EvtHandler (private): _setOORInfo

Inherited from wx._core.Object: Destroy, GetClassName, IsSameAs

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __str__

Properties [hide private]

Inherited from wx._core.EvtHandler: EvtHandlerEnabled, NextHandler, PreviousHandler, thisown

Inherited from wx._core.Object: ClassName

Inherited from object: __class__

Method Details [hide private]

__init__(self, frame=None, flags=None)
(Constructor)

source code 

Default Class Constructor. frame specifies the wx.Frame which should be managed.
flags specifies options which allow the frame management behavior to be modified.

Returns:
EvtHandler

Overrides: wx._core.EvtHandler.__init__

GetPane(self, item)

source code 

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

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

AG: Added To Handle 2 Different Versions Of GetPane() For
wxPython/Python.         

SetFlags(self, flags)

source code 

SetFlags() is used to specify FrameManager's settings flags. flags specifies
options which allow the frame management behavior to be modified.

SetFrame(self, frame)

source code 

SetFrame() is usually called once when the frame
manager class is being initialized.  "frame" specifies
the frame which should be managed by the frame manager.

UnInit(self)

source code 

UnInit() must be called, usually in the destructor
of the frame class.   If it is not called, usually this
will result in a crash upon program exit.

SetArtProvider(self, art_provider)

source code 

SetArtProvider() instructs FrameManager to use the
specified art provider for all drawing calls.  This allows
plugable look-and-feel features.

AddPane(self, window, arg1=None, arg2=None)

source code 

AddPane() tells the frame manager to start managing a child window. There
are two 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).
In wxPython, simply call AddPane.

InsertPane(self, window, pane_info, insert_level=0)

source code 

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 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
AUI_INSERT_PANE, AUI_INSERT_ROW or AUI_INSERT_DOCK.

DetachPane(self, window)

source code 

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

SavePerspective(self)

source code 

SavePerspective() saves all pane information as a single string.
This string may later be fed into LoadPerspective() to restore
all pane settings.  This save and load mechanism allows an
exact pane configuration to be saved and restored at a later time.

Update(self)

source code 

Update() updates the layout.  Whenever changes are made to
one or more panes, this function should be called.  It is the
external entry point for running the layout engine.

DoFrameLayout(self)

source code 

DoFrameLayout() is an internal function which invokes wxSizer.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._frame.Layout() directly

GetPanePart(self, wnd)

source code 

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.

GetDockPixelOffset(self, test)

source code 

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
fixel-pane/toolbar offsets when they are dragged.

ProcessDockResult(self, target, new_pos)

source code 

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.

DoDrop(self, docks, panes, target, pt, offset=wx.Point(0, 0))

source code 

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.

DrawHintRect(self, pane_window, pt, offset)

source code 

DrawHintRect() draws a drop hint rectangle. First calls DoDrop() to
determine the exact position the pane would be at were if dropped.  If
the pame would indeed become docked at the specified drop point,
DrawHintRect() then calls ShowHint() to indicate this drop rectangle.
"pane_window" is the window pointer of the pane being dragged, pt is
the mouse position, in client coordinates.

Render(self, dc)

source code 

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