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
118
119#ifndef vtkSliderRepresentation_h
120#define vtkSliderRepresentation_h
121
122#include "vtkInteractionWidgetsModule.h" // For export macro
124#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
125
126VTK_ABI_NAMESPACE_BEGIN
127class VTKINTERACTIONWIDGETS_EXPORT VTK_MARSHALAUTO vtkSliderRepresentation
129{
130public:
132
136 void PrintSelf(ostream& os, vtkIndent indent) override;
138
140
144 void SetValue(double value);
145 vtkGetMacro(Value, double);
147
149
154 void SetMinimumValue(double value);
155 vtkGetMacro(MinimumValue, double);
157
159
164 void SetMaximumValue(double value);
165 vtkGetMacro(MaximumValue, double);
167
169
173 vtkSetClampMacro(SliderLength, double, 0.01, 0.5);
174 vtkGetMacro(SliderLength, double);
176
178
183 vtkSetClampMacro(SliderWidth, double, 0.0, 1.0);
184 vtkGetMacro(SliderWidth, double);
186
188
192 vtkSetClampMacro(TubeWidth, double, 0.0, 1.0);
193 vtkGetMacro(TubeWidth, double);
195
197
202 vtkSetClampMacro(EndCapLength, double, 0.0, 0.25);
203 vtkGetMacro(EndCapLength, double);
205
207
211 vtkSetClampMacro(EndCapWidth, double, 0.0, 0.25);
212 vtkGetMacro(EndCapWidth, double);
214
219 virtual void SetTitleText(const char*) {}
220 virtual const char* GetTitleText() { return nullptr; }
221
223
226 vtkSetStringMacro(LabelFormat);
227 vtkGetStringMacro(LabelFormat);
229
231
235 vtkSetClampMacro(LabelHeight, double, 0.0, 2.0);
236 vtkGetMacro(LabelHeight, double);
238
240
244 vtkSetClampMacro(TitleHeight, double, 0.0, 2.0);
245 vtkGetMacro(TitleHeight, double);
247
249
255 vtkBooleanMacro(ShowSliderLabel, vtkTypeBool);
257
262 virtual double GetCurrentT() { return this->CurrentT; }
263 virtual double GetPickedT() { return this->PickedT; }
264
265 // Enums are used to describe what is selected
274
275protected:
278
279 // Values
280 double Value;
283
284 // More ivars controlling the appearance of the widget
289 double TubeWidth;
290
291 // The current parametric coordinate
292 double CurrentT;
293 double PickedT;
294
295 // both the title and label
300
301private:
303 void operator=(const vtkSliderRepresentation&) = delete;
304};
305
306VTK_ABI_NAMESPACE_END
307#endif
a simple class to control print indentation
Definition vtkIndent.h:108
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