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=========================================================================*/
32#ifndef vtkSliderRepresentation_h
33#define vtkSliderRepresentation_h
34
35#include "vtkDeprecation.h" // For VTK_DEPRECATED_IN_9_2_0
36#include "vtkInteractionWidgetsModule.h" // For export macro
38
39class VTKINTERACTIONWIDGETS_EXPORT vtkSliderRepresentation : public vtkWidgetRepresentation
40{
41public:
43
47 void PrintSelf(ostream& os, vtkIndent indent) override;
49
51
55 void SetValue(double value);
56 vtkGetMacro(Value, double);
58
60
65 void SetMinimumValue(double value);
66 vtkGetMacro(MinimumValue, double);
68
70
75 void SetMaximumValue(double value);
76 vtkGetMacro(MaximumValue, double);
78
80
84 vtkSetClampMacro(SliderLength, double, 0.01, 0.5);
85 vtkGetMacro(SliderLength, double);
87
89
94 vtkSetClampMacro(SliderWidth, double, 0.0, 1.0);
95 vtkGetMacro(SliderWidth, double);
97
99
103 vtkSetClampMacro(TubeWidth, double, 0.0, 1.0);
104 vtkGetMacro(TubeWidth, double);
106
108
113 vtkSetClampMacro(EndCapLength, double, 0.0, 0.25);
114 vtkGetMacro(EndCapLength, double);
116
118
122 vtkSetClampMacro(EndCapWidth, double, 0.0, 0.25);
123 vtkGetMacro(EndCapWidth, double);
125
130 virtual void SetTitleText(const char*) {}
131 virtual const char* GetTitleText() { return nullptr; }
132
134
137 vtkSetStringMacro(LabelFormat);
138 vtkGetStringMacro(LabelFormat);
140
142
146 vtkSetClampMacro(LabelHeight, double, 0.0, 2.0);
147 vtkGetMacro(LabelHeight, double);
149
151
155 vtkSetClampMacro(TitleHeight, double, 0.0, 2.0);
156 vtkGetMacro(TitleHeight, double);
158
160
164 vtkSetMacro(ShowSliderLabel, vtkTypeBool);
165 vtkGetMacro(ShowSliderLabel, vtkTypeBool);
166 vtkBooleanMacro(ShowSliderLabel, vtkTypeBool);
168
173 virtual double GetCurrentT() { return this->CurrentT; }
174 virtual double GetPickedT() { return this->PickedT; }
175
176 // Enums are used to describe what is selected
178 {
179 Outside = 0,
183 Slider
184 };
185#if !defined(VTK_LEGACY_REMOVE)
186 VTK_DEPRECATED_IN_9_2_0("because leading underscore is reserved")
188#endif
189
190protected:
193
194 // Values
195 double Value;
198
199 // More ivars controlling the appearance of the widget
204 double TubeWidth;
205
206 // The current parametric coordinate
207 double CurrentT;
208 double PickedT;
209
210 // both the title and label
215
216private:
218 void operator=(const vtkSliderRepresentation&) = delete;
219};
220
221#endif
a simple class to control print indentation
Definition vtkIndent.h:34
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
int vtkTypeBool
Definition vtkABI.h:69
#define VTK_DEPRECATED_IN_9_2_0(reason)