VTK
vtkBoxWidget2.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkBoxWidget2.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 =========================================================================*/
101 #ifndef __vtkBoxWidget2_h
102 #define __vtkBoxWidget2_h
103 
104 #include "vtkAbstractWidget.h"
105 
107 class vtkHandleWidget;
108 
109 
111 {
112 public:
114  static vtkBoxWidget2 *New();
115 
117 
119  void PrintSelf(ostream& os, vtkIndent indent);
121 
123 
127  {this->Superclass::SetWidgetRepresentation(reinterpret_cast<vtkWidgetRepresentation*>(r));}
129 
131 
137  vtkSetMacro(TranslationEnabled,int);
138  vtkGetMacro(TranslationEnabled,int);
139  vtkBooleanMacro(TranslationEnabled,int);
140  vtkSetMacro(ScalingEnabled,int);
141  vtkGetMacro(ScalingEnabled,int);
142  vtkBooleanMacro(ScalingEnabled,int);
143  vtkSetMacro(RotationEnabled,int);
144  vtkGetMacro(RotationEnabled,int);
145  vtkBooleanMacro(RotationEnabled,int);
146  vtkSetMacro(MoveFacesEnabled,int);
147  vtkGetMacro(MoveFacesEnabled,int);
148  vtkBooleanMacro(MoveFacesEnabled,int);
150 
154 
155 protected:
156  vtkBoxWidget2();
157  ~vtkBoxWidget2();
158 
159 //BTX - manage the state of the widget
161  enum _WidgetState {Start=0,Active};
162 //ETX
163 
164  // These methods handle events
165  static void SelectAction(vtkAbstractWidget*);
166  static void EndSelectAction(vtkAbstractWidget*);
167  static void TranslateAction(vtkAbstractWidget*);
168  static void ScaleAction(vtkAbstractWidget*);
169  static void MoveAction(vtkAbstractWidget*);
170 
171  // Control whether scaling, rotation, and translation are supported
176 private:
177  vtkBoxWidget2(const vtkBoxWidget2&); //Not implemented
178  void operator=(const vtkBoxWidget2&); //Not implemented
179 };
180 
181 #endif