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 "vtkInteractionWidgetsModule.h" // For export macro
80 #include "vtkAbstractWidget.h"
81 
83 
84 
86 {
87 public:
89  static vtkCenteredSliderWidget *New();
90 
92 
94  void PrintSelf(ostream& os, vtkIndent indent);
96 
98 
102  {this->Superclass::SetWidgetRepresentation(reinterpret_cast<vtkWidgetRepresentation*>(r));}
104 
106 
108  {return reinterpret_cast<vtkSliderRepresentation*>(this->WidgetRep);}
110 
113 
115  double GetValue() { return this->Value; };
116 
117 protected:
120 
121  // These are the events that are handled
122  static void SelectAction(vtkAbstractWidget*);
123  static void EndSelectAction(vtkAbstractWidget*);
124  static void MoveAction(vtkAbstractWidget*);
125  static void TimerAction(vtkAbstractWidget*);
126 
127 //BTX - manage the state of the widget
130  {
131  Start=0,
132  Sliding
133  };
134 //ETX
135 
136  int TimerId;
138  double StartTime;
139  double Value;
140 
141 private:
142  vtkCenteredSliderWidget(const vtkCenteredSliderWidget&); //Not implemented
143  void operator=(const vtkCenteredSliderWidget&); //Not implemented
144 };
145 
146 #endif
void PrintSelf(ostream &os, vtkIndent indent)
virtual void CreateDefaultRepresentation()=0
vtkWidgetRepresentation * WidgetRep
#define VTKINTERACTIONWIDGETS_EXPORT
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkSliderRepresentation * GetSliderRepresentation()
void SetRepresentation(vtkSliderRepresentation *r)
abstract class defines the representation for a vtkSliderWidget
define the API for widget / widget representation
set a value by manipulating a slider
static vtkObject * New()