VTK  9.3.0
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
82#ifndef vtkLineWidget2_h
83#define vtkLineWidget2_h
84
85#include "vtkAbstractWidget.h"
86#include "vtkDeprecation.h" // For VTK_DEPRECATED_IN_9_2_0
87#include "vtkInteractionWidgetsModule.h" // For export macro
88#include "vtkLegacy.h" // for VTK_LEGACY_REMOVE
89
90VTK_ABI_NAMESPACE_BEGIN
92class vtkHandleWidget;
93
94class VTKINTERACTIONWIDGETS_EXPORT vtkLineWidget2 : public vtkAbstractWidget
95{
96public:
101
103
107 void PrintSelf(ostream& os, vtkIndent indent) override;
109
114 void SetEnabled(int enabling) override;
115
122 {
123 this->Superclass::SetWidgetRepresentation(reinterpret_cast<vtkWidgetRepresentation*>(r));
124 }
125
130 {
131 return reinterpret_cast<vtkLineRepresentation*>(this->WidgetRep);
132 }
133
138
144
145protected:
147 ~vtkLineWidget2() override;
148
149 // Manage the state of the widget
152 {
153 Start = 0,
154 Active
155 };
156#if !defined(VTK_LEGACY_REMOVE)
157 VTK_DEPRECATED_IN_9_2_0("because leading underscore is reserved")
159#endif
160
162
163 // These methods handle events
169
170 // The positioning handle widgets
171 vtkHandleWidget* Point1Widget; // first end point
172 vtkHandleWidget* Point2Widget; // second end point
173 vtkHandleWidget* LineHandle; // used when selecting the line
174
176 static void ProcessKeyEvents(vtkObject*, unsigned long, void*, void*);
177
178private:
179 vtkLineWidget2(const vtkLineWidget2&) = delete;
180 void operator=(const vtkLineWidget2&) = delete;
181};
182
183VTK_ABI_NAMESPACE_END
184#endif
define the API for widget / widget representation
vtkWidgetRepresentation * WidgetRep
supports function callbacks
a general widget for moving handles
a simple class to control print indentation
Definition vtkIndent.h:38
a class defining the representation for a vtkLineWidget2
3D widget for manipulating a finite, straight line
~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 base class for most VTK objects
Definition vtkObject.h:58
abstract class defines interface between the widget and widget representation classes
int vtkTypeBool
Definition vtkABI.h:64
#define VTK_DEPRECATED_IN_9_2_0(reason)