VTK
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 =========================================================================*/
37 #ifndef vtkSliderRepresentation_h
38 #define vtkSliderRepresentation_h
39 
40 #include "vtkInteractionWidgetsModule.h" // For export macro
42 
43 
45 {
46 public:
48 
50  void PrintSelf(ostream& os, vtkIndent indent);
52 
54 
56  void SetValue(double value);
57  vtkGetMacro(Value,double);
59 
61 
64  void SetMinimumValue(double value);
65  vtkGetMacro(MinimumValue,double);
67 
69 
72  void SetMaximumValue(double value);
73  vtkGetMacro(MaximumValue,double);
75 
77 
79  vtkSetClampMacro(SliderLength,double,0.01,0.5);
80  vtkGetMacro(SliderLength,double);
82 
84 
88  vtkSetClampMacro(SliderWidth,double,0.0,1.0);
89  vtkGetMacro(SliderWidth,double);
91 
93 
95  vtkSetClampMacro(TubeWidth,double,0.0,1.0);
96  vtkGetMacro(TubeWidth,double);
98 
100 
103  vtkSetClampMacro(EndCapLength,double,0.0,0.25);
104  vtkGetMacro(EndCapLength,double);
106 
108 
110  vtkSetClampMacro(EndCapWidth,double,0.0,0.25);
111  vtkGetMacro(EndCapWidth,double);
113 
115 
117  virtual void SetTitleText(const char*) {}
118  virtual const char* GetTitleText() {return NULL;}
120 
122 
123  vtkSetStringMacro(LabelFormat);
124  vtkGetStringMacro(LabelFormat);
126 
128 
130  vtkSetClampMacro(LabelHeight,double,0.0,2.0);
131  vtkGetMacro(LabelHeight,double);
133 
135 
137  vtkSetClampMacro(TitleHeight,double,0.0,2.0);
138  vtkGetMacro(TitleHeight,double);
140 
142 
144  vtkSetMacro(ShowSliderLabel,int);
145  vtkGetMacro(ShowSliderLabel,int);
146  vtkBooleanMacro(ShowSliderLabel,int);
148 
150 
152  virtual double GetCurrentT()
153  {return this->CurrentT;}
154  virtual double GetPickedT()
155  {return this->PickedT;}
157 
158 //BTX
159  // Enums are used to describe what is selected
161  {
162  Outside=0,
166  Slider
167  };
168 //ETX
169 
170 protected:
173 
174  // Values
175  double Value;
176  double MinimumValue;
177  double MaximumValue;
178 
179  // More ivars controlling the appearance of the widget
180  double SliderLength;
181  double SliderWidth;
182  double EndCapLength;
183  double EndCapWidth;
184  double TubeWidth;
185 
186  // The current parametric coordinate
187  double CurrentT;
188  double PickedT;
189 
190  // both the title and label
192  char *LabelFormat;
193  double LabelHeight;
194  double TitleHeight;
195 
196 private:
197  vtkSliderRepresentation(const vtkSliderRepresentation&); //Not implemented
198  void operator=(const vtkSliderRepresentation&); //Not implemented
199 };
200 
201 #endif
virtual void SetTitleText(const char *)
abstract class defines interface between the widget and widget representation classes ...
#define VTKINTERACTIONWIDGETS_EXPORT
a simple class to control print indentation
Definition: vtkIndent.h:38
abstract class defines the representation for a vtkSliderWidget
virtual const char * GetTitleText()
void PrintSelf(ostream &os, vtkIndent indent)