VTK
/Users/kitware/Dashboards/MyTests/VTK_BLD_Release_docs/Utilities/Doxygen/dox/Interaction/Widgets/vtkAffineWidget.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkAffineWidget.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 =========================================================================*/
00066 #ifndef vtkAffineWidget_h
00067 #define vtkAffineWidget_h
00068 
00069 #include "vtkInteractionWidgetsModule.h" // For export macro
00070 #include "vtkAbstractWidget.h"
00071 
00072 class vtkAffineRepresentation;
00073 
00074 
00075 class VTKINTERACTIONWIDGETS_EXPORT vtkAffineWidget : public vtkAbstractWidget
00076 {
00077 public:
00079   static vtkAffineWidget *New();
00080 
00082 
00083   vtkTypeMacro(vtkAffineWidget,vtkAbstractWidget);
00084   void PrintSelf(ostream& os, vtkIndent indent);
00086 
00088 
00091   void SetRepresentation(vtkAffineRepresentation *r)
00092     {this->Superclass::SetWidgetRepresentation(reinterpret_cast<vtkWidgetRepresentation*>(r));}
00094 
00096 
00097   vtkAffineRepresentation *GetAffineRepresentation()
00098     {return reinterpret_cast<vtkAffineRepresentation*>(this->WidgetRep);}
00100 
00102   void CreateDefaultRepresentation();
00103 
00107   virtual void SetEnabled(int);
00108 
00109 protected:
00110   vtkAffineWidget();
00111   ~vtkAffineWidget();
00112 
00113   // These are the callbacks for this widget
00114   static void SelectAction(vtkAbstractWidget*);
00115   static void EndSelectAction(vtkAbstractWidget*);
00116   static void MoveAction(vtkAbstractWidget*);
00117   static void ModifyEventAction(vtkAbstractWidget*);
00118 
00119   // helper methods for cursor management
00120   void SetCursor(int state);
00121 
00122 //BTX - manage the state of the widget
00123   int WidgetState;
00124   enum _WidgetState
00125   {
00126     Start=0,
00127     Active
00128   };
00129 //ETX
00130 
00131   // Keep track whether key modifier key is pressed
00132   int ModifierActive;
00133 
00134 private:
00135   vtkAffineWidget(const vtkAffineWidget&);  //Not implemented
00136   void operator=(const vtkAffineWidget&);  //Not implemented
00137 };
00138 
00139 #endif