VTK  9.2.20230606
vtkContinuousValueWidget.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkContinuousValueWidget.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
15 /*-------------------------------------------------------------------------
16  Copyright 2008 Sandia Corporation.
17  Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
18  the U.S. Government retains certain rights in this software.
19 -------------------------------------------------------------------------*/
20 
67 #ifndef vtkContinuousValueWidget_h
68 #define vtkContinuousValueWidget_h
69 
70 #include "vtkAbstractWidget.h"
71 #include "vtkDeprecation.h" // For VTK_DEPRECATED_IN_9_2_0
72 #include "vtkInteractionWidgetsModule.h" // For export macro
73 #include "vtkLegacy.h" // for VTK_LEGACY_REMOVE
74 
75 VTK_ABI_NAMESPACE_BEGIN
77 
78 class VTKINTERACTIONWIDGETS_EXPORT vtkContinuousValueWidget : public vtkAbstractWidget
79 {
80 public:
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<vtkContinuousValueWidgetRepresentation*>(this->WidgetRep);
105  }
106 
108 
111  double GetValue();
112  void SetValue(double v);
114 
115 protected:
117  ~vtkContinuousValueWidget() override = default;
118 
119  // These are the events that are handled
123 
124  // Manage the state of the widget
127  {
128  Start = 0,
130  Adjusting
131  };
132 #if !defined(VTK_LEGACY_REMOVE)
133  VTK_DEPRECATED_IN_9_2_0("because leading underscore is reserved")
135 #endif
136 
137  double Value;
138 
139 private:
141  void operator=(const vtkContinuousValueWidget&) = delete;
142 };
143 
144 VTK_ABI_NAMESPACE_END
145 #endif
define the API for widget / widget representation
vtkWidgetRepresentation * WidgetRep
provide the representation for a continuous value
set a value by manipulating something
static void MoveAction(vtkAbstractWidget *)
void SetValue(double v)
Get the value for this widget.
vtkContinuousValueWidgetRepresentation * GetContinuousValueWidgetRepresentation()
Return the representation as a vtkContinuousValueWidgetRepresentation.
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:120
abstract class defines interface between the widget and widget representation classes
#define VTK_DEPRECATED_IN_9_2_0(reason)