VTK  9.7.1
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 
58 VTK_ABI_NAMESPACE_BEGIN
60 
61 class VTKINTERACTIONWIDGETS_EXPORT VTK_MARSHALAUTO vtkContinuousValueWidget
62  : public vtkAbstractWidget
63 {
64 public:
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 
99 protected:
101  ~vtkContinuousValueWidget() override = default;
102 
103  // These are the events that are handled
104  static void SelectAction(vtkAbstractWidget*);
105  static void EndSelectAction(vtkAbstractWidget*);
106  static void MoveAction(vtkAbstractWidget*);
107 
108  // Manage the state of the widget
111  {
112  Start = 0,
114  Adjusting
115  };
116 
117  double Value;
118 
119 private:
121  void operator=(const vtkContinuousValueWidget&) = delete;
122 };
123 
124 VTK_ABI_NAMESPACE_END
125 #endif
void SetRepresentation(vtkContinuousValueWidgetRepresentation *r)
Specify an instance of vtkWidgetRepresentation used to represent this widget in the scene...
void PrintSelf(ostream &os, vtkIndent indent) override
Standard macros implementing standard VTK methods.
provide the representation for a continuous value
vtkWidgetRepresentation * WidgetRep
a simple class to control print indentation
Definition: vtkIndent.h:28
define the API for widget / widget representation
set a value by manipulating something
vtkContinuousValueWidgetRepresentation * GetContinuousValueWidgetRepresentation()
Return the representation as a vtkContinuousValueWidgetRepresentation.
#define VTK_MARSHALAUTO