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=========================================================================*/
34
35#ifndef vtkSliderRepresentation_h
36#define vtkSliderRepresentation_h
37
38#include "vtkDeprecation.h" // For VTK_DEPRECATED_IN_9_2_0
39#include "vtkInteractionWidgetsModule.h" // For export macro
41
42class VTKINTERACTIONWIDGETS_EXPORT vtkSliderRepresentation : public vtkWidgetRepresentation
43{
44public:
46
50 void PrintSelf(ostream& os, vtkIndent indent) override;
52
54
58 void SetValue(double value);
59 vtkGetMacro(Value, double);
61
63
68 void SetMinimumValue(double value);
69 vtkGetMacro(MinimumValue, double);
71
73
78 void SetMaximumValue(double value);
79 vtkGetMacro(MaximumValue, double);
81
83
87 vtkSetClampMacro(SliderLength, double, 0.01, 0.5);
88 vtkGetMacro(SliderLength, double);
90
92
97 vtkSetClampMacro(SliderWidth, double, 0.0, 1.0);
98 vtkGetMacro(SliderWidth, double);
100
102
106 vtkSetClampMacro(TubeWidth, double, 0.0, 1.0);
107 vtkGetMacro(TubeWidth, double);
109
111
116 vtkSetClampMacro(EndCapLength, double, 0.0, 0.25);
117 vtkGetMacro(EndCapLength, double);
119
121
125 vtkSetClampMacro(EndCapWidth, double, 0.0, 0.25);
126 vtkGetMacro(EndCapWidth, double);
128
133 virtual void SetTitleText(const char*) {}
134 virtual const char* GetTitleText() { return nullptr; }
135
137
140 vtkSetStringMacro(LabelFormat);
141 vtkGetStringMacro(LabelFormat);
143
145
149 vtkSetClampMacro(LabelHeight, double, 0.0, 2.0);
150 vtkGetMacro(LabelHeight, double);
152
154
158 vtkSetClampMacro(TitleHeight, double, 0.0, 2.0);
159 vtkGetMacro(TitleHeight, double);
161
163
169 vtkBooleanMacro(ShowSliderLabel, vtkTypeBool);
171
176 virtual double GetCurrentT() { return this->CurrentT; }
177 virtual double GetPickedT() { return this->PickedT; }
178
179 // Enums are used to describe what is selected
188#if !defined(VTK_LEGACY_REMOVE)
189 VTK_DEPRECATED_IN_9_2_0("because leading underscore is reserved")
191#endif
192
193protected:
196
197 // Values
198 double Value;
201
202 // More ivars controlling the appearance of the widget
207 double TubeWidth;
208
209 // The current parametric coordinate
210 double CurrentT;
211 double PickedT;
212
213 // both the title and label
218
219private:
221 void operator=(const vtkSliderRepresentation&) = delete;
222};
223
224#endif
a simple class to control print indentation
Definition vtkIndent.h:40
InteractionStateType _InteractionState
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.
int vtkTypeBool
Definition vtkABI.h:69
#define VTK_DEPRECATED_IN_9_2_0(reason)