| |
- WindowDrag
class WindowDrag |
|
Mix-in class providing ability to drag a top-level parent window
In other words, you can use this class as a mix-in
to create an object something like a title bar in a
wxFrame. You must call InitWindowDrag( ... )
to initialize the window-dragging functionality. |
|
Methods defined here:
- GetWindowDragParent(self)
- Get the parent altered by the window dragger
- InitWindowDrag(self, parent=None)
- Initialise our dragging event bindings and the like
Note: you need to call
WindowDragBind( self )
for each control/window which should be
able to drag the parent window.
- OnWindowDragCaptureLost(self, event)
- Handle unexpected loss of capture during moving (or expected loss for that matter)
- OnWindowDragMouseDown(self, event)
- Capture the mouse and start moving the window
- OnWindowDragMouseMove(self, event)
- Handle a drag of the title bar, moving our parent
Note: currently this does not adjust for the "real world"
size of the desktop, so the window can wind up stuck underneath
the Windows taskbar or similar intrusion onto the desktop.
- OnWindowDragMouseUp(self, event)
- On the release of the mouse, release our capture and exit
- SetWindowDragParent(self, parent=None)
- Set the parent windowdrag will control, using our nearest managed parent if not given
- WindowDragBind(self, control=None)
- Bind necessary mouse & capture events for a given control
| |