VTK  9.5.2
vtkAngleWidget.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
61
62#ifndef vtkAngleWidget_h
63#define vtkAngleWidget_h
64
65#include "vtkAbstractWidget.h"
66#include "vtkInteractionWidgetsModule.h" // For export macro
67#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
68
69VTK_ABI_NAMESPACE_BEGIN
71class vtkHandleWidget;
72class vtkAngleWidgetCallback;
73
74class VTKINTERACTIONWIDGETS_EXPORT VTK_MARSHALAUTO vtkAngleWidget : public vtkAbstractWidget
75{
76public:
81
83
87 void PrintSelf(ostream& os, vtkIndent indent) override;
89
95 void SetEnabled(int) override;
96
106
111
116 {
117 return reinterpret_cast<vtkAngleRepresentation*>(this->WidgetRep);
118 }
119
125
131
137
138 enum
139 {
140 Start = 0,
143 };
144
146
156 virtual void SetWidgetStateToStart();
159
163 virtual int GetWidgetState() { return this->WidgetState; }
164
165protected:
167 ~vtkAngleWidget() override;
168
169 // The state of the widget
172
173 // Callback interface to capture events when
174 // placing the widget.
178
179 // The positioning handle widgets
186
187 // Methods invoked when the handles at the
188 // end points of the widget are manipulated
189 void StartAngleInteraction(int handleNum);
190 void AngleInteraction(int handleNum);
191 void EndAngleInteraction(int handleNum);
192
194
195private:
196 vtkAngleWidget(const vtkAngleWidget&) = delete;
197 void operator=(const vtkAngleWidget&) = delete;
198};
199
200VTK_ABI_NAMESPACE_END
201#endif
void SetWidgetRepresentation(vtkWidgetRepresentation *r)
vtkWidgetRepresentation * WidgetRep
represent the vtkAngleWidget
~vtkAngleWidget() override
void CreateDefaultRepresentation() override
Create the default widget representation if one is not set.
vtkAngleWidgetCallback * AngleWidgetCallback2
vtkAngleWidgetCallback * AngleWidgetCallback1
vtkHandleWidget * Point2Widget
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for a VTK class.
vtkAngleRepresentation * GetAngleRepresentation()
Return the representation as a vtkAngleRepresentation.
vtkTypeBool IsAngleValid()
A flag indicates whether the angle is valid.
vtkAngleWidgetCallback * AngleWidgetCenterCallback
virtual void SetWidgetStateToStart()
Set the state of the widget.
virtual int GetWidgetState()
Return the current widget state.
vtkHandleWidget * CenterWidget
static void EndSelectAction(vtkAbstractWidget *)
static void AddPointAction(vtkAbstractWidget *)
static vtkAngleWidget * New()
Instantiate this class.
void AngleInteraction(int handleNum)
void SetRepresentation(vtkAngleRepresentation *r)
Specify an instance of vtkWidgetRepresentation used to represent this widget in the scene.
static void MoveAction(vtkAbstractWidget *)
void StartAngleInteraction(int handleNum)
virtual void SetWidgetStateToManipulate()
Set the state of the widget.
void SetProcessEvents(vtkTypeBool) override
Methods to change the whether the widget responds to interaction.
vtkHandleWidget * Point1Widget
void SetEnabled(int) override
The method for activating and deactivating this widget.
void EndAngleInteraction(int handleNum)
friend class vtkAngleWidgetCallback
a general widget for moving handles
a simple class to control print indentation
Definition vtkIndent.h:29
abstract class defines interface between the widget and widget representation classes
int vtkTypeBool
Definition vtkABI.h:64
#define VTK_MARSHALAUTO