VTK  9.3.1
vtkAxesTransformWidget.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
75 #ifndef vtkAxesTransformWidget_h
76 #define vtkAxesTransformWidget_h
77 
78 #include "vtkAbstractWidget.h"
79 #include "vtkDeprecation.h" // For VTK_DEPRECATED_IN_9_2_0
80 #include "vtkInteractionWidgetsModule.h" // For export macro
81 #include "vtkLegacy.h" // for VTK_LEGACY_REMOVE
82 
83 VTK_ABI_NAMESPACE_BEGIN
85 class vtkHandleWidget;
86 
87 class VTKINTERACTIONWIDGETS_EXPORT vtkAxesTransformWidget : public vtkAbstractWidget
88 {
89 public:
93  static vtkAxesTransformWidget* New();
94 
96 
100  void PrintSelf(ostream& os, vtkIndent indent) override;
102 
107  void SetEnabled(int enabling) override;
108 
115  {
116  this->Superclass::SetWidgetRepresentation(reinterpret_cast<vtkWidgetRepresentation*>(r));
117  }
118 
123  {
124  return reinterpret_cast<vtkAxesTransformRepresentation*>(this->WidgetRep);
125  }
126 
130  void CreateDefaultRepresentation() override;
131 
136  void SetProcessEvents(vtkTypeBool) override;
137 
138 protected:
140  ~vtkAxesTransformWidget() override;
141 
144  {
145  Start = 0,
146  Active
147  };
148 #if !defined(VTK_LEGACY_REMOVE)
149  VTK_DEPRECATED_IN_9_2_0("because leading underscore is reserved")
151 #endif
152 
154 
155  // These methods handle events
156  static void SelectAction(vtkAbstractWidget*);
157  static void EndSelectAction(vtkAbstractWidget*);
158  static void MoveAction(vtkAbstractWidget*);
159 
160  // The positioning handle widgets
161  vtkHandleWidget* OriginWidget; // first end point
162  vtkHandleWidget* SelectionWidget; // used when selecting any one of the axes
163 
164 private:
166  void operator=(const vtkAxesTransformWidget&) = delete;
167 };
168 
169 VTK_ABI_NAMESPACE_END
170 #endif
#define VTK_DEPRECATED_IN_9_2_0(reason)
void PrintSelf(ostream &os, vtkIndent indent) override
Standard macros implementing standard VTK methods.
a general widget for moving handles
virtual void CreateDefaultRepresentation()=0
Create the default widget representation if one is not set.
represent the vtkAxesTransformWidget
vtkWidgetRepresentation * WidgetRep
int vtkTypeBool
Definition: vtkABI.h:64
a simple class to control print indentation
Definition: vtkIndent.h:28
void SetRepresentation(vtkAxesTransformRepresentation *r)
Specify an instance of vtkWidgetRepresentation used to represent this widget in the scene...
define the API for widget / widget representation
virtual void SetProcessEvents(vtkTypeBool)
Methods to change whether the widget responds to interaction.
void SetEnabled(int) override
Methods for activating this widget.
3D widget for performing 3D transformations around an axes
vtkHandleWidget * SelectionWidget
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
vtkAxesTransformRepresentation * GetLineRepresentation()
Return the representation as a vtkAxesTransformRepresentation.