vtkSlicerBoxWidget2.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkSlicerBoxWidget2.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 =========================================================================*/
00032 //
00036 //
00057 //
00070 //
00078 
00086 
00089 
00090 #ifndef __vtkSlicerBoxWidget2_h
00091 #define __vtkSlicerBoxWidget2_h
00092 
00093 #include "vtkAbstractWidget.h"
00094 #include "vtkSlicerWidget.h"
00095 
00096 class vtkSlicerBoxRepresentation;
00097 class vtkHandleWidget;
00098 
00099 
00100 class VTK_SLICER_BASE_GUI_EXPORT vtkSlicerBoxWidget2 : public vtkAbstractWidget
00101 {
00102 public:
00105   static vtkSlicerBoxWidget2 *New();
00106 
00109   vtkTypeRevisionMacro(vtkSlicerBoxWidget2,vtkAbstractWidget);
00110   void PrintSelf(ostream& os, vtkIndent indent);
00111 
00116   void SetRepresentation(vtkSlicerBoxRepresentation *r)
00117     {this->Superclass::SetWidgetRepresentation(reinterpret_cast<vtkWidgetRepresentation*>(r));}
00118   
00123   vtkSetMacro(TranslationEnabled,int);
00124   vtkGetMacro(TranslationEnabled,int);
00125   vtkBooleanMacro(TranslationEnabled,int);
00126   vtkSetMacro(ScalingEnabled,int);
00127   vtkGetMacro(ScalingEnabled,int);
00128   vtkBooleanMacro(ScalingEnabled,int);
00129   vtkSetMacro(RotationEnabled,int);
00130   vtkGetMacro(RotationEnabled,int);
00131   vtkBooleanMacro(RotationEnabled,int);
00132 
00136   void CreateDefaultRepresentation();
00137 
00138 protected:
00139   vtkSlicerBoxWidget2();
00140   ~vtkSlicerBoxWidget2();
00141 
00142 //BTX - manage the state of the widget
00143   int WidgetState;
00144   enum _WidgetState {Start=0,Active};
00145 //ETX
00146   
00148   static void SelectAction(vtkAbstractWidget*);
00149   static void EndSelectAction(vtkAbstractWidget*);
00150   static void TranslateAction(vtkAbstractWidget*);
00151   static void ScaleAction(vtkAbstractWidget*);
00152   static void MoveAction(vtkAbstractWidget*);
00153 
00155   int TranslationEnabled;
00156   int ScalingEnabled;
00157   int RotationEnabled;
00158 
00159 private:
00160   vtkSlicerBoxWidget2(const vtkSlicerBoxWidget2&);  //Not implemented
00161   void operator=(const vtkSlicerBoxWidget2&);  //Not implemented
00162 };
00163 
00164 #endif

Generated on 6 Apr 2011 for Slicer3 by  doxygen 1.6.1