VTK  9.2.20230606
vtkPolyLineWidget.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkPolyLineWidget.h
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 =========================================================================*/
42 #ifndef vtkPolyLineWidget_h
43 #define vtkPolyLineWidget_h
44 
45 #include "vtkAbstractWidget.h"
46 #include "vtkDeprecation.h" // For VTK_DEPRECATED_IN_9_2_0
47 #include "vtkInteractionWidgetsModule.h" // For export macro
48 #include "vtkLegacy.h" // for VTK_LEGACY_REMOVE
49 
50 VTK_ABI_NAMESPACE_BEGIN
52 
53 class VTKINTERACTIONWIDGETS_EXPORT vtkPolyLineWidget : public vtkAbstractWidget
54 {
55 public:
58  void PrintSelf(ostream& os, vtkIndent indent) override;
59 
66  {
67  this->Superclass::SetWidgetRepresentation(reinterpret_cast<vtkWidgetRepresentation*>(r));
68  }
69 
74  void CreateDefaultRepresentation() override;
75 
80  void SetEnabled(int enabling) override;
81 
82 protected:
84  ~vtkPolyLineWidget() override;
85 
88  {
89  Start = 0,
90  Active
91  };
92 #if !defined(VTK_LEGACY_REMOVE)
93  VTK_DEPRECATED_IN_9_2_0("because leading underscore is reserved")
95 #endif
96 
97  // These methods handle events
103 
105  static void ProcessKeyEvents(vtkObject*, unsigned long, void*, void*);
106 
107 private:
108  vtkPolyLineWidget(const vtkPolyLineWidget&) = delete;
109  void operator=(const vtkPolyLineWidget&) = delete;
110 };
111 
112 VTK_ABI_NAMESPACE_END
113 #endif
define the API for widget / widget representation
supports function callbacks
a simple class to control print indentation
Definition: vtkIndent.h:120
abstract base class for most VTK objects
Definition: vtkObject.h:83
vtkWidgetRepresentation for a poly line.
widget for vtkPolyLineRepresentation.
void PrintSelf(ostream &os, vtkIndent indent) override
Standard macros implementing standard VTK methods.
void CreateDefaultRepresentation() override
Create the default widget representation if one is not set.
vtkCallbackCommand * KeyEventCallbackCommand
static void SelectAction(vtkAbstractWidget *)
static vtkPolyLineWidget * New()
static void MoveAction(vtkAbstractWidget *)
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 ProcessKeyEvents(vtkObject *, unsigned long, void *, void *)
void SetRepresentation(vtkPolyLineRepresentation *r)
Specify an instance of vtkWidgetRepresentation used to represent this widget in the scene.
~vtkPolyLineWidget() override
static void EndSelectAction(vtkAbstractWidget *)
static void TranslateAction(vtkAbstractWidget *)
abstract class defines interface between the widget and widget representation classes
#define VTK_DEPRECATED_IN_9_2_0(reason)