VTK  9.0.20201019
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 "vtkInteractionWidgetsModule.h" // For export macro
72 
74 
75 class VTKINTERACTIONWIDGETS_EXPORT vtkContinuousValueWidget : public vtkAbstractWidget
76 {
77 public:
79 
83  void PrintSelf(ostream& os, vtkIndent indent) override;
85 
92  {
93  this->Superclass::SetWidgetRepresentation(reinterpret_cast<vtkWidgetRepresentation*>(r));
94  }
95 
100  {
101  return reinterpret_cast<vtkContinuousValueWidgetRepresentation*>(this->WidgetRep);
102  }
103 
105 
108  double GetValue();
109  void SetValue(double v);
111 
112 protected:
114  ~vtkContinuousValueWidget() override = default;
115 
116  // These are the events that are handled
117  static void SelectAction(vtkAbstractWidget*);
118  static void EndSelectAction(vtkAbstractWidget*);
119  static void MoveAction(vtkAbstractWidget*);
120 
121  // Manage the state of the widget
124  {
125  Start = 0,
127  Adjusting
128  };
129 
130  double Value;
131 
132 private:
134  void operator=(const vtkContinuousValueWidget&) = delete;
135 };
136 
137 #endif
vtkContinuousValueWidget::_WidgetState
_WidgetState
Definition: vtkContinuousValueWidget.h:123
vtkContinuousValueWidget::GetContinuousValueWidgetRepresentation
vtkContinuousValueWidgetRepresentation * GetContinuousValueWidgetRepresentation()
Return the representation as a vtkContinuousValueWidgetRepresentation.
Definition: vtkContinuousValueWidget.h:99
vtkAbstractWidget::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkAbstractWidget.h
vtkContinuousValueWidget::SetRepresentation
void SetRepresentation(vtkContinuousValueWidgetRepresentation *r)
Specify an instance of vtkWidgetRepresentation used to represent this widget in the scene.
Definition: vtkContinuousValueWidget.h:91
vtkContinuousValueWidget::WidgetState
int WidgetState
Definition: vtkContinuousValueWidget.h:122
vtkContinuousValueWidget::Value
double Value
Definition: vtkContinuousValueWidget.h:130
vtkAbstractWidget
define the API for widget / widget representation
Definition: vtkAbstractWidget.h:65
vtkContinuousValueWidgetRepresentation
provide the representation for a continuous value
Definition: vtkContinuousValueWidgetRepresentation.h:36
vtkContinuousValueWidget::Highlighting
Definition: vtkContinuousValueWidget.h:126
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkContinuousValueWidget
set a value by manipulating something
Definition: vtkContinuousValueWidget.h:75