VTK  9.5.2
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
56
57#ifndef vtkSliderWidget_h
58#define vtkSliderWidget_h
59
60#include "vtkAbstractWidget.h"
61#include "vtkInteractionWidgetsModule.h" // For export macro
62#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
63
64VTK_ABI_NAMESPACE_BEGIN
66
67class VTKINTERACTIONWIDGETS_EXPORT VTK_MARSHALAUTO vtkSliderWidget : public vtkAbstractWidget
68{
69public:
74
76
80 void PrintSelf(ostream& os, vtkIndent indent) override;
82
92
97 {
98 return reinterpret_cast<vtkSliderRepresentation*>(this->WidgetRep);
99 }
100
102
109 vtkSetClampMacro(AnimationMode, int, AnimateOff, Animate);
110 vtkGetMacro(AnimationMode, int);
115
117
121 vtkSetClampMacro(NumberOfAnimationSteps, int, 1, VTK_INT_MAX);
122 vtkGetMacro(NumberOfAnimationSteps, int);
124
129
130protected:
132 ~vtkSliderWidget() override = default;
133
134 // These are the events that are handled
138 void AnimateSlider(int selectionState);
139
140 // Manage the state of the widget
148
157
158private:
159 vtkSliderWidget(const vtkSliderWidget&) = delete;
160 void operator=(const vtkSliderWidget&) = delete;
161};
162
163VTK_ABI_NAMESPACE_END
164#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:161
#define VTK_MARSHALAUTO