vtkmodules.gtk.GtkGLExtVTKRenderWindowInteractor¶
Description:
Provides a pyGtk vtkRenderWindowInteractor widget. This embeds a vtkRenderWindow inside a GTK widget and uses the vtkGenericRenderWindowInteractor for the event handling. This is similar to GtkVTKRenderWindowInteractor.py.
The extensions here allow the use of gtkglext rather than gtkgl and pygtk-2 rather than pygtk-0. It requires pygtk-2.0.0 or later.
There is a working example at the bottom.
Credits:
John Hunter jdhunter@ace.bsd.uchicago.edu developed and tested this code based on VTK’s GtkVTKRenderWindow.py and extended it to work with pygtk-2.0.0.
License:
VTK license.
Module Contents¶
Classes¶
Embeds a vtkRenderWindow into a pyGTK widget and uses vtkGenericRenderWindowInteractor for the event handling. This class embeds the RenderWindow correctly. A getattr hook is provided that makes the class behave like a vtkGenericRenderWindowInteractor. |
Functions¶
API¶
- class vtkmodules.gtk.GtkGLExtVTKRenderWindowInteractor.GtkGLExtVTKRenderWindowInteractor(*args)¶
Bases:
gtk.gtkgl.DrawingAreaEmbeds a vtkRenderWindow into a pyGTK widget and uses vtkGenericRenderWindowInteractor for the event handling. This class embeds the RenderWindow correctly. A getattr hook is provided that makes the class behave like a vtkGenericRenderWindowInteractor.
Initialization
- set_size_request(w, h)¶
- ConnectSignals()¶
- __getattr__(attr)¶
Makes the object behave like a vtkGenericRenderWindowInteractor
- CreateTimer(obj, event)¶
- DestroyTimer(obj, event)¶
The timer is a one shot timer so will expire automatically.
- GetRenderWindow()¶
- Render()¶
- OnRealize(*args)¶
- OnConfigure(widget, event)¶
- OnExpose(*args)¶
- OnDestroy(event=None)¶
- _GetCtrlShift(event)¶
- OnButtonDown(wid, event)¶
Mouse button pressed.
- OnButtonUp(wid, event)¶
Mouse button released.
- OnMouseMove(wid, event)¶
Mouse has moved.
- OnEnter(wid, event)¶
Entering the vtkRenderWindow.
- OnLeave(wid, event)¶
Leaving the vtkRenderWindow.
- OnKeyPress(wid, event)¶
Key pressed.
- OnKeyRelease(wid, event)¶
Key released.
- Initialize()¶
- SetPicker(picker)¶
- GetPicker(picker)¶
- vtkmodules.gtk.GtkGLExtVTKRenderWindowInteractor.main()¶