VTK  9.3.0
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
84#ifndef vtkBoxWidget2_h
85#define vtkBoxWidget2_h
86
87#include "vtkAbstractWidget.h"
88#include "vtkDeprecation.h" // For VTK_DEPRECATED_IN_9_2_0
89#include "vtkInteractionWidgetsModule.h" // For export macro
90#include "vtkLegacy.h" // for VTK_LEGACY_REMOVE
91
92VTK_ABI_NAMESPACE_BEGIN
94class vtkHandleWidget;
95
96class VTKINTERACTIONWIDGETS_EXPORT vtkBoxWidget2 : public vtkAbstractWidget
97{
98public:
103
105
109 void PrintSelf(ostream& os, vtkIndent indent) override;
111
118 {
119 this->Superclass::SetWidgetRepresentation(reinterpret_cast<vtkWidgetRepresentation*>(r));
120 }
121
123
131 vtkSetMacro(TranslationEnabled, vtkTypeBool);
132 vtkGetMacro(TranslationEnabled, vtkTypeBool);
133 vtkBooleanMacro(TranslationEnabled, vtkTypeBool);
134 vtkSetMacro(ScalingEnabled, vtkTypeBool);
135 vtkGetMacro(ScalingEnabled, vtkTypeBool);
136 vtkBooleanMacro(ScalingEnabled, vtkTypeBool);
137 vtkSetMacro(RotationEnabled, vtkTypeBool);
138 vtkGetMacro(RotationEnabled, vtkTypeBool);
139 vtkBooleanMacro(RotationEnabled, vtkTypeBool);
140 vtkSetMacro(MoveFacesEnabled, vtkTypeBool);
141 vtkGetMacro(MoveFacesEnabled, vtkTypeBool);
142 vtkBooleanMacro(MoveFacesEnabled, vtkTypeBool);
144
150
155 void SetEnabled(int enabling) override;
156
157protected:
159 ~vtkBoxWidget2() override;
160
161 // Manage the state of the widget
164 {
165 Start = 0,
166 Active
167 };
168#if !defined(VTK_LEGACY_REMOVE)
169 VTK_DEPRECATED_IN_9_2_0("because leading underscore is reserved")
171#endif
172
173 // These methods handle events
183
184 // Control whether scaling, rotation, and translation are supported
189
191 static void ProcessKeyEvents(vtkObject*, unsigned long, void*, void*);
192
193private:
194 vtkBoxWidget2(const vtkBoxWidget2&) = delete;
195 void operator=(const vtkBoxWidget2&) = delete;
196};
197
198VTK_ABI_NAMESPACE_END
199#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:29
abstract base class for most VTK objects
Definition vtkObject.h:49
abstract class defines interface between the widget and widget representation classes
int vtkTypeBool
Definition vtkABI.h:64
#define VTK_DEPRECATED_IN_9_2_0(reason)