VTK
vtkLineWidget2.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkLineWidget2.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 =========================================================================*/
87 #ifndef vtkLineWidget2_h
88 #define vtkLineWidget2_h
89 
90 #include "vtkInteractionWidgetsModule.h" // For export macro
91 #include "vtkAbstractWidget.h"
92 
94 class vtkHandleWidget;
95 
96 
98 {
99 public:
101  static vtkLineWidget2 *New();
102 
104 
106  void PrintSelf(ostream& os, vtkIndent indent);
108 
111  virtual void SetEnabled(int enabling);
112 
114 
118  {this->Superclass::SetWidgetRepresentation(reinterpret_cast<vtkWidgetRepresentation*>(r));}
120 
122 
124  {return reinterpret_cast<vtkLineRepresentation*>(this->WidgetRep);}
126 
129 
132  virtual void SetProcessEvents(int);
133 
134 protected:
135  vtkLineWidget2();
136  ~vtkLineWidget2();
137 
138  // Manage the state of the widget
140  enum _WidgetState {Start=0,Active};
142 
143  // These methods handle events
144  static void SelectAction(vtkAbstractWidget*);
145  static void TranslateAction(vtkAbstractWidget*);
146  static void ScaleAction(vtkAbstractWidget*);
147  static void EndSelectAction(vtkAbstractWidget*);
148  static void MoveAction(vtkAbstractWidget*);
149 
150  // The positioning handle widgets
151  vtkHandleWidget *Point1Widget; //first end point
152  vtkHandleWidget *Point2Widget; //second end point
153  vtkHandleWidget *LineHandle; //used when selecting the line
154 
155 private:
156  vtkLineWidget2(const vtkLineWidget2&); //Not implemented
157  void operator=(const vtkLineWidget2&); //Not implemented
158 };
159 
160 #endif
vtkHandleWidget * LineHandle
void PrintSelf(ostream &os, vtkIndent indent)
virtual void SetProcessEvents(int)
vtkLineRepresentation * GetLineRepresentation()
a general widget for moving handles
3D widget for manipulating a finite, straight line
virtual void CreateDefaultRepresentation()=0
vtkHandleWidget * Point2Widget
vtkWidgetRepresentation * WidgetRep
#define VTKINTERACTIONWIDGETS_EXPORT
a simple class to control print indentation
Definition: vtkIndent.h:38
define the API for widget / widget representation
static vtkObject * New()
a class defining the representation for a vtkLineWidget2
virtual void SetEnabled(int)
void SetRepresentation(vtkLineRepresentation *r)
vtkHandleWidget * Point1Widget