VTK
vtkSliderWidget.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkSliderWidget.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 =========================================================================*/
74 #ifndef vtkSliderWidget_h
75 #define vtkSliderWidget_h
76 
77 #include "vtkInteractionWidgetsModule.h" // For export macro
78 #include "vtkAbstractWidget.h"
79 
81 
82 
84 {
85 public:
87  static vtkSliderWidget *New();
88 
90 
92  void PrintSelf(ostream& os, vtkIndent indent);
94 
96 
100  {this->Superclass::SetWidgetRepresentation(reinterpret_cast<vtkWidgetRepresentation*>(r));}
102 
104 
106  {return reinterpret_cast<vtkSliderRepresentation*>(this->WidgetRep);}
108 
110 
115  vtkSetClampMacro(AnimationMode, int, AnimateOff, Animate);
116  vtkGetMacro(AnimationMode, int);
117  void SetAnimationModeToOff() { this->SetAnimationMode(AnimateOff); }
118  void SetAnimationModeToJump() { this->SetAnimationMode(Jump); }
119  void SetAnimationModeToAnimate() { this->SetAnimationMode(Animate); }
121 
123 
125  vtkSetClampMacro(NumberOfAnimationSteps,int,1,VTK_INT_MAX);
126  vtkGetMacro(NumberOfAnimationSteps,int);
128 
131 
132 protected:
133  vtkSliderWidget();
135 
136  // These are the events that are handled
137  static void SelectAction(vtkAbstractWidget*);
138  static void EndSelectAction(vtkAbstractWidget*);
139  static void MoveAction(vtkAbstractWidget*);
140  void AnimateSlider(int selectionState);
141 
142  // Manage the state of the widget
145  {
146  Start=0,
148  Animating
149  };
150 
156  Animate
157  };
158 
159 
160 
161 private:
162  vtkSliderWidget(const vtkSliderWidget&); //Not implemented
163  void operator=(const vtkSliderWidget&); //Not implemented
164 };
165 
166 #endif
void PrintSelf(ostream &os, vtkIndent indent)
vtkSliderRepresentation * GetSliderRepresentation()
#define VTK_INT_MAX
Definition: vtkType.h:130
void SetRepresentation(vtkSliderRepresentation *r)
virtual void CreateDefaultRepresentation()=0
void SetAnimationModeToOff()
vtkWidgetRepresentation * WidgetRep
void SetAnimationModeToJump()
#define VTKINTERACTIONWIDGETS_EXPORT
a simple class to control print indentation
Definition: vtkIndent.h:38
void SetAnimationModeToAnimate()
abstract class defines the representation for a vtkSliderWidget
set a value by manipulating a slider
define the API for widget / widget representation
static vtkObject * New()