VTK
vtkAxesTransformWidget.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkAxesTransformWidget.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 =========================================================================*/
86 #ifndef __vtkAxesTransformWidget_h
87 #define __vtkAxesTransformWidget_h
88 
89 #include "vtkAbstractWidget.h"
90 
92 class vtkHandleWidget;
93 
94 
96 {
97 public:
99  static vtkAxesTransformWidget *New();
100 
102 
104  void PrintSelf(ostream& os, vtkIndent indent);
106 
109  virtual void SetEnabled(int enabling);
110 
112 
115  void SetRepresentation(vtkAxesTransformRepresentation *r)
116  {this->Superclass::SetWidgetRepresentation(reinterpret_cast<vtkWidgetRepresentation*>(r));}
118 
120 
121  vtkAxesTransformRepresentation *GetLineRepresentation()
122  {return reinterpret_cast<vtkAxesTransformRepresentation*>(this->WidgetRep);}
124 
127 
130  virtual void SetProcessEvents(int);
131 
132 protected:
135 
137  enum _WidgetState {Start=0,Active};
139 
140  // These methods handle events
141  static void SelectAction(vtkAbstractWidget*);
142  static void EndSelectAction(vtkAbstractWidget*);
143  static void MoveAction(vtkAbstractWidget*);
144 
145  // The positioning handle widgets
146  vtkHandleWidget *OriginWidget; //first end point
147  vtkHandleWidget *SelectionWidget; //used when selecting any one of the axes
148 
149 private:
150  vtkAxesTransformWidget(const vtkAxesTransformWidget&); //Not implemented
151  void operator=(const vtkAxesTransformWidget&); //Not implemented
152 };
153 
154 #endif