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 "vtkAbstractWidget.h"
78 
80 
81 
83 {
84 public:
86  static vtkSliderWidget *New();
87 
89 
91  void PrintSelf(ostream& os, vtkIndent indent);
93 
95 
99  {this->Superclass::SetWidgetRepresentation(reinterpret_cast<vtkWidgetRepresentation*>(r));}
101 
103 
105  {return reinterpret_cast<vtkSliderRepresentation*>(this->WidgetRep);}
107 
109 
114  vtkSetClampMacro(AnimationMode, int, AnimateOff, Animate);
115  vtkGetMacro(AnimationMode, int);
116  void SetAnimationModeToOff() { this->SetAnimationMode(AnimateOff); }
117  void SetAnimationModeToJump() { this->SetAnimationMode(Jump); }
118  void SetAnimationModeToAnimate() { this->SetAnimationMode(Animate); }
120 
122 
124  vtkSetClampMacro(NumberOfAnimationSteps,int,1,VTK_LARGE_INTEGER);
125  vtkGetMacro(NumberOfAnimationSteps,int);
127 
130 
131 protected:
132  vtkSliderWidget();
134 
135  // These are the events that are handled
136  static void SelectAction(vtkAbstractWidget*);
137  static void EndSelectAction(vtkAbstractWidget*);
138  static void MoveAction(vtkAbstractWidget*);
139  void AnimateSlider(int selectionState);
140 
141 //BTX - manage the state of the widget
144  {
145  Start=0,
147  Animating
148  };
149 
155  Animate
156  };
157 
158 //ETX
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()
void SetRepresentation(vtkSliderRepresentation *r)
virtual void CreateDefaultRepresentation()=0
void SetAnimationModeToOff()
vtkWidgetRepresentation * WidgetRep
void SetAnimationModeToJump()
a simple class to control print indentation
Definition: vtkIndent.h:37
void SetAnimationModeToAnimate()
#define VTK_WIDGETS_EXPORT
abstract class defines the representation for a vtkSliderWidget
set a value by manipulating a slider
define the API for widget / widget representation
#define VTK_LARGE_INTEGER
Definition: vtkType.h:148
static vtkObject * New()