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 =========================================================================*/
98 #ifndef vtkBoxWidget2_h
99 #define vtkBoxWidget2_h
100 
101 #include "vtkInteractionWidgetsModule.h" // For export macro
102 #include "vtkAbstractWidget.h"
103 
105 class vtkHandleWidget;
106 
107 
109 {
110 public:
112  static vtkBoxWidget2 *New();
113 
115 
117  void PrintSelf(ostream& os, vtkIndent indent);
119 
121 
125  {this->Superclass::SetWidgetRepresentation(reinterpret_cast<vtkWidgetRepresentation*>(r));}
127 
129 
135  vtkSetMacro(TranslationEnabled,int);
136  vtkGetMacro(TranslationEnabled,int);
137  vtkBooleanMacro(TranslationEnabled,int);
138  vtkSetMacro(ScalingEnabled,int);
139  vtkGetMacro(ScalingEnabled,int);
140  vtkBooleanMacro(ScalingEnabled,int);
141  vtkSetMacro(RotationEnabled,int);
142  vtkGetMacro(RotationEnabled,int);
143  vtkBooleanMacro(RotationEnabled,int);
144  vtkSetMacro(MoveFacesEnabled,int);
145  vtkGetMacro(MoveFacesEnabled,int);
146  vtkBooleanMacro(MoveFacesEnabled,int);
148 
152 
153 protected:
154  vtkBoxWidget2();
155  ~vtkBoxWidget2();
156 
157 //BTX - manage the state of the widget
159  enum _WidgetState {Start=0,Active};
160 //ETX
161 
162  // These methods handle events
163  static void SelectAction(vtkAbstractWidget*);
164  static void EndSelectAction(vtkAbstractWidget*);
165  static void TranslateAction(vtkAbstractWidget*);
166  static void ScaleAction(vtkAbstractWidget*);
167  static void MoveAction(vtkAbstractWidget*);
168 
169  // Control whether scaling, rotation, and translation are supported
174 private:
175  vtkBoxWidget2(const vtkBoxWidget2&); //Not implemented
176  void operator=(const vtkBoxWidget2&); //Not implemented
177 };
178 
179 #endif
void PrintSelf(ostream &os, vtkIndent indent)
a class defining the representation for the vtkBoxWidget2
a general widget for moving handles
virtual void CreateDefaultRepresentation()=0
void SetRepresentation(vtkBoxRepresentation *r)
#define VTKINTERACTIONWIDGETS_EXPORT
a simple class to control print indentation
Definition: vtkIndent.h:38
3D widget for manipulating a box
define the API for widget / widget representation
static vtkObject * New()