VTK  9.6.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
75
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
83VTK_ABI_NAMESPACE_BEGIN
85
86class VTKINTERACTIONWIDGETS_EXPORT VTK_MARSHALAUTO vtkImplicitAnnulusWidget
87 : public vtkAbstractWidget
88{
89public:
90 static vtkImplicitAnnulusWidget* New();
91 vtkTypeMacro(vtkImplicitAnnulusWidget, vtkAbstractWidget);
92
99
107
112
113private:
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
150VTK_ABI_NAMESPACE_END
151#endif
define the API for widget / widget representation
vtkWidgetRepresentation * WidgetRep
defining the representation for a vtkImplicitAnnulusWidget
3D widget for manipulating an infinite annulus
static vtkImplicitAnnulusWidget * New()
void CreateDefaultRepresentation() override
Create the default widget representation if one is not set.
void SetRepresentation(vtkImplicitAnnulusRepresentation *rep)
Specify an instance of vtkWidgetRepresentation used to represent this widget in the scene.
vtkImplicitAnnulusRepresentation * GetAnnulusRepresentation()
Return the representation as a vtkImplicitAnnulusRepresentation.
#define VTK_MARSHALAUTO