• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

dox/Widgets/vtkSliderRepresentation.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkSliderRepresentation.h,v $
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00034 #ifndef __vtkSliderRepresentation_h
00035 #define __vtkSliderRepresentation_h
00036 
00037 #include "vtkWidgetRepresentation.h"
00038 
00039 
00040 class VTK_WIDGETS_EXPORT vtkSliderRepresentation : public vtkWidgetRepresentation
00041 {
00042 public:
00044 
00045   vtkTypeRevisionMacro(vtkSliderRepresentation,vtkWidgetRepresentation);
00046   void PrintSelf(ostream& os, vtkIndent indent);
00048 
00050 
00052   void SetValue(double value);
00053   vtkGetMacro(Value,double);
00055   
00057 
00060   void SetMinimumValue(double value);
00061   vtkGetMacro(MinimumValue,double);
00063   
00065 
00068   void SetMaximumValue(double value);
00069   vtkGetMacro(MaximumValue,double);
00071   
00073 
00075   vtkSetClampMacro(SliderLength,double,0.01,0.5);
00076   vtkGetMacro(SliderLength,double);
00078   
00080 
00084   vtkSetClampMacro(SliderWidth,double,0.0,1.0);
00085   vtkGetMacro(SliderWidth,double);
00087   
00089 
00091   vtkSetClampMacro(TubeWidth,double,0.0,1.0);
00092   vtkGetMacro(TubeWidth,double);
00094   
00096 
00099   vtkSetClampMacro(EndCapLength,double,0.0,0.25);
00100   vtkGetMacro(EndCapLength,double);
00102   
00104 
00106   vtkSetClampMacro(EndCapWidth,double,0.0,0.25);
00107   vtkGetMacro(EndCapWidth,double);
00109   
00111 
00113   virtual void SetTitleText(const char*) {}
00114   virtual const char* GetTitleText() {return NULL;}
00116 
00118 
00119   vtkSetStringMacro(LabelFormat);
00120   vtkGetStringMacro(LabelFormat);
00122 
00124 
00126   vtkSetClampMacro(LabelHeight,double,0.0,2.0);
00127   vtkGetMacro(LabelHeight,double);
00129 
00131 
00133   vtkSetClampMacro(TitleHeight,double,0.0,2.0);
00134   vtkGetMacro(TitleHeight,double);
00136 
00138 
00140   vtkSetMacro(ShowSliderLabel,int);
00141   vtkGetMacro(ShowSliderLabel,int);
00142   vtkBooleanMacro(ShowSliderLabel,int);
00144 
00146 
00148   virtual double GetCurrentT()
00149     {return this->CurrentT;}
00150   virtual double GetPickedT()
00151     {return this->PickedT;}
00153 
00154 //BTX
00155   // Enums are used to describe what is selected
00156   enum _InteractionState
00157   {
00158     Outside=0,
00159     Tube,
00160     LeftCap,
00161     RightCap,
00162     Slider
00163   };
00164 //ETX
00165 
00166 protected:
00167   vtkSliderRepresentation();
00168   ~vtkSliderRepresentation();
00169 
00170   // Values
00171   double Value;  
00172   double MinimumValue;
00173   double MaximumValue;
00174   
00175   // More ivars controlling the appearance of the widget
00176   double SliderLength;
00177   double SliderWidth;
00178   double EndCapLength;
00179   double EndCapWidth;
00180   double TubeWidth;
00181 
00182   // The current parametric coordinate
00183   double CurrentT;
00184   double PickedT;
00185 
00186   // both the title and label
00187   int    ShowSliderLabel;
00188   char  *LabelFormat;
00189   double LabelHeight;
00190   double TitleHeight;
00191 
00192 private:
00193   vtkSliderRepresentation(const vtkSliderRepresentation&);  //Not implemented
00194   void operator=(const vtkSliderRepresentation&);  //Not implemented
00195 };
00196 
00197 #endif

Generated by  doxygen 1.7.1