VTK  9.4.20251007
vtkSliderWidget.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
59
60#ifndef vtkSliderWidget_h
61#define vtkSliderWidget_h
62
63#include "vtkAbstractWidget.h"
64#include "vtkInteractionWidgetsModule.h" // For export macro
65#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
66
67VTK_ABI_NAMESPACE_BEGIN
69
70class VTKINTERACTIONWIDGETS_EXPORT VTK_MARSHALAUTO vtkSliderWidget : public vtkAbstractWidget
71{
72public:
77
79
83 void PrintSelf(ostream& os, vtkIndent indent) override;
85
95
100 {
101 return reinterpret_cast<vtkSliderRepresentation*>(this->WidgetRep);
102 }
103
105
112 vtkSetClampMacro(AnimationMode, int, AnimateOff, Animate);
113 vtkGetMacro(AnimationMode, int);
118
120
124 vtkSetClampMacro(NumberOfAnimationSteps, int, 1, VTK_INT_MAX);
125 vtkGetMacro(NumberOfAnimationSteps, int);
127
132
133protected:
135 ~vtkSliderWidget() override = default;
136
137 // These are the events that are handled
141 void AnimateSlider(int selectionState);
142
143 // Manage the state of the widget
151
160
161private:
162 vtkSliderWidget(const vtkSliderWidget&) = delete;
163 void operator=(const vtkSliderWidget&) = delete;
164};
165
166VTK_ABI_NAMESPACE_END
167#endif
void SetWidgetRepresentation(vtkWidgetRepresentation *r)
vtkWidgetRepresentation * WidgetRep
a simple class to control print indentation
Definition vtkIndent.h:29
abstract class defines the representation for a vtkSliderWidget
set a value by manipulating a slider
void CreateDefaultRepresentation() override
Create the default widget representation if one is not set.
void SetAnimationModeToOff()
Control the behavior of the slider when selecting the tube or caps.
void SetAnimationModeToJump()
Control the behavior of the slider when selecting the tube or caps.
void AnimateSlider(int selectionState)
void SetAnimationModeToAnimate()
Control the behavior of the slider when selecting the tube or caps.
vtkSliderRepresentation * GetSliderRepresentation()
Return the representation as a vtkSliderRepresentation.
~vtkSliderWidget() override=default
static void SelectAction(vtkAbstractWidget *)
virtual void SetAnimationMode(int)
Control the behavior of the slider when selecting the tube or caps.
static void EndSelectAction(vtkAbstractWidget *)
void PrintSelf(ostream &os, vtkIndent indent) override
Standard macros.
static vtkSliderWidget * New()
Instantiate the class.
void SetRepresentation(vtkSliderRepresentation *r)
Specify an instance of vtkWidgetRepresentation used to represent this widget in the scene.
static void MoveAction(vtkAbstractWidget *)
abstract class defines interface between the widget and widget representation classes
#define VTK_INT_MAX
Definition vtkType.h:144
#define VTK_MARSHALAUTO