VTK  9.6.2
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
102
103#ifndef vtkBoxWidget2_h
104#define vtkBoxWidget2_h
105
106#include "vtkAbstractWidget.h"
107#include "vtkBoxRepresentation.h"
108#include "vtkInteractionWidgetsModule.h" // For export macro
109#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
110
111VTK_ABI_NAMESPACE_BEGIN
113class vtkHandleWidget;
114
115class VTKINTERACTIONWIDGETS_EXPORT VTK_MARSHALAUTO vtkBoxWidget2 : public vtkAbstractWidget
116{
117public:
122
124
128 void PrintSelf(ostream& os, vtkIndent indent) override;
130
140
142
155 vtkBooleanMacro(ScalingEnabled, vtkTypeBool);
158 vtkBooleanMacro(RotationEnabled, vtkTypeBool);
161 vtkBooleanMacro(MoveFacesEnabled, vtkTypeBool);
163
169
174 void SetEnabled(int enabling) override;
175
177
182 void SetRotationAxisMode(int mode);
189
190protected:
192 ~vtkBoxWidget2() override;
193
194 // Manage the state of the widget
197 {
198 Start = 0,
200 };
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
227VTK_ABI_NAMESPACE_END
228#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:108
abstract class defines interface between the widget and widget representation classes
int vtkTypeBool
Definition vtkABI.h:64
#define VTK_MARSHALAUTO