VTK  9.3.0
vtkCenteredSliderWidget.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
62#ifndef vtkCenteredSliderWidget_h
63#define vtkCenteredSliderWidget_h
64
65#include "vtkAbstractWidget.h"
66#include "vtkDeprecation.h" // For VTK_DEPRECATED_IN_9_2_0
67#include "vtkInteractionWidgetsModule.h" // For export macro
68#include "vtkLegacy.h" // for VTK_LEGACY_REMOVE
69
70VTK_ABI_NAMESPACE_BEGIN
72
73class VTKINTERACTIONWIDGETS_EXPORT vtkCenteredSliderWidget : public vtkAbstractWidget
74{
75public:
80
82
86 void PrintSelf(ostream& os, vtkIndent indent) override;
88
95 {
96 this->Superclass::SetWidgetRepresentation(reinterpret_cast<vtkWidgetRepresentation*>(r));
97 }
98
103 {
104 return reinterpret_cast<vtkSliderRepresentation*>(this->WidgetRep);
105 }
106
111
115 double GetValue() { return this->Value; }
116
117protected:
119 ~vtkCenteredSliderWidget() override = default;
120
121 // These are the events that are handled
126
127 // Manage the state of the widget
130 {
131 Start = 0,
132 Sliding
133 };
134#if !defined(VTK_LEGACY_REMOVE)
135 VTK_DEPRECATED_IN_9_2_0("because leading underscore is reserved")
137#endif
138
141 double StartTime;
142 double Value;
143
144private:
146 void operator=(const vtkCenteredSliderWidget&) = delete;
147};
148
149VTK_ABI_NAMESPACE_END
150#endif
define the API for widget / widget representation
vtkWidgetRepresentation * WidgetRep
set a value by manipulating a slider
void PrintSelf(ostream &os, vtkIndent indent) override
Standard macros.
static vtkCenteredSliderWidget * New()
Instantiate the class.
void CreateDefaultRepresentation() override
Create the default widget representation if one is not set.
double GetValue()
Get the value fo this widget.
static void MoveAction(vtkAbstractWidget *)
static void TimerAction(vtkAbstractWidget *)
~vtkCenteredSliderWidget() override=default
static void EndSelectAction(vtkAbstractWidget *)
static void SelectAction(vtkAbstractWidget *)
vtkSliderRepresentation * GetSliderRepresentation()
Return the representation as a vtkSliderRepresentation.
void SetRepresentation(vtkSliderRepresentation *r)
Specify an instance of vtkWidgetRepresentation used to represent this widget in the scene.
a simple class to control print indentation
Definition vtkIndent.h:29
abstract class defines the representation for a vtkSliderWidget
abstract class defines interface between the widget and widget representation classes
#define VTK_DEPRECATED_IN_9_2_0(reason)