00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00037 #ifndef __vtkSliderRepresentation_h
00038 #define __vtkSliderRepresentation_h
00039
00040 #include "vtkWidgetRepresentation.h"
00041
00042
00043 class VTK_WIDGETS_EXPORT vtkSliderRepresentation : public vtkWidgetRepresentation
00044 {
00045 public:
00047
00048 vtkTypeMacro(vtkSliderRepresentation,vtkWidgetRepresentation);
00049 void PrintSelf(ostream& os, vtkIndent indent);
00051
00053
00055 void SetValue(double value);
00056 vtkGetMacro(Value,double);
00058
00060
00063 void SetMinimumValue(double value);
00064 vtkGetMacro(MinimumValue,double);
00066
00068
00071 void SetMaximumValue(double value);
00072 vtkGetMacro(MaximumValue,double);
00074
00076
00078 vtkSetClampMacro(SliderLength,double,0.01,0.5);
00079 vtkGetMacro(SliderLength,double);
00081
00083
00087 vtkSetClampMacro(SliderWidth,double,0.0,1.0);
00088 vtkGetMacro(SliderWidth,double);
00090
00092
00094 vtkSetClampMacro(TubeWidth,double,0.0,1.0);
00095 vtkGetMacro(TubeWidth,double);
00097
00099
00102 vtkSetClampMacro(EndCapLength,double,0.0,0.25);
00103 vtkGetMacro(EndCapLength,double);
00105
00107
00109 vtkSetClampMacro(EndCapWidth,double,0.0,0.25);
00110 vtkGetMacro(EndCapWidth,double);
00112
00114
00116 virtual void SetTitleText(const char*) {}
00117 virtual const char* GetTitleText() {return NULL;}
00119
00121
00122 vtkSetStringMacro(LabelFormat);
00123 vtkGetStringMacro(LabelFormat);
00125
00127
00129 vtkSetClampMacro(LabelHeight,double,0.0,2.0);
00130 vtkGetMacro(LabelHeight,double);
00132
00134
00136 vtkSetClampMacro(TitleHeight,double,0.0,2.0);
00137 vtkGetMacro(TitleHeight,double);
00139
00141
00143 vtkSetMacro(ShowSliderLabel,int);
00144 vtkGetMacro(ShowSliderLabel,int);
00145 vtkBooleanMacro(ShowSliderLabel,int);
00147
00149
00151 virtual double GetCurrentT()
00152 {return this->CurrentT;}
00153 virtual double GetPickedT()
00154 {return this->PickedT;}
00156
00157
00158
00159 enum _InteractionState
00160 {
00161 Outside=0,
00162 Tube,
00163 LeftCap,
00164 RightCap,
00165 Slider
00166 };
00167
00168
00169 protected:
00170 vtkSliderRepresentation();
00171 ~vtkSliderRepresentation();
00172
00173
00174 double Value;
00175 double MinimumValue;
00176 double MaximumValue;
00177
00178
00179 double SliderLength;
00180 double SliderWidth;
00181 double EndCapLength;
00182 double EndCapWidth;
00183 double TubeWidth;
00184
00185
00186 double CurrentT;
00187 double PickedT;
00188
00189
00190 int ShowSliderLabel;
00191 char *LabelFormat;
00192 double LabelHeight;
00193 double TitleHeight;
00194
00195 private:
00196 vtkSliderRepresentation(const vtkSliderRepresentation&);
00197 void operator=(const vtkSliderRepresentation&);
00198 };
00199
00200 #endif