VTK  9.3.0
vtkSphereWidget2.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
90 #ifndef vtkSphereWidget2_h
91 #define vtkSphereWidget2_h
92 
93 #include "vtkAbstractWidget.h"
94 #include "vtkDeprecation.h" // For VTK_DEPRECATED_IN_9_2_0
95 #include "vtkInteractionWidgetsModule.h" // For export macro
96 #include "vtkLegacy.h" // for VTK_LEGACY_REMOVE
97 
98 VTK_ABI_NAMESPACE_BEGIN
100 class vtkHandleWidget;
101 
102 class VTKINTERACTIONWIDGETS_EXPORT vtkSphereWidget2 : public vtkAbstractWidget
103 {
104 public:
109 
111 
115  void PrintSelf(ostream& os, vtkIndent indent) override;
117 
124  {
125  this->Superclass::SetWidgetRepresentation(reinterpret_cast<vtkWidgetRepresentation*>(r));
126  }
127 
129 
133  vtkSetMacro(TranslationEnabled, vtkTypeBool);
134  vtkGetMacro(TranslationEnabled, vtkTypeBool);
135  vtkBooleanMacro(TranslationEnabled, vtkTypeBool);
136  vtkSetMacro(ScalingEnabled, vtkTypeBool);
137  vtkGetMacro(ScalingEnabled, vtkTypeBool);
138  vtkBooleanMacro(ScalingEnabled, vtkTypeBool);
140 
146 
151  void SetEnabled(int enabling) override;
152 
153 protected:
155  ~vtkSphereWidget2() override;
156 
157  // Manage the state of the widget
160  {
161  Start = 0,
162  Active
163  };
164 #if !defined(VTK_LEGACY_REMOVE)
165  VTK_DEPRECATED_IN_9_2_0("because leading underscore is reserved")
167 #endif
168 
169  // These methods handle events
175 
176  // Control whether scaling and translation are supported
179 
181  static void ProcessKeyEvents(vtkObject*, unsigned long, void*, void*);
182 
183 private:
184  vtkSphereWidget2(const vtkSphereWidget2&) = delete;
185  void operator=(const vtkSphereWidget2&) = delete;
186 };
187 
188 VTK_ABI_NAMESPACE_END
189 #endif
define the API for widget / widget representation
supports function callbacks
a general widget for moving handles
a simple class to control print indentation
Definition: vtkIndent.h:38
abstract base class for most VTK objects
Definition: vtkObject.h:61
a class defining the representation for the vtkSphereWidget2
3D widget for manipulating a point on a sphere
static void TranslateAction(vtkAbstractWidget *)
static void ProcessKeyEvents(vtkObject *, unsigned long, void *, void *)
~vtkSphereWidget2() override
void CreateDefaultRepresentation() override
Create the default widget representation if one is not set.
static void ScaleAction(vtkAbstractWidget *)
void SetEnabled(int enabling) override
Override superclasses' SetEnabled() method because the line widget must enable its internal handle wi...
vtkCallbackCommand * KeyEventCallbackCommand
static vtkSphereWidget2 * New()
Instantiate the object.
static void SelectAction(vtkAbstractWidget *)
static void MoveAction(vtkAbstractWidget *)
void SetRepresentation(vtkSphereRepresentation *r)
Specify an instance of vtkWidgetRepresentation used to represent this widget in the scene.
vtkTypeBool ScalingEnabled
vtkTypeBool TranslationEnabled
void PrintSelf(ostream &os, vtkIndent indent) override
Standard class methods for type information and printing.
static void EndSelectAction(vtkAbstractWidget *)
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)