VTK  9.3.0
vtkContinuousValueWidget.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-FileCopyrightText: Copyright 2008 Sandia Corporation
3// SPDX-License-Identifier: LicenseRef-BSD-3-Clause-Sandia-USGov
4
48#ifndef vtkContinuousValueWidget_h
49#define vtkContinuousValueWidget_h
50
51#include "vtkAbstractWidget.h"
52#include "vtkDeprecation.h" // For VTK_DEPRECATED_IN_9_2_0
53#include "vtkInteractionWidgetsModule.h" // For export macro
54#include "vtkLegacy.h" // for VTK_LEGACY_REMOVE
55
56VTK_ABI_NAMESPACE_BEGIN
58
59class VTKINTERACTIONWIDGETS_EXPORT vtkContinuousValueWidget : public vtkAbstractWidget
60{
61public:
63
67 void PrintSelf(ostream& os, vtkIndent indent) override;
69
76 {
77 this->Superclass::SetWidgetRepresentation(reinterpret_cast<vtkWidgetRepresentation*>(r));
78 }
79
84 {
85 return reinterpret_cast<vtkContinuousValueWidgetRepresentation*>(this->WidgetRep);
86 }
87
89
92 double GetValue();
93 void SetValue(double v);
95
96protected:
98 ~vtkContinuousValueWidget() override = default;
99
100 // These are the events that are handled
104
105 // Manage the state of the widget
108 {
109 Start = 0,
111 Adjusting
112 };
113#if !defined(VTK_LEGACY_REMOVE)
114 VTK_DEPRECATED_IN_9_2_0("because leading underscore is reserved")
116#endif
117
118 double Value;
119
120private:
122 void operator=(const vtkContinuousValueWidget&) = delete;
123};
124
125VTK_ABI_NAMESPACE_END
126#endif
define the API for widget / widget representation
vtkWidgetRepresentation * WidgetRep
provide the representation for a continuous value
set a value by manipulating something
vtkContinuousValueWidgetRepresentation * GetContinuousValueWidgetRepresentation()
Return the representation as a vtkContinuousValueWidgetRepresentation.
static void MoveAction(vtkAbstractWidget *)
void SetValue(double v)
Get the value for this widget.
void PrintSelf(ostream &os, vtkIndent indent) override
Standard macros.
static void SelectAction(vtkAbstractWidget *)
~vtkContinuousValueWidget() override=default
double GetValue()
Get the value for this widget.
static void EndSelectAction(vtkAbstractWidget *)
void SetRepresentation(vtkContinuousValueWidgetRepresentation *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 interface between the widget and widget representation classes
#define VTK_DEPRECATED_IN_9_2_0(reason)