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
87 #ifndef vtkBoxWidget2_h
88 #define vtkBoxWidget2_h
89 
90 #include "vtkAbstractWidget.h"
91 #include "vtkDeprecation.h" // For VTK_DEPRECATED_IN_9_2_0
92 #include "vtkInteractionWidgetsModule.h" // For export macro
93 #include "vtkLegacy.h" // for VTK_LEGACY_REMOVE
94 
95 VTK_ABI_NAMESPACE_BEGIN
97 class vtkHandleWidget;
98 
99 class VTKINTERACTIONWIDGETS_EXPORT vtkBoxWidget2 : public vtkAbstractWidget
100 {
101 public:
105  static vtkBoxWidget2* New();
106 
108 
112  void PrintSelf(ostream& os, vtkIndent indent) override;
114 
121  {
122  this->Superclass::SetWidgetRepresentation(reinterpret_cast<vtkWidgetRepresentation*>(r));
123  }
124 
126 
134  vtkSetMacro(TranslationEnabled, vtkTypeBool);
135  vtkGetMacro(TranslationEnabled, vtkTypeBool);
136  vtkBooleanMacro(TranslationEnabled, vtkTypeBool);
137  vtkSetMacro(ScalingEnabled, vtkTypeBool);
138  vtkGetMacro(ScalingEnabled, vtkTypeBool);
139  vtkBooleanMacro(ScalingEnabled, vtkTypeBool);
140  vtkSetMacro(RotationEnabled, vtkTypeBool);
141  vtkGetMacro(RotationEnabled, vtkTypeBool);
142  vtkBooleanMacro(RotationEnabled, vtkTypeBool);
143  vtkSetMacro(MoveFacesEnabled, vtkTypeBool);
144  vtkGetMacro(MoveFacesEnabled, vtkTypeBool);
145  vtkBooleanMacro(MoveFacesEnabled, vtkTypeBool);
147 
153 
158  void SetEnabled(int enabling) override;
159 
160 protected:
162  ~vtkBoxWidget2() override;
163 
164  // Manage the state of the widget
167  {
168  Start = 0,
169  Active
170  };
171 #if !defined(VTK_LEGACY_REMOVE)
172  VTK_DEPRECATED_IN_9_2_0("because leading underscore is reserved")
174 #endif
175 
176  // These methods handle events
186 
187  // Control whether scaling, rotation, and translation are supported
192 
194  static void ProcessKeyEvents(vtkObject*, unsigned long, void*, void*);
195 
196 private:
197  vtkBoxWidget2(const vtkBoxWidget2&) = delete;
198  void operator=(const vtkBoxWidget2&) = delete;
199 };
200 
201 VTK_ABI_NAMESPACE_END
202 #endif
define the API for widget / widget representation
a class defining the representation for the vtkBoxWidget2
3D widget for manipulating a box
static vtkBoxWidget2 * New()
Instantiate the object.
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 *)
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:52
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)