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=========================================================================*/
99#ifndef vtkBoxWidget2_h
100#define vtkBoxWidget2_h
101
102#include "vtkAbstractWidget.h"
103#include "vtkInteractionWidgetsModule.h" // For export macro
104
106class vtkHandleWidget;
107
108class VTKINTERACTIONWIDGETS_EXPORT vtkBoxWidget2 : public vtkAbstractWidget
109{
110public:
115
117
121 void PrintSelf(ostream& os, vtkIndent indent) override;
123
130 {
131 this->Superclass::SetWidgetRepresentation(reinterpret_cast<vtkWidgetRepresentation*>(r));
132 }
133
135
143 vtkSetMacro(TranslationEnabled, vtkTypeBool);
144 vtkGetMacro(TranslationEnabled, vtkTypeBool);
145 vtkBooleanMacro(TranslationEnabled, vtkTypeBool);
146 vtkSetMacro(ScalingEnabled, vtkTypeBool);
147 vtkGetMacro(ScalingEnabled, vtkTypeBool);
148 vtkBooleanMacro(ScalingEnabled, vtkTypeBool);
149 vtkSetMacro(RotationEnabled, vtkTypeBool);
150 vtkGetMacro(RotationEnabled, vtkTypeBool);
151 vtkBooleanMacro(RotationEnabled, vtkTypeBool);
152 vtkSetMacro(MoveFacesEnabled, vtkTypeBool);
153 vtkGetMacro(MoveFacesEnabled, vtkTypeBool);
154 vtkBooleanMacro(MoveFacesEnabled, vtkTypeBool);
156
162
167 void SetEnabled(int enabling) override;
168
169protected:
171 ~vtkBoxWidget2() override;
172
173 // Manage the state of the widget
176 {
177 Start = 0,
178 Active
179 };
180
181 // These methods handle events
191
192 // Control whether scaling, rotation, and translation are supported
197
199 static void ProcessKeyEvents(vtkObject*, unsigned long, void*, void*);
200
201private:
202 vtkBoxWidget2(const vtkBoxWidget2&) = delete;
203 void operator=(const vtkBoxWidget2&) = delete;
204};
205
206#endif
define the API for widget / widget representation
a class defining the representation for the vtkBoxWidget2
3D widget for manipulating a box
vtkTypeBool MoveFacesEnabled
void CreateDefaultRepresentation() override
Create the default widget representation if one is not set.
void SetRepresentation(vtkBoxRepresentation *r)
Specify an instance of vtkWidgetRepresentation used to represent this widget in the scene.
static void SelectAction3D(vtkAbstractWidget *)
void SetEnabled(int enabling) override
Override superclasses' SetEnabled() method because the line widget must enable its internal handle wi...
static void ScaleAction(vtkAbstractWidget *)
static void ProcessKeyEvents(vtkObject *, unsigned long, void *, void *)
~vtkBoxWidget2() override
static void SelectAction(vtkAbstractWidget *)
static void EndSelectAction(vtkAbstractWidget *)
static void EndSelectAction3D(vtkAbstractWidget *)
static void TranslateAction(vtkAbstractWidget *)
vtkTypeBool TranslationEnabled
vtkTypeBool RotationEnabled
static void MoveAction3D(vtkAbstractWidget *)
static void MoveAction(vtkAbstractWidget *)
static vtkBoxWidget2 * New()
Instantiate the object.
vtkTypeBool ScalingEnabled
void PrintSelf(ostream &os, vtkIndent indent) override
Standard class methods for type information and printing.
vtkCallbackCommand * KeyEventCallbackCommand
static void StepAction3D(vtkAbstractWidget *)
supports function callbacks
a general widget for moving handles
a simple class to control print indentation
Definition: vtkIndent.h:34
abstract base class for most VTK objects
Definition: vtkObject.h:63
abstract class defines interface between the widget and widget representation classes
int vtkTypeBool
Definition: vtkABI.h:69