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

dox/Widgets/vtkSliderWidget.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkSliderWidget.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 =========================================================================*/
00071 #ifndef __vtkSliderWidget_h
00072 #define __vtkSliderWidget_h
00073 
00074 #include "vtkAbstractWidget.h"
00075 
00076 class vtkSliderRepresentation;
00077 
00078 
00079 class VTK_WIDGETS_EXPORT vtkSliderWidget : public vtkAbstractWidget
00080 {
00081 public:
00083   static vtkSliderWidget *New();
00084 
00086 
00087   vtkTypeRevisionMacro(vtkSliderWidget,vtkAbstractWidget);
00088   void PrintSelf(ostream& os, vtkIndent indent);
00090 
00092 
00095   void SetRepresentation(vtkSliderRepresentation *r)
00096     {this->Superclass::SetWidgetRepresentation(reinterpret_cast<vtkWidgetRepresentation*>(r));}
00098   
00100 
00105   vtkSetClampMacro(AnimationMode, int, AnimateOff, Animate);
00106   vtkGetMacro(AnimationMode, int);
00107   void SetAnimationModeToOff() { this->SetAnimationMode(AnimateOff); }
00108   void SetAnimationModeToJump() { this->SetAnimationMode(Jump); }
00109   void SetAnimationModeToAnimate() { this->SetAnimationMode(Animate); }
00111 
00113 
00115   vtkSetClampMacro(NumberOfAnimationSteps,int,1,VTK_LARGE_INTEGER);
00116   vtkGetMacro(NumberOfAnimationSteps,int);
00118 
00120   void CreateDefaultRepresentation();
00121 
00122 protected:
00123   vtkSliderWidget();
00124   ~vtkSliderWidget() {}
00125 
00126   // These are the events that are handled
00127   static void SelectAction(vtkAbstractWidget*);
00128   static void EndSelectAction(vtkAbstractWidget*);
00129   static void MoveAction(vtkAbstractWidget*);
00130   void AnimateSlider(int selectionState);
00131 
00132 //BTX - manage the state of the widget
00133   int WidgetState;
00134   enum _WidgetState
00135   {
00136     Start=0,
00137     Sliding,
00138     Animating
00139   };
00140 
00141   int NumberOfAnimationSteps;
00142   int AnimationMode;
00143   enum AnimationState {    
00144     AnimateOff,
00145     Jump,
00146     Animate
00147   };
00148 
00149 //ETX
00150 
00151 
00152 private:
00153   vtkSliderWidget(const vtkSliderWidget&);  //Not implemented
00154   void operator=(const vtkSliderWidget&);  //Not implemented
00155 };
00156 
00157 #endif

Generated by  doxygen 1.7.1