VTK  9.2.6
vtkSliderRepresentation.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkSliderRepresentation.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=========================================================================*/
51#ifndef vtkSliderRepresentation_h
52#define vtkSliderRepresentation_h
53
54#include "vtkDeprecation.h" // For VTK_DEPRECATED_IN_9_2_0
55#include "vtkInteractionWidgetsModule.h" // For export macro
57
58class VTKINTERACTIONWIDGETS_EXPORT vtkSliderRepresentation : public vtkWidgetRepresentation
59{
60public:
62
66 void PrintSelf(ostream& os, vtkIndent indent) override;
68
70
74 void SetValue(double value);
75 vtkGetMacro(Value, double);
77
79
84 void SetMinimumValue(double value);
85 vtkGetMacro(MinimumValue, double);
87
89
94 void SetMaximumValue(double value);
95 vtkGetMacro(MaximumValue, double);
97
99
103 vtkSetClampMacro(SliderLength, double, 0.01, 0.5);
104 vtkGetMacro(SliderLength, double);
106
108
113 vtkSetClampMacro(SliderWidth, double, 0.0, 1.0);
114 vtkGetMacro(SliderWidth, double);
116
118
122 vtkSetClampMacro(TubeWidth, double, 0.0, 1.0);
123 vtkGetMacro(TubeWidth, double);
125
127
132 vtkSetClampMacro(EndCapLength, double, 0.0, 0.25);
133 vtkGetMacro(EndCapLength, double);
135
137
141 vtkSetClampMacro(EndCapWidth, double, 0.0, 0.25);
142 vtkGetMacro(EndCapWidth, double);
144
149 virtual void SetTitleText(const char*) {}
150 virtual const char* GetTitleText() { return nullptr; }
151
153
156 vtkSetStringMacro(LabelFormat);
157 vtkGetStringMacro(LabelFormat);
159
161
165 vtkSetClampMacro(LabelHeight, double, 0.0, 2.0);
166 vtkGetMacro(LabelHeight, double);
168
170
174 vtkSetClampMacro(TitleHeight, double, 0.0, 2.0);
175 vtkGetMacro(TitleHeight, double);
177
179
183 vtkSetMacro(ShowSliderLabel, vtkTypeBool);
184 vtkGetMacro(ShowSliderLabel, vtkTypeBool);
185 vtkBooleanMacro(ShowSliderLabel, vtkTypeBool);
187
192 virtual double GetCurrentT() { return this->CurrentT; }
193 virtual double GetPickedT() { return this->PickedT; }
194
195 // Enums are used to describe what is selected
197 {
198 Outside = 0,
202 Slider
203 };
204#if !defined(VTK_LEGACY_REMOVE)
205 VTK_DEPRECATED_IN_9_2_0("because leading underscore is reserved")
207#endif
208
209protected:
212
213 // Values
214 double Value;
217
218 // More ivars controlling the appearance of the widget
223 double TubeWidth;
224
225 // The current parametric coordinate
226 double CurrentT;
227 double PickedT;
228
229 // both the title and label
234
235private:
237 void operator=(const vtkSliderRepresentation&) = delete;
238};
239
240#endif
a simple class to control print indentation
Definition: vtkIndent.h:119
abstract class defines the representation for a vtkSliderWidget
virtual void SetTitleText(const char *)
Specify the label text for this widget.
void SetValue(double value)
Specify the current value for the widget.
virtual double GetCurrentT()
Methods to interface with the vtkSliderWidget.
virtual const char * GetTitleText()
void SetMinimumValue(double value)
Set the current minimum value that the slider can take.
~vtkSliderRepresentation() override
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for the class.
void SetMaximumValue(double value)
Set the current maximum value that the slider can take.
abstract class defines interface between the widget and widget representation classes
@ value
Definition: vtkX3D.h:226
int vtkTypeBool
Definition: vtkABI.h:69
#define VTK_DEPRECATED_IN_9_2_0(reason)