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 =========================================================================*/
90 #ifndef __vtkLineWidget2_h
91 #define __vtkLineWidget2_h
92 
93 #include "vtkAbstractWidget.h"
94 
96 class vtkHandleWidget;
97 
98 
100 {
101 public:
103  static vtkLineWidget2 *New();
104 
106 
108  void PrintSelf(ostream& os, vtkIndent indent);
110 
113  virtual void SetEnabled(int enabling);
114 
116 
120  {this->Superclass::SetWidgetRepresentation(reinterpret_cast<vtkWidgetRepresentation*>(r));}
122 
124 
126  {return reinterpret_cast<vtkLineRepresentation*>(this->WidgetRep);}
128 
131 
134  virtual void SetProcessEvents(int);
135 
136 protected:
137  vtkLineWidget2();
138  ~vtkLineWidget2();
139 
140 //BTX - manage the state of the widget
142  enum _WidgetState {Start=0,Active};
143 //ETX
145 
146  // These methods handle events
147  static void SelectAction(vtkAbstractWidget*);
148  static void TranslateAction(vtkAbstractWidget*);
149  static void ScaleAction(vtkAbstractWidget*);
150  static void EndSelectAction(vtkAbstractWidget*);
151  static void MoveAction(vtkAbstractWidget*);
152 
153  // The positioning handle widgets
154  vtkHandleWidget *Point1Widget; //first end point
155  vtkHandleWidget *Point2Widget; //second end point
156  vtkHandleWidget *LineHandle; //used when selecting the line
157 
158 private:
159  vtkLineWidget2(const vtkLineWidget2&); //Not implemented
160  void operator=(const vtkLineWidget2&); //Not implemented
161 };
162 
163 #endif