VTK  9.2.6
vtkAngleWidget.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkAngleWidget.h,v
5
6 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7 All rights reserved.
8 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9
10 This software is distributed WITHOUT ANY WARRANTY; without even
11 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12 PURPOSE. See the above copyright notice for more information.
13
14=========================================================================*/
76
77#ifndef vtkAngleWidget_h
78#define vtkAngleWidget_h
79
80#include "vtkAbstractWidget.h"
81#include "vtkInteractionWidgetsModule.h" // For export macro
82
84class vtkHandleWidget;
85class vtkAngleWidgetCallback;
86
87class VTKINTERACTIONWIDGETS_EXPORT vtkAngleWidget : public vtkAbstractWidget
88{
89public:
94
96
100 void PrintSelf(ostream& os, vtkIndent indent) override;
102
108 void SetEnabled(int) override;
109
119
124
129 {
130 return reinterpret_cast<vtkAngleRepresentation*>(this->WidgetRep);
131 }
132
138
144
150
151 enum
152 {
153 Start = 0,
156 };
157
159
169 virtual void SetWidgetStateToStart();
172
176 virtual int GetWidgetState() { return this->WidgetState; }
177
178protected:
180 ~vtkAngleWidget() override;
181
182 // The state of the widget
185
186 // Callback interface to capture events when
187 // placing the widget.
191
192 // The positioning handle widgets
199
200 // Methods invoked when the handles at the
201 // end points of the widget are manipulated
202 void StartAngleInteraction(int handleNum);
203 void AngleInteraction(int handleNum);
204 void EndAngleInteraction(int handleNum);
205
207
208private:
209 vtkAngleWidget(const vtkAngleWidget&) = delete;
210 void operator=(const vtkAngleWidget&) = delete;
211};
212
213#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:40
abstract class defines interface between the widget and widget representation classes
int vtkTypeBool
Definition vtkABI.h:69