VTK  9.1.0
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 =========================================================================*/
118 #ifndef vtkBoxWidget2_h
119 #define vtkBoxWidget2_h
120 
121 #include "vtkAbstractWidget.h"
122 #include "vtkInteractionWidgetsModule.h" // For export macro
123 
125 class vtkHandleWidget;
126 
127 class VTKINTERACTIONWIDGETS_EXPORT vtkBoxWidget2 : public vtkAbstractWidget
128 {
129 public:
133  static vtkBoxWidget2* New();
134 
136 
140  void PrintSelf(ostream& os, vtkIndent indent) override;
142 
149  {
150  this->Superclass::SetWidgetRepresentation(reinterpret_cast<vtkWidgetRepresentation*>(r));
151  }
152 
154 
162  vtkSetMacro(TranslationEnabled, vtkTypeBool);
163  vtkGetMacro(TranslationEnabled, vtkTypeBool);
164  vtkBooleanMacro(TranslationEnabled, vtkTypeBool);
165  vtkSetMacro(ScalingEnabled, vtkTypeBool);
166  vtkGetMacro(ScalingEnabled, vtkTypeBool);
167  vtkBooleanMacro(ScalingEnabled, vtkTypeBool);
168  vtkSetMacro(RotationEnabled, vtkTypeBool);
169  vtkGetMacro(RotationEnabled, vtkTypeBool);
170  vtkBooleanMacro(RotationEnabled, vtkTypeBool);
171  vtkSetMacro(MoveFacesEnabled, vtkTypeBool);
172  vtkGetMacro(MoveFacesEnabled, vtkTypeBool);
173  vtkBooleanMacro(MoveFacesEnabled, vtkTypeBool);
175 
181 
186  void SetEnabled(int enabling) override;
187 
188 protected:
190  ~vtkBoxWidget2() override;
191 
192  // Manage the state of the widget
195  {
196  Start = 0,
197  Active
198  };
199 
200  // These methods handle events
210 
211  // Control whether scaling, rotation, and translation are supported
216 
218  static void ProcessKeyEvents(vtkObject*, unsigned long, void*, void*);
219 
220 private:
221  vtkBoxWidget2(const vtkBoxWidget2&) = delete;
222  void operator=(const vtkBoxWidget2&) = delete;
223 };
224 
225 #endif
vtkBoxWidget2
3D widget for manipulating a box
Definition: vtkBoxWidget2.h:128
vtkBoxWidget2::CreateDefaultRepresentation
void CreateDefaultRepresentation() override
Create the default widget representation if one is not set.
vtkBoxWidget2::EndSelectAction
static void EndSelectAction(vtkAbstractWidget *)
vtkHandleWidget
a general widget for moving handles
Definition: vtkHandleWidget.h:79
vtkBoxWidget2::WidgetState
int WidgetState
Definition: vtkBoxWidget2.h:193
vtkBoxRepresentation
a class defining the representation for the vtkBoxWidget2
Definition: vtkBoxRepresentation.h:79
vtkAbstractWidget.h
vtkBoxWidget2::SelectAction
static void SelectAction(vtkAbstractWidget *)
vtkWidgetRepresentation
abstract class defines interface between the widget and widget representation classes
Definition: vtkWidgetRepresentation.h:60
vtkObject
abstract base class for most VTK objects
Definition: vtkObject.h:82
vtkBoxWidget2::TranslationEnabled
vtkTypeBool TranslationEnabled
Definition: vtkBoxWidget2.h:212
vtkBoxWidget2::MoveAction3D
static void MoveAction3D(vtkAbstractWidget *)
vtkBoxWidget2::ScalingEnabled
vtkTypeBool ScalingEnabled
Definition: vtkBoxWidget2.h:213
vtkAbstractWidget
define the API for widget / widget representation
Definition: vtkAbstractWidget.h:66
vtkBoxWidget2::ScaleAction
static void ScaleAction(vtkAbstractWidget *)
vtkBoxWidget2::vtkBoxWidget2
vtkBoxWidget2()
vtkBoxWidget2::KeyEventCallbackCommand
vtkCallbackCommand * KeyEventCallbackCommand
Definition: vtkBoxWidget2.h:217
vtkBoxWidget2::New
static vtkBoxWidget2 * New()
Instantiate the object.
vtkBoxWidget2::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Standard class methods for type information and printing.
vtkBoxWidget2::SetRepresentation
void SetRepresentation(vtkBoxRepresentation *r)
Specify an instance of vtkWidgetRepresentation used to represent this widget in the scene.
Definition: vtkBoxWidget2.h:148
vtkBoxWidget2::EndSelectAction3D
static void EndSelectAction3D(vtkAbstractWidget *)
vtkBoxWidget2::StepAction3D
static void StepAction3D(vtkAbstractWidget *)
vtkBoxWidget2::SelectAction3D
static void SelectAction3D(vtkAbstractWidget *)
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:113
vtkBoxWidget2::SetEnabled
void SetEnabled(int enabling) override
Override superclasses' SetEnabled() method because the line widget must enable its internal handle wi...
vtkBoxWidget2::MoveFacesEnabled
vtkTypeBool MoveFacesEnabled
Definition: vtkBoxWidget2.h:215
vtkCallbackCommand
supports function callbacks
Definition: vtkCallbackCommand.h:154
vtkBoxWidget2::TranslateAction
static void TranslateAction(vtkAbstractWidget *)
vtkBoxWidget2::~vtkBoxWidget2
~vtkBoxWidget2() override
vtkBoxWidget2::_WidgetState
_WidgetState
Definition: vtkBoxWidget2.h:195
vtkBoxWidget2::RotationEnabled
vtkTypeBool RotationEnabled
Definition: vtkBoxWidget2.h:214
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69
vtkBoxWidget2::ProcessKeyEvents
static void ProcessKeyEvents(vtkObject *, unsigned long, void *, void *)
vtkBoxWidget2::MoveAction
static void MoveAction(vtkAbstractWidget *)