VTK  9.5.2
vtkSliderRepresentation.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
19
20#ifndef vtkSliderRepresentation_h
21#define vtkSliderRepresentation_h
22
23#include "vtkInteractionWidgetsModule.h" // For export macro
25#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
26
27VTK_ABI_NAMESPACE_BEGIN
28class VTKINTERACTIONWIDGETS_EXPORT VTK_MARSHALAUTO vtkSliderRepresentation
30{
31public:
33
37 void PrintSelf(ostream& os, vtkIndent indent) override;
39
41
45 void SetValue(double value);
46 vtkGetMacro(Value, double);
48
50
55 void SetMinimumValue(double value);
56 vtkGetMacro(MinimumValue, double);
58
60
65 void SetMaximumValue(double value);
66 vtkGetMacro(MaximumValue, double);
68
70
74 vtkSetClampMacro(SliderLength, double, 0.01, 0.5);
75 vtkGetMacro(SliderLength, double);
77
79
84 vtkSetClampMacro(SliderWidth, double, 0.0, 1.0);
85 vtkGetMacro(SliderWidth, double);
87
89
93 vtkSetClampMacro(TubeWidth, double, 0.0, 1.0);
94 vtkGetMacro(TubeWidth, double);
96
98
103 vtkSetClampMacro(EndCapLength, double, 0.0, 0.25);
104 vtkGetMacro(EndCapLength, double);
106
108
112 vtkSetClampMacro(EndCapWidth, double, 0.0, 0.25);
113 vtkGetMacro(EndCapWidth, double);
115
120 virtual void SetTitleText(const char*) {}
121 virtual const char* GetTitleText() { return nullptr; }
122
124
127 vtkSetStringMacro(LabelFormat);
128 vtkGetStringMacro(LabelFormat);
130
132
136 vtkSetClampMacro(LabelHeight, double, 0.0, 2.0);
137 vtkGetMacro(LabelHeight, double);
139
141
145 vtkSetClampMacro(TitleHeight, double, 0.0, 2.0);
146 vtkGetMacro(TitleHeight, double);
148
150
156 vtkBooleanMacro(ShowSliderLabel, vtkTypeBool);
158
163 virtual double GetCurrentT() { return this->CurrentT; }
164 virtual double GetPickedT() { return this->PickedT; }
165
166 // Enums are used to describe what is selected
175
176protected:
179
180 // Values
181 double Value;
184
185 // More ivars controlling the appearance of the widget
190 double TubeWidth;
191
192 // The current parametric coordinate
193 double CurrentT;
194 double PickedT;
195
196 // both the title and label
201
202private:
204 void operator=(const vtkSliderRepresentation&) = delete;
205};
206
207VTK_ABI_NAMESPACE_END
208#endif
a simple class to control print indentation
Definition vtkIndent.h:29
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:64
#define VTK_MARSHALAUTO