VTK  9.0.20201030
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 "vtkInteractionWidgetsModule.h" // For export macro
47 
49 
50 class VTKINTERACTIONWIDGETS_EXPORT vtkPolyLineWidget : public vtkAbstractWidget
51 {
52 public:
53  static vtkPolyLineWidget* New();
55  void PrintSelf(ostream& os, vtkIndent indent) override;
56 
63  {
64  this->Superclass::SetWidgetRepresentation(reinterpret_cast<vtkWidgetRepresentation*>(r));
65  }
66 
71  void CreateDefaultRepresentation() override;
72 
77  void SetEnabled(int enabling) override;
78 
79 protected:
81  ~vtkPolyLineWidget() override;
82 
85  {
86  Start = 0,
87  Active
88  };
89 
90  // These methods handle events
91  static void SelectAction(vtkAbstractWidget*);
92  static void EndSelectAction(vtkAbstractWidget*);
93  static void TranslateAction(vtkAbstractWidget*);
94  static void ScaleAction(vtkAbstractWidget*);
95  static void MoveAction(vtkAbstractWidget*);
96 
98  static void ProcessKeyEvents(vtkObject*, unsigned long, void*, void*);
99 
100 private:
101  vtkPolyLineWidget(const vtkPolyLineWidget&) = delete;
102  void operator=(const vtkPolyLineWidget&) = delete;
103 };
104 
105 #endif
vtkPolyLineWidget::_WidgetState
_WidgetState
Definition: vtkPolyLineWidget.h:84
vtkPolyLineWidget::KeyEventCallbackCommand
vtkCallbackCommand * KeyEventCallbackCommand
Definition: vtkPolyLineWidget.h:97
vtkAbstractWidget::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkAbstractWidget.h
vtkObject::New
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
vtkObject
abstract base class for most VTK objects
Definition: vtkObject.h:62
vtkPolyLineRepresentation
vtkWidgetRepresentation for a poly line.
Definition: vtkPolyLineRepresentation.h:39
vtkAbstractWidget
define the API for widget / widget representation
Definition: vtkAbstractWidget.h:65
vtkAbstractWidget::CreateDefaultRepresentation
virtual void CreateDefaultRepresentation()=0
Create the default widget representation if one is not set.
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkAbstractWidget::SetEnabled
void SetEnabled(int) override
Methods for activating this widget.
vtkPolyLineWidget
widget for vtkPolyLineRepresentation.
Definition: vtkPolyLineWidget.h:50
vtkCallbackCommand
supports function callbacks
Definition: vtkCallbackCommand.h:44
vtkPolyLineWidget::WidgetState
int WidgetState
Definition: vtkPolyLineWidget.h:83
vtkPolyLineWidget::SetRepresentation
void SetRepresentation(vtkPolyLineRepresentation *r)
Specify an instance of vtkWidgetRepresentation used to represent this widget in the scene.
Definition: vtkPolyLineWidget.h:62