VTK  9.5.2
vtkLineWidget2.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
91
92#ifndef vtkLineWidget2_h
93#define vtkLineWidget2_h
94
95#include "vtkAbstractWidget.h"
96#include "vtkInteractionWidgetsModule.h" // For export macro
97#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
98
99VTK_ABI_NAMESPACE_BEGIN
101class vtkHandleWidget;
102
103class VTKINTERACTIONWIDGETS_EXPORT VTK_MARSHALAUTO vtkLineWidget2 : public vtkAbstractWidget
104{
105public:
110
112
116 void PrintSelf(ostream& os, vtkIndent indent) override;
118
123 void SetEnabled(int enabling) override;
124
134
139 {
140 return reinterpret_cast<vtkLineRepresentation*>(this->WidgetRep);
141 }
142
147
153
154protected:
156 ~vtkLineWidget2() override;
157
158 // Manage the state of the widget
161 {
162 Start = 0,
164 };
165
167
168 // These methods handle events
174
175 // The positioning handle widgets
176 vtkHandleWidget* Point1Widget; // first end point
177 vtkHandleWidget* Point2Widget; // second end point
178 vtkHandleWidget* LineHandle; // used when selecting the line
179
181 static void ProcessKeyEvents(vtkObject*, unsigned long, void*, void*);
182
183private:
184 vtkLineWidget2(const vtkLineWidget2&) = delete;
185 void operator=(const vtkLineWidget2&) = delete;
186};
187
188VTK_ABI_NAMESPACE_END
189#endif
void SetWidgetRepresentation(vtkWidgetRepresentation *r)
vtkWidgetRepresentation * WidgetRep
supports function callbacks
a general widget for moving handles
a simple class to control print indentation
Definition vtkIndent.h:108
a class defining the representation for a vtkLineWidget2
~vtkLineWidget2() override
vtkHandleWidget * Point1Widget
static void ProcessKeyEvents(vtkObject *, unsigned long, void *, void *)
vtkHandleWidget * Point2Widget
void SetRepresentation(vtkLineRepresentation *r)
Specify an instance of vtkWidgetRepresentation used to represent this widget in the scene.
vtkCallbackCommand * KeyEventCallbackCommand
static void EndSelectAction(vtkAbstractWidget *)
vtkLineRepresentation * GetLineRepresentation()
Return the representation as a vtkLineRepresentation.
void CreateDefaultRepresentation() override
Create the default widget representation if one is not set.
static void MoveAction(vtkAbstractWidget *)
void PrintSelf(ostream &os, vtkIndent indent) override
Standard vtkObject methods.
static void ScaleAction(vtkAbstractWidget *)
void SetEnabled(int enabling) override
Override superclasses' SetEnabled() method because the line widget must enable its internal handle wi...
static void TranslateAction(vtkAbstractWidget *)
static vtkLineWidget2 * New()
Instantiate the object.
vtkHandleWidget * LineHandle
static void SelectAction(vtkAbstractWidget *)
void SetProcessEvents(vtkTypeBool) override
Methods to change the whether the widget responds to interaction.
abstract class defines interface between the widget and widget representation classes
int vtkTypeBool
Definition vtkABI.h:64
#define VTK_MARSHALAUTO