VTK  9.0.3
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 =========================================================================*/
36 #ifndef vtkPolyLineWidget_h
37 #define vtkPolyLineWidget_h
38 
39 #include "vtkAbstractWidget.h"
40 #include "vtkInteractionWidgetsModule.h" // For export macro
41 
43 
44 class VTKINTERACTIONWIDGETS_EXPORT vtkPolyLineWidget : public vtkAbstractWidget
45 {
46 public:
49  void PrintSelf(ostream& os, vtkIndent indent) override;
50 
57  {
58  this->Superclass::SetWidgetRepresentation(reinterpret_cast<vtkWidgetRepresentation*>(r));
59  }
60 
65  void CreateDefaultRepresentation() override;
66 
71  void SetEnabled(int enabling) override;
72 
73 protected:
75  ~vtkPolyLineWidget() override;
76 
79  {
80  Start = 0,
81  Active
82  };
83 
84  // These methods handle events
90 
92  static void ProcessKeyEvents(vtkObject*, unsigned long, void*, void*);
93 
94 private:
95  vtkPolyLineWidget(const vtkPolyLineWidget&) = delete;
96  void operator=(const vtkPolyLineWidget&) = delete;
97 };
98 
99 #endif
define the API for widget / widget representation
supports function callbacks
a simple class to control print indentation
Definition: vtkIndent.h:34
abstract base class for most VTK objects
Definition: vtkObject.h:54
vtkWidgetRepresentation for a poly line.
widget for vtkPolyLineRepresentation.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
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