VTK  9.6.1
vtkBoxWidget2.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
86
87#ifndef vtkBoxWidget2_h
88#define vtkBoxWidget2_h
89
90#include "vtkAbstractWidget.h"
92#include "vtkInteractionWidgetsModule.h" // For export macro
93#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
94
95VTK_ABI_NAMESPACE_BEGIN
97class vtkHandleWidget;
98
99class VTKINTERACTIONWIDGETS_EXPORT VTK_MARSHALAUTO vtkBoxWidget2 : public vtkAbstractWidget
100{
101public:
106
108
112 void PrintSelf(ostream& os, vtkIndent indent) override;
114
124
126
139 vtkBooleanMacro(ScalingEnabled, vtkTypeBool);
142 vtkBooleanMacro(RotationEnabled, vtkTypeBool);
145 vtkBooleanMacro(MoveFacesEnabled, vtkTypeBool);
147
153
158 void SetEnabled(int enabling) override;
159
161
166 void SetRotationAxisMode(int mode);
173
174protected:
176 ~vtkBoxWidget2() override;
177
178 // Manage the state of the widget
181 {
182 Start = 0,
184 };
185
186 // These methods handle events
196
197 // Control whether scaling, rotation, and translation are supported
202
204 static void ProcessKeyEvents(vtkObject*, unsigned long, void*, void*);
205
206private:
207 vtkBoxWidget2(const vtkBoxWidget2&) = delete;
208 void operator=(const vtkBoxWidget2&) = delete;
209};
210
211VTK_ABI_NAMESPACE_END
212#endif
void SetWidgetRepresentation(vtkWidgetRepresentation *r)
a class defining the representation for the vtkBoxWidget2
vtkTypeBool MoveFacesEnabled
void CreateDefaultRepresentation() override
Create the default widget representation if one is not set.
void SetRotationAxisModeToX()
Get/Set the rotation mode of the box.
int GetRotationAxisMode()
Get/Set the rotation mode of the box.
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...
void SetRotationAxisModeToFree()
Get/Set the rotation mode of the box.
static void ScaleAction(vtkAbstractWidget *)
static void ProcessKeyEvents(vtkObject *, unsigned long, void *, void *)
~vtkBoxWidget2() override
void SetRotationAxisModeToZ()
Get/Set the rotation mode of the box.
static void SelectAction(vtkAbstractWidget *)
void SetRotationAxisModeToY()
Get/Set the rotation mode of the box.
static void EndSelectAction(vtkAbstractWidget *)
static void EndSelectAction3D(vtkAbstractWidget *)
void SetRotationAxisMode(int mode)
Get/Set the rotation mode of the box.
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:29
abstract class defines interface between the widget and widget representation classes
int vtkTypeBool
Definition vtkABI.h:64
#define VTK_MARSHALAUTO