Section: Visualization Toolkit Widget 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 (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 vtkSliderWidget'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 vtkSliderWidget 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 vtkSliderWidget, simply invoke its constructor as follows
obj = vtkSliderWidget
obj
is an instance of the vtkSliderWidget class.
string = obj.GetClassName ()
- Standard macros.
int = obj.IsA (string name)
- Standard macros.
vtkSliderWidget = obj.NewInstance ()
- Standard macros.
vtkSliderWidget = obj.SafeDownCast (vtkObject o)
- Standard macros.
obj.SetRepresentation (vtkSliderRepresentation r)
- Control the behavior of the slider when selecting the tube or caps. If
Jump, then selecting the tube, left cap, or right cap causes the slider to
jump to the selection point. If the mode is Animate, the slider moves
towards the selection point in NumberOfAnimationSteps number of steps.
If Off, then the slider does not move.
obj.SetAnimationMode (int )
- Control the behavior of the slider when selecting the tube or caps. If
Jump, then selecting the tube, left cap, or right cap causes the slider to
jump to the selection point. If the mode is Animate, the slider moves
towards the selection point in NumberOfAnimationSteps number of steps.
If Off, then the slider does not move.
int = obj.GetAnimationModeMinValue ()
- Control the behavior of the slider when selecting the tube or caps. If
Jump, then selecting the tube, left cap, or right cap causes the slider to
jump to the selection point. If the mode is Animate, the slider moves
towards the selection point in NumberOfAnimationSteps number of steps.
If Off, then the slider does not move.
int = obj.GetAnimationModeMaxValue ()
- Control the behavior of the slider when selecting the tube or caps. If
Jump, then selecting the tube, left cap, or right cap causes the slider to
jump to the selection point. If the mode is Animate, the slider moves
towards the selection point in NumberOfAnimationSteps number of steps.
If Off, then the slider does not move.
int = obj.GetAnimationMode ()
- Control the behavior of the slider when selecting the tube or caps. If
Jump, then selecting the tube, left cap, or right cap causes the slider to
jump to the selection point. If the mode is Animate, the slider moves
towards the selection point in NumberOfAnimationSteps number of steps.
If Off, then the slider does not move.
obj.SetAnimationModeToOff ()
- Control the behavior of the slider when selecting the tube or caps. If
Jump, then selecting the tube, left cap, or right cap causes the slider to
jump to the selection point. If the mode is Animate, the slider moves
towards the selection point in NumberOfAnimationSteps number of steps.
If Off, then the slider does not move.
obj.SetAnimationModeToJump ()
- Control the behavior of the slider when selecting the tube or caps. If
Jump, then selecting the tube, left cap, or right cap causes the slider to
jump to the selection point. If the mode is Animate, the slider moves
towards the selection point in NumberOfAnimationSteps number of steps.
If Off, then the slider does not move.
obj.SetAnimationModeToAnimate ()
- Specify the number of animation steps to take if the animation mode
is set to animate.
obj.SetNumberOfAnimationSteps (int )
- Specify the number of animation steps to take if the animation mode
is set to animate.
int = obj.GetNumberOfAnimationStepsMinValue ()
- Specify the number of animation steps to take if the animation mode
is set to animate.
int = obj.GetNumberOfAnimationStepsMaxValue ()
- Specify the number of animation steps to take if the animation mode
is set to animate.
int = obj.GetNumberOfAnimationSteps ()
- Specify the number of animation steps to take if the animation mode
is set to animate.
obj.CreateDefaultRepresentation ()
- Create the default widget representation if one is not set.