VTK
vtkCenteredSliderWidget.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkCenteredSliderWidget.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 =========================================================================*/
76 #ifndef __vtkCenteredSliderWidget_h
77 #define __vtkCenteredSliderWidget_h
78 
79 #include "vtkAbstractWidget.h"
80 
82 
83 
85 {
86 public:
88  static vtkCenteredSliderWidget *New();
89 
91 
93  void PrintSelf(ostream& os, vtkIndent indent);
95 
97 
101  {this->Superclass::SetWidgetRepresentation(reinterpret_cast<vtkWidgetRepresentation*>(r));}
103 
105 
107  {return reinterpret_cast<vtkSliderRepresentation*>(this->WidgetRep);}
109 
112 
114  double GetValue() { return this->Value; };
115 
116 protected:
119 
120  // These are the events that are handled
121  static void SelectAction(vtkAbstractWidget*);
122  static void EndSelectAction(vtkAbstractWidget*);
123  static void MoveAction(vtkAbstractWidget*);
124  static void TimerAction(vtkAbstractWidget*);
125 
126 //BTX - manage the state of the widget
129  {
130  Start=0,
131  Sliding
132  };
133 //ETX
134 
135  int TimerId;
137  double StartTime;
138  double Value;
139 
140 private:
141  vtkCenteredSliderWidget(const vtkCenteredSliderWidget&); //Not implemented
142  void operator=(const vtkCenteredSliderWidget&); //Not implemented
143 };
144 
145 #endif