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
90
91#ifndef vtkAngleWidget_h
92#define vtkAngleWidget_h
93
94#include "vtkAbstractWidget.h"
95#include "vtkInteractionWidgetsModule.h" // For export macro
96#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
97
98VTK_ABI_NAMESPACE_BEGIN
100class vtkHandleWidget;
101class vtkAngleWidgetCallback;
102
103class VTKINTERACTIONWIDGETS_EXPORT VTK_MARSHALAUTO vtkAngleWidget : public vtkAbstractWidget
104{
105public:
110
112
116 void PrintSelf(ostream& os, vtkIndent indent) override;
118
124 void SetEnabled(int) override;
125
135
140
145 {
146 return reinterpret_cast<vtkAngleRepresentation*>(this->WidgetRep);
147 }
148
154
160
166
167 enum
168 {
169 Start = 0,
172 };
173
175
185 virtual void SetWidgetStateToStart();
188
192 virtual int GetWidgetState() { return this->WidgetState; }
193
194protected:
196 ~vtkAngleWidget() override;
197
198 // The state of the widget
201
202 // Callback interface to capture events when
203 // placing the widget.
207
208 // The positioning handle widgets
215
216 // Methods invoked when the handles at the
217 // end points of the widget are manipulated
218 void StartAngleInteraction(int handleNum);
219 void AngleInteraction(int handleNum);
220 void EndAngleInteraction(int handleNum);
221
223
224private:
225 vtkAngleWidget(const vtkAngleWidget&) = delete;
226 void operator=(const vtkAngleWidget&) = delete;
227};
228
229VTK_ABI_NAMESPACE_END
230#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:108
abstract class defines interface between the widget and widget representation classes
int vtkTypeBool
Definition vtkABI.h:64
#define VTK_MARSHALAUTO