VTK  9.7.1
vtkImplicitAnnulusWidget.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
3 
76 #ifndef vtkImplicitAnnulusWidget_h
77 #define vtkImplicitAnnulusWidget_h
78 
79 #include "vtkAbstractWidget.h"
80 #include "vtkInteractionWidgetsModule.h" // For export macro
81 #include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
82 
83 VTK_ABI_NAMESPACE_BEGIN
85 
86 class VTKINTERACTIONWIDGETS_EXPORT VTK_MARSHALAUTO vtkImplicitAnnulusWidget
87  : public vtkAbstractWidget
88 {
89 public:
90  static vtkImplicitAnnulusWidget* New();
92 
98  void SetRepresentation(vtkImplicitAnnulusRepresentation* rep);
99 
104  {
105  return reinterpret_cast<vtkImplicitAnnulusRepresentation*>(this->WidgetRep);
106  }
107 
111  void CreateDefaultRepresentation() override;
112 
113 private:
114  enum WidgetStateType
115  {
116  Idle = 0,
117  Active
118  };
119 
121  ~vtkImplicitAnnulusWidget() override = default;
122 
124  void operator=(const vtkImplicitAnnulusWidget&) = delete;
125 
127 
130  static void SelectAction(vtkAbstractWidget* widget);
131  static void TranslateAction(vtkAbstractWidget* widget);
132  static void ScaleAction(vtkAbstractWidget* widget);
133  static void EndSelectAction(vtkAbstractWidget* widget);
134  static void MoveAction(vtkAbstractWidget* widget);
135  static void MoveAnnulusAction(vtkAbstractWidget* widget);
136  static void TranslationAxisLock(vtkAbstractWidget* widget);
137  static void TranslationAxisUnLock(vtkAbstractWidget* widget);
139 
144  bool UpdateCursorShape(int interactionState);
145 
146  // Manage the state of the widget
147  WidgetStateType WidgetState = vtkImplicitAnnulusWidget::Idle;
148 };
149 
150 VTK_ABI_NAMESPACE_END
151 #endif
defining the representation for a vtkImplicitAnnulusWidget
virtual void CreateDefaultRepresentation()=0
Create the default widget representation if one is not set.
vtkWidgetRepresentation * WidgetRep
vtkImplicitAnnulusRepresentation * GetAnnulusRepresentation()
Return the representation as a vtkImplicitAnnulusRepresentation.
define the API for widget / widget representation
3D widget for manipulating an infinite annulus
#define VTK_MARSHALAUTO
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...