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
165
166#ifndef vtkSliderWidget_h
167#define vtkSliderWidget_h
168
169#include "vtkAbstractWidget.h"
170#include "vtkInteractionWidgetsModule.h" // For export macro
171#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
172
173VTK_ABI_NAMESPACE_BEGIN
175
176class VTKINTERACTIONWIDGETS_EXPORT VTK_MARSHALAUTO vtkSliderWidget : public vtkAbstractWidget
177{
178public:
183
185
189 void PrintSelf(ostream& os, vtkIndent indent) override;
191
201
206 {
207 return reinterpret_cast<vtkSliderRepresentation*>(this->WidgetRep);
208 }
209
211
218 vtkSetClampMacro(AnimationMode, int, AnimateOff, Animate);
219 vtkGetMacro(AnimationMode, int);
224
226
230 vtkSetClampMacro(NumberOfAnimationSteps, int, 1, VTK_INT_MAX);
231 vtkGetMacro(NumberOfAnimationSteps, int);
233
238
239protected:
241 ~vtkSliderWidget() override = default;
242
243 // These are the events that are handled
247 void AnimateSlider(int selectionState);
248
249 // Manage the state of the widget
257
266
267private:
268 vtkSliderWidget(const vtkSliderWidget&) = delete;
269 void operator=(const vtkSliderWidget&) = delete;
270};
271
272VTK_ABI_NAMESPACE_END
273#endif
void SetWidgetRepresentation(vtkWidgetRepresentation *r)
vtkWidgetRepresentation * WidgetRep
a simple class to control print indentation
Definition vtkIndent.h:108
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