VTK  9.0.1
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 =========================================================================*/
39 #ifndef vtkPolyLineWidget_h
40 #define vtkPolyLineWidget_h
41 
42 #include "vtkAbstractWidget.h"
43 #include "vtkInteractionWidgetsModule.h" // For export macro
44 
46 
47 class VTKINTERACTIONWIDGETS_EXPORT vtkPolyLineWidget : public vtkAbstractWidget
48 {
49 public:
50  static vtkPolyLineWidget* New();
52  void PrintSelf(ostream& os, vtkIndent indent) override;
53 
60  {
61  this->Superclass::SetWidgetRepresentation(reinterpret_cast<vtkWidgetRepresentation*>(r));
62  }
63 
68  void CreateDefaultRepresentation() override;
69 
74  void SetEnabled(int enabling) override;
75 
76 protected:
78  ~vtkPolyLineWidget() override;
79 
82  {
83  Start = 0,
84  Active
85  };
86 
87  // These methods handle events
88  static void SelectAction(vtkAbstractWidget*);
89  static void EndSelectAction(vtkAbstractWidget*);
90  static void TranslateAction(vtkAbstractWidget*);
91  static void ScaleAction(vtkAbstractWidget*);
92  static void MoveAction(vtkAbstractWidget*);
93 
95  static void ProcessKeyEvents(vtkObject*, unsigned long, void*, void*);
96 
97 private:
98  vtkPolyLineWidget(const vtkPolyLineWidget&) = delete;
99  void operator=(const vtkPolyLineWidget&) = delete;
100 };
101 
102 #endif
widget for vtkPolyLineRepresentation.
abstract base class for most VTK objects
Definition: vtkObject.h:56
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:33
define the API for widget / widget representation
void SetEnabled(int) override
Methods for activating this widget.
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...