Section: Visualization Toolkit Geo Vis Classes
.SECTION Event Bindings By default, the widget responds to the following VTK events (i.e., it watches the vtkRenderWindowInteractor for these events): <pre> If the slider bead is selected: LeftButtonPressEvent - select slider LeftButtonReleaseEvent - release slider MouseMoveEvent - move slider </pre>
Note that the event bindings described above can be changed using this class's vtkWidgetEventTranslator. This class translates VTK events into the vtkCompassWidget's widget events: <pre> vtkWidgetEvent::Select -- some part of the widget has been selected vtkWidgetEvent::EndSelect -- the selection process has completed vtkWidgetEvent::Move -- a request for slider motion has been invoked </pre>
In turn, when these widget events are processed, the vtkCompassWidget invokes the following VTK events on itself (which observers can listen for): <pre> vtkCommand::StartInteractionEvent (on vtkWidgetEvent::Select) vtkCommand::EndInteractionEvent (on vtkWidgetEvent::EndSelect) vtkCommand::InteractionEvent (on vtkWidgetEvent::Move) </pre>
To create an instance of class vtkCompassWidget, simply invoke its constructor as follows
obj = vtkCompassWidget
obj is an instance of the vtkCompassWidget class.
string = obj.GetClassName () - Standard macros.
int = obj.IsA (string name) - Standard macros.
vtkCompassWidget = obj.NewInstance () - Standard macros.
vtkCompassWidget = obj.SafeDownCast (vtkObject o) - Standard macros.
obj.SetRepresentation (vtkCompassRepresentation r) - Create the default widget representation if one is not set.
obj.CreateDefaultRepresentation () - Create the default widget representation if one is not set.
double = obj.GetHeading () - Get the value for this widget.
obj.SetHeading (double v) - Get the value for this widget.
double = obj.GetTilt () - Get the value for this widget.
obj.SetTilt (double t) - Get the value for this widget.
double = obj.GetDistance () - Get the value for this widget.
obj.SetDistance (double t) - Get the value for this widget.