VTK  9.2.6
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=========================================================================*/
115#ifndef vtkBoxWidget2_h
116#define vtkBoxWidget2_h
117
118#include "vtkAbstractWidget.h"
119#include "vtkDeprecation.h" // For VTK_DEPRECATED_IN_9_2_0
120#include "vtkInteractionWidgetsModule.h" // For export macro
121
123class vtkHandleWidget;
124
125class VTKINTERACTIONWIDGETS_EXPORT vtkBoxWidget2 : public vtkAbstractWidget
126{
127public:
132
134
138 void PrintSelf(ostream& os, vtkIndent indent) override;
140
147 {
148 this->Superclass::SetWidgetRepresentation(reinterpret_cast<vtkWidgetRepresentation*>(r));
149 }
150
152
160 vtkSetMacro(TranslationEnabled, vtkTypeBool);
161 vtkGetMacro(TranslationEnabled, vtkTypeBool);
162 vtkBooleanMacro(TranslationEnabled, vtkTypeBool);
163 vtkSetMacro(ScalingEnabled, vtkTypeBool);
164 vtkGetMacro(ScalingEnabled, vtkTypeBool);
165 vtkBooleanMacro(ScalingEnabled, vtkTypeBool);
166 vtkSetMacro(RotationEnabled, vtkTypeBool);
167 vtkGetMacro(RotationEnabled, vtkTypeBool);
168 vtkBooleanMacro(RotationEnabled, vtkTypeBool);
169 vtkSetMacro(MoveFacesEnabled, vtkTypeBool);
170 vtkGetMacro(MoveFacesEnabled, vtkTypeBool);
171 vtkBooleanMacro(MoveFacesEnabled, vtkTypeBool);
173
179
184 void SetEnabled(int enabling) override;
185
186protected:
188 ~vtkBoxWidget2() override;
189
190 // Manage the state of the widget
193 {
194 Start = 0,
195 Active
196 };
197#if !defined(VTK_LEGACY_REMOVE)
198 VTK_DEPRECATED_IN_9_2_0("because leading underscore is reserved")
200#endif
201
202 // These methods handle events
212
213 // Control whether scaling, rotation, and translation are supported
218
220 static void ProcessKeyEvents(vtkObject*, unsigned long, void*, void*);
221
222private:
223 vtkBoxWidget2(const vtkBoxWidget2&) = delete;
224 void operator=(const vtkBoxWidget2&) = delete;
225};
226
227#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:119
abstract base class for most VTK objects
Definition: vtkObject.h:79
abstract class defines interface between the widget and widget representation classes
int vtkTypeBool
Definition: vtkABI.h:69
#define VTK_DEPRECATED_IN_9_2_0(reason)