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
51#ifndef vtkContinuousValueWidget_h
52#define vtkContinuousValueWidget_h
53
54#include "vtkAbstractWidget.h"
55#include "vtkDeprecation.h" // For VTK_DEPRECATED_IN_9_2_0
56#include "vtkInteractionWidgetsModule.h" // For export macro
57#include "vtkLegacy.h" // for VTK_LEGACY_REMOVE
58
59VTK_ABI_NAMESPACE_BEGIN
61
62class VTKINTERACTIONWIDGETS_EXPORT vtkContinuousValueWidget : public vtkAbstractWidget
63{
64public:
66
70 void PrintSelf(ostream& os, vtkIndent indent) override;
72
79 {
80 this->Superclass::SetWidgetRepresentation(reinterpret_cast<vtkWidgetRepresentation*>(r));
81 }
82
90
92
95 double GetValue();
96 void SetValue(double v);
98
99protected:
101 ~vtkContinuousValueWidget() override = default;
102
103 // These are the events that are handled
107
108 // Manage the state of the widget
111 {
112 Start = 0,
114 Adjusting
115 };
116#if !defined(VTK_LEGACY_REMOVE)
117 VTK_DEPRECATED_IN_9_2_0("because leading underscore is reserved")
119#endif
120
121 double Value;
122
123private:
125 void operator=(const vtkContinuousValueWidget&) = delete;
126};
127
128VTK_ABI_NAMESPACE_END
129#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)