VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkAxesTransformWidget.h 00005 00006 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 00007 All rights reserved. 00008 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00009 00010 This software is distributed WITHOUT ANY WARRANTY; without even 00011 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00012 PURPOSE. See the above copyright notice for more information. 00013 00014 =========================================================================*/ 00086 #ifndef __vtkAxesTransformWidget_h 00087 #define __vtkAxesTransformWidget_h 00088 00089 #include "vtkAbstractWidget.h" 00090 00091 class vtkAxesTransformRepresentation; 00092 class vtkHandleWidget; 00093 00094 00095 class VTK_WIDGETS_EXPORT vtkAxesTransformWidget : public vtkAbstractWidget 00096 { 00097 public: 00099 static vtkAxesTransformWidget *New(); 00100 00102 00103 vtkTypeMacro(vtkAxesTransformWidget,vtkAbstractWidget); 00104 void PrintSelf(ostream& os, vtkIndent indent); 00106 00109 virtual void SetEnabled(int enabling); 00110 00112 00115 void SetRepresentation(vtkAxesTransformRepresentation *r) 00116 {this->Superclass::SetWidgetRepresentation(reinterpret_cast<vtkWidgetRepresentation*>(r));} 00118 00120 00121 vtkAxesTransformRepresentation *GetLineRepresentation() 00122 {return reinterpret_cast<vtkAxesTransformRepresentation*>(this->WidgetRep);} 00124 00126 void CreateDefaultRepresentation(); 00127 00130 virtual void SetProcessEvents(int); 00131 00132 protected: 00133 vtkAxesTransformWidget(); 00134 ~vtkAxesTransformWidget(); 00135 00136 int WidgetState; 00137 enum _WidgetState {Start=0,Active}; 00138 int CurrentHandle; 00139 00140 // These methods handle events 00141 static void SelectAction(vtkAbstractWidget*); 00142 static void EndSelectAction(vtkAbstractWidget*); 00143 static void MoveAction(vtkAbstractWidget*); 00144 00145 // The positioning handle widgets 00146 vtkHandleWidget *OriginWidget; //first end point 00147 vtkHandleWidget *SelectionWidget; //used when selecting any one of the axes 00148 00149 private: 00150 vtkAxesTransformWidget(const vtkAxesTransformWidget&); //Not implemented 00151 void operator=(const vtkAxesTransformWidget&); //Not implemented 00152 }; 00153 00154 #endif