Inherits from
- baseClass: enthought.tvtk.pyface.ui.wx.wxVTKRenderWindowInteractor.baseClass
Attributes
- USE_STEREO
class variable that can also be used to request instances that use stereo; this is overridden by the stereo=1/0 parameter. If you set it to True, the NEXT instantiated object will attempt to allocate a stereo visual. E.g.: wxVTKRenderWindowInteractor.USE_STEREO = True myRWI = wxVTKRenderWindowInteractor(parent, -1)
USE_STEREO = False
Method summary
- __getattr__(self, attr)
- __init__(self, parent, ID, *args, **kw)
- BindEvents(self)
- CreateTimer(self, obj, evt)
- CursorChangedEvent(self, obj, evt)
- DestroyTimer(self, obj, evt)
- GetDisplayId(self)
- GetRenderWindow(self)
- HideCursor(self)
- OnButtonDown(self, event)
- OnButtonUp(self, event)
- OnEnter(self, event)
- OnKeyDown(self, event)
- OnKeyUp(self, event)
- OnLeave(self, event)
- OnMotion(self, event)
- OnMouseCaptureLost(self, event)
- OnMouseWheel(self, event)
- OnPaint(self, event)
- OnSize(self, event)
- Render(self)
- SetRenderWhenDisabled(self, newValue)
- ShowCursor(self)
Methods
- __getattr__(self, attr)
Makes the object behave like a vtkGenericRenderWindowInteractor.
- __init__(self, parent, ID, *args, **kw)
Default class constructor.
Parameters
- parent
- parent window
- ID
- window identifier
- kw
- wxPython keywords (position, size, style) plus the 'stereo' keyword
- BindEvents(self)
Binds all the necessary events for navigation, sizing, drawing.
- CreateTimer(self, obj, evt)
Creates a timer.
- CursorChangedEvent(self, obj, evt)
Called when the CursorChangedEvent fires on the render window.
- DestroyTimer(self, obj, evt)
The timer is a one shot timer so will expire automatically.
- GetDisplayId(self)
Function to get X11 Display ID from WX and return it in a format that can be used by VTK Python.
We query the X11 Display with a new call that was added in wxPython 2.6.0.1. The call returns a SWIG object which we can query for the address and subsequently turn into an old-style SWIG-mangled string representation to pass to VTK.
- GetRenderWindow(self)
Returns the render window (vtkRenderWindow).
- HideCursor(self)
Hides the cursor.
- OnButtonDown(self, event)
Handles the wx.EVT_LEFT/RIGHT/MIDDLE_DOWN events for wxVTKRenderWindowInteractor.
- OnButtonUp(self, event)
Handles the wx.EVT_LEFT/RIGHT/MIDDLE_UP events for wxVTKRenderWindowInteractor.
- OnEnter(self, event)
Handles the wx.EVT_ENTER_WINDOW event for wxVTKRenderWindowInteractor.
- OnKeyDown(self, event)
Handles the wx.EVT_KEY_DOWN event for wxVTKRenderWindowInteractor.
- OnKeyUp(self, event)
Handles the wx.EVT_KEY_UP event for wxVTKRenderWindowInteractor.
- OnLeave(self, event)
Handles the wx.EVT_LEAVE_WINDOW event for wxVTKRenderWindowInteractor.
- OnMotion(self, event)
Handles the wx.EVT_MOTION event for wxVTKRenderWindowInteractor.
- OnMouseCaptureLost(self, event)
This is signalled when we lose mouse capture due to an external event, such as when a dialog box is shown. See the wx documentation.
- OnMouseWheel(self, event)
Handles the wx.EVT_MOUSEWHEEL event for wxVTKRenderWindowInteractor.
- OnPaint(self, event)
Handles the wx.EVT_PAINT event for wxVTKRenderWindowInteractor.
- OnSize(self, event)
Handles the wx.EVT_SIZE event for wxVTKRenderWindowInteractor.
- Render(self)
Actually renders the VTK scene on screen.
- SetRenderWhenDisabled(self, newValue)
Change value of __RenderWhenDisabled ivar.
If __RenderWhenDisabled is false (the default), this widget will not call Render() on the RenderWindow if the top level frame (i.e. the containing frame) has been disabled.
This prevents recursive rendering during wx.SafeYield() calls. wx.SafeYield() can be called during the ProgressMethod() callback of a VTK object to have progress bars and other GUI elements updated - it does this by disabling all windows (disallowing user-input to prevent re-entrancy of code) and then handling all outstanding GUI events.
However, this often triggers an OnPaint() method for wxVTKRWIs, resulting in a Render(), resulting in Update() being called whilst still in progress.
- ShowCursor(self)
Shows the cursor.