00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkAffineWidget.h,v $ 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 =========================================================================*/ 00063 #ifndef __vtkAffineWidget_h 00064 #define __vtkAffineWidget_h 00065 00066 #include "vtkAbstractWidget.h" 00067 00068 class vtkAffineRepresentation; 00069 00070 00071 class VTK_WIDGETS_EXPORT vtkAffineWidget : public vtkAbstractWidget 00072 { 00073 public: 00075 static vtkAffineWidget *New(); 00076 00078 00079 vtkTypeRevisionMacro(vtkAffineWidget,vtkAbstractWidget); 00080 void PrintSelf(ostream& os, vtkIndent indent); 00082 00084 00087 void SetRepresentation(vtkAffineRepresentation *r) 00088 {this->Superclass::SetWidgetRepresentation(reinterpret_cast<vtkWidgetRepresentation*>(r));} 00090 00092 void CreateDefaultRepresentation(); 00093 00097 virtual void SetEnabled(int); 00098 00099 protected: 00100 vtkAffineWidget(); 00101 ~vtkAffineWidget(); 00102 00103 // These are the callbacks for this widget 00104 static void SelectAction(vtkAbstractWidget*); 00105 static void EndSelectAction(vtkAbstractWidget*); 00106 static void MoveAction(vtkAbstractWidget*); 00107 static void ModifyEventAction(vtkAbstractWidget*); 00108 00109 // helper methods for cursor management 00110 void SetCursor(int state); 00111 00112 //BTX - manage the state of the widget 00113 int WidgetState; 00114 enum _WidgetState 00115 { 00116 Start=0, 00117 Active 00118 }; 00119 //ETX 00120 00121 // Keep track whether key modifier key is pressed 00122 int ModifierActive; 00123 00124 private: 00125 vtkAffineWidget(const vtkAffineWidget&); //Not implemented 00126 void operator=(const vtkAffineWidget&); //Not implemented 00127 }; 00128 00129 #endif