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=========================================================================*/
54#ifndef vtkSliderRepresentation_h
55#define vtkSliderRepresentation_h
56
57#include "vtkDeprecation.h" // For VTK_DEPRECATED_IN_9_2_0
58#include "vtkInteractionWidgetsModule.h" // For export macro
60
61class VTKINTERACTIONWIDGETS_EXPORT vtkSliderRepresentation : public vtkWidgetRepresentation
62{
63public:
65
69 void PrintSelf(ostream& os, vtkIndent indent) override;
71
73
77 void SetValue(double value);
78 vtkGetMacro(Value, double);
80
82
87 void SetMinimumValue(double value);
88 vtkGetMacro(MinimumValue, double);
90
92
97 void SetMaximumValue(double value);
98 vtkGetMacro(MaximumValue, double);
100
102
106 vtkSetClampMacro(SliderLength, double, 0.01, 0.5);
107 vtkGetMacro(SliderLength, double);
109
111
116 vtkSetClampMacro(SliderWidth, double, 0.0, 1.0);
117 vtkGetMacro(SliderWidth, double);
119
121
125 vtkSetClampMacro(TubeWidth, double, 0.0, 1.0);
126 vtkGetMacro(TubeWidth, double);
128
130
135 vtkSetClampMacro(EndCapLength, double, 0.0, 0.25);
136 vtkGetMacro(EndCapLength, double);
138
140
144 vtkSetClampMacro(EndCapWidth, double, 0.0, 0.25);
145 vtkGetMacro(EndCapWidth, double);
147
152 virtual void SetTitleText(const char*) {}
153 virtual const char* GetTitleText() { return nullptr; }
154
156
159 vtkSetStringMacro(LabelFormat);
160 vtkGetStringMacro(LabelFormat);
162
164
168 vtkSetClampMacro(LabelHeight, double, 0.0, 2.0);
169 vtkGetMacro(LabelHeight, double);
171
173
177 vtkSetClampMacro(TitleHeight, double, 0.0, 2.0);
178 vtkGetMacro(TitleHeight, double);
180
182
186 vtkSetMacro(ShowSliderLabel, vtkTypeBool);
187 vtkGetMacro(ShowSliderLabel, vtkTypeBool);
188 vtkBooleanMacro(ShowSliderLabel, vtkTypeBool);
190
195 virtual double GetCurrentT() { return this->CurrentT; }
196 virtual double GetPickedT() { return this->PickedT; }
197
198 // Enums are used to describe what is selected
200 {
201 Outside = 0,
205 Slider
206 };
207#if !defined(VTK_LEGACY_REMOVE)
208 VTK_DEPRECATED_IN_9_2_0("because leading underscore is reserved")
210#endif
211
212protected:
215
216 // Values
217 double Value;
220
221 // More ivars controlling the appearance of the widget
226 double TubeWidth;
227
228 // The current parametric coordinate
229 double CurrentT;
230 double PickedT;
231
232 // both the title and label
237
238private:
240 void operator=(const vtkSliderRepresentation&) = delete;
241};
242
243#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)