VTK  9.3.20240424
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 "vtkInteractionWidgetsModule.h" // For export macro
56#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
57
58VTK_ABI_NAMESPACE_BEGIN
60
61class VTKINTERACTIONWIDGETS_EXPORT VTK_MARSHALAUTO vtkContinuousValueWidget
62 : 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
87 {
88 return reinterpret_cast<vtkContinuousValueWidgetRepresentation*>(this->WidgetRep);
89 }
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
117 double Value;
118
119private:
121 void operator=(const vtkContinuousValueWidget&) = delete;
122};
123
124VTK_ABI_NAMESPACE_END
125#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:108
abstract class defines interface between the widget and widget representation classes
#define VTK_MARSHALAUTO