VTK  9.7.1
vtkPolyLineWidget.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
30 #ifndef vtkPolyLineWidget_h
31 #define vtkPolyLineWidget_h
32 
33 #include "vtkAbstractWidget.h"
34 #include "vtkInteractionWidgetsModule.h" // For export macro
35 #include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
36 
37 VTK_ABI_NAMESPACE_BEGIN
39 
40 class VTKINTERACTIONWIDGETS_EXPORT VTK_MARSHALAUTO vtkPolyLineWidget : public vtkAbstractWidget
41 {
42 public:
43  static vtkPolyLineWidget* New();
45  void PrintSelf(ostream& os, vtkIndent indent) override;
46 
53  {
54  this->Superclass::SetWidgetRepresentation(reinterpret_cast<vtkWidgetRepresentation*>(r));
55  }
56 
61  void CreateDefaultRepresentation() override;
62 
67  void SetEnabled(int enabling) override;
68 
69 protected:
71  ~vtkPolyLineWidget() override;
72 
75  {
76  Start = 0,
77  Active
78  };
79 
80  // These methods handle events
81  static void SelectAction(vtkAbstractWidget*);
82  static void EndSelectAction(vtkAbstractWidget*);
83  static void TranslateAction(vtkAbstractWidget*);
84  static void ScaleAction(vtkAbstractWidget*);
85  static void MoveAction(vtkAbstractWidget*);
86 
88  static void ProcessKeyEvents(vtkObject*, unsigned long, void*, void*);
89 
90 private:
91  vtkPolyLineWidget(const vtkPolyLineWidget&) = delete;
92  void operator=(const vtkPolyLineWidget&) = delete;
93 };
94 
95 VTK_ABI_NAMESPACE_END
96 #endif
widget for vtkPolyLineRepresentation.
abstract base class for most VTK objects
Definition: vtkObject.h:52
void PrintSelf(ostream &os, vtkIndent indent) override
Standard macros implementing standard VTK methods.
virtual void CreateDefaultRepresentation()=0
Create the default widget representation if one is not set.
vtkWidgetRepresentation for a poly line.
supports function callbacks
a simple class to control print indentation
Definition: vtkIndent.h:28
define the API for widget / widget representation
void SetEnabled(int) override
Methods for activating this widget.
#define VTK_MARSHALAUTO
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
vtkCallbackCommand * KeyEventCallbackCommand
void SetRepresentation(vtkPolyLineRepresentation *r)
Specify an instance of vtkWidgetRepresentation used to represent this widget in the scene...