Section: Visualization Toolkit Widget Classes
Note that the value should be obtain from the widget, not from the representation. Also note that Minimum and Maximum values are in terms of value per second. The value you get from this widget's GetValue method is multiplied by time.
.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 (if on slider) LeftButtonReleaseEvent - release slider (if selected) MouseMoveEvent - move slider If the end caps or slider tube are selected: LeftButtonPressEvent - move (or animate) to cap or point on tube; </pre>
Note that the event bindings described above can be changed using this class's vtkWidgetEventTranslator. This class translates VTK events into the vtkCenteredSliderWidget'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 vtkCenteredSliderWidget 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 vtkCenteredSliderWidget, simply invoke its constructor as follows
obj = vtkCenteredSliderWidget
obj
is an instance of the vtkCenteredSliderWidget class.
string = obj.GetClassName ()
- Standard macros.
int = obj.IsA (string name)
- Standard macros.
vtkCenteredSliderWidget = obj.NewInstance ()
- Standard macros.
vtkCenteredSliderWidget = obj.SafeDownCast (vtkObject o)
- Standard macros.
obj.SetRepresentation (vtkSliderRepresentation 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.GetValue ()
- Get the value fo this widget.