VTK
dox/Interaction/Widgets/vtkAxesTransformWidget.h
Go to the documentation of this file.
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 "vtkInteractionWidgetsModule.h" // For export macro
00090 #include "vtkAbstractWidget.h"
00091 
00092 class vtkAxesTransformRepresentation;
00093 class vtkHandleWidget;
00094 
00095 
00096 class VTKINTERACTIONWIDGETS_EXPORT vtkAxesTransformWidget : public vtkAbstractWidget
00097 {
00098 public:
00100   static vtkAxesTransformWidget *New();
00101 
00103 
00104   vtkTypeMacro(vtkAxesTransformWidget,vtkAbstractWidget);
00105   void PrintSelf(ostream& os, vtkIndent indent);
00107 
00110   virtual void SetEnabled(int enabling);
00111 
00113 
00116   void SetRepresentation(vtkAxesTransformRepresentation *r)
00117     {this->Superclass::SetWidgetRepresentation(reinterpret_cast<vtkWidgetRepresentation*>(r));}
00119 
00121 
00122   vtkAxesTransformRepresentation *GetLineRepresentation()
00123     {return reinterpret_cast<vtkAxesTransformRepresentation*>(this->WidgetRep);}
00125 
00127   void CreateDefaultRepresentation();
00128 
00131   virtual void SetProcessEvents(int);
00132 
00133 protected:
00134   vtkAxesTransformWidget();
00135   ~vtkAxesTransformWidget();
00136 
00137   int WidgetState;
00138   enum _WidgetState {Start=0,Active};
00139   int CurrentHandle;
00140 
00141   // These methods handle events
00142   static void SelectAction(vtkAbstractWidget*);
00143   static void EndSelectAction(vtkAbstractWidget*);
00144   static void MoveAction(vtkAbstractWidget*);
00145 
00146   // The positioning handle widgets
00147   vtkHandleWidget *OriginWidget; //first end point
00148   vtkHandleWidget *SelectionWidget; //used when selecting any one of the axes
00149 
00150 private:
00151   vtkAxesTransformWidget(const vtkAxesTransformWidget&);  //Not implemented
00152   void operator=(const vtkAxesTransformWidget&);  //Not implemented
00153 };
00154 
00155 #endif