VTK
dox/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 "vtkAbstractWidget.h"
00070 
00071 class vtkAffineRepresentation;
00072 
00073 
00074 class VTK_WIDGETS_EXPORT vtkAffineWidget : public vtkAbstractWidget
00075 {
00076 public:
00078   static vtkAffineWidget *New();
00079 
00081 
00082   vtkTypeMacro(vtkAffineWidget,vtkAbstractWidget);
00083   void PrintSelf(ostream& os, vtkIndent indent);
00085 
00087 
00090   void SetRepresentation(vtkAffineRepresentation *r)
00091     {this->Superclass::SetWidgetRepresentation(reinterpret_cast<vtkWidgetRepresentation*>(r));}
00093   
00095 
00096   vtkAffineRepresentation *GetAffineRepresentation()
00097     {return reinterpret_cast<vtkAffineRepresentation*>(this->WidgetRep);}
00099 
00101   void CreateDefaultRepresentation();
00102 
00106   virtual void SetEnabled(int);
00107 
00108 protected:
00109   vtkAffineWidget();
00110   ~vtkAffineWidget();
00111 
00112   // These are the callbacks for this widget
00113   static void SelectAction(vtkAbstractWidget*);
00114   static void EndSelectAction(vtkAbstractWidget*);
00115   static void MoveAction(vtkAbstractWidget*);
00116   static void ModifyEventAction(vtkAbstractWidget*);
00117 
00118   // helper methods for cursor management
00119   void SetCursor(int state);
00120 
00121 //BTX - manage the state of the widget
00122   int WidgetState;
00123   enum _WidgetState
00124   {
00125     Start=0,
00126     Active
00127   };
00128 //ETX
00129   
00130   // Keep track whether key modifier key is pressed
00131   int ModifierActive;
00132 
00133 private:
00134   vtkAffineWidget(const vtkAffineWidget&);  //Not implemented
00135   void operator=(const vtkAffineWidget&);  //Not implemented
00136 };
00137 
00138 #endif