VTK
vtkSphereWidget2.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkSphereWidget2.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 =========================================================================*/
95 #ifndef __vtkSphereWidget2_h
96 #define __vtkSphereWidget2_h
97 
98 #include "vtkAbstractWidget.h"
99 
101 class vtkHandleWidget;
102 
103 
105 {
106 public:
108  static vtkSphereWidget2 *New();
109 
111 
113  void PrintSelf(ostream& os, vtkIndent indent);
115 
117 
121  {this->Superclass::SetWidgetRepresentation(reinterpret_cast<vtkWidgetRepresentation*>(r));}
123 
125 
127  vtkSetMacro(TranslationEnabled,int);
128  vtkGetMacro(TranslationEnabled,int);
129  vtkBooleanMacro(TranslationEnabled,int);
130  vtkSetMacro(ScalingEnabled,int);
131  vtkGetMacro(ScalingEnabled,int);
132  vtkBooleanMacro(ScalingEnabled,int);
134 
138 
139 protected:
141  ~vtkSphereWidget2();
142 
143 //BTX - manage the state of the widget
145  enum _WidgetState {Start=0,Active};
146 //ETX
147 
148  // These methods handle events
149  static void SelectAction(vtkAbstractWidget*);
150  static void EndSelectAction(vtkAbstractWidget*);
151  static void TranslateAction(vtkAbstractWidget*);
152  static void ScaleAction(vtkAbstractWidget*);
153  static void MoveAction(vtkAbstractWidget*);
154 
155  // Control whether scaling and translation are supported
158 
159 private:
160  vtkSphereWidget2(const vtkSphereWidget2&); //Not implemented
161  void operator=(const vtkSphereWidget2&); //Not implemented
162 };
163 
164 #endif