00001 //============================================================================= 00002 // This file is part of VTKEdge. See vtkedge.org for more information. 00003 // 00004 // Copyright (c) 2010 Kitware, Inc. 00005 // 00006 // VTKEdge may be used under the terms of the BSD License 00007 // Please see the file Copyright.txt in the root directory of 00008 // VTKEdge for further information. 00009 // 00010 // Alternatively, you may see: 00011 // 00012 // http://www.vtkedge.org/vtkedge/project/license.html 00013 // 00014 // 00015 // For custom extensions, consulting services, or training for 00016 // this or any other Kitware supported open source project, please 00017 // contact Kitware at sales@kitware.com. 00018 // 00019 // 00020 //============================================================================= 00039 #ifndef __vtkKWEBoundingBoxWidget2D_h 00040 #define __vtkKWEBoundingBoxWidget2D_h 00041 00042 #include "VTKEdgeConfigure.h" // needed for export symbols directives 00043 #include "vtkAbstractWidget.h" 00044 00045 class vtkKWEBoundingBoxRepresentation2D; 00046 class vtkHandleWidget; 00047 00048 class VTKEdge_WIDGETS_EXPORT vtkKWEBoundingBoxWidget2D : public vtkAbstractWidget 00049 { 00050 public: 00052 static vtkKWEBoundingBoxWidget2D *New(); 00053 00055 00056 vtkTypeRevisionMacro(vtkKWEBoundingBoxWidget2D,vtkAbstractWidget); 00057 void PrintSelf(ostream& os, vtkIndent indent); 00059 00063 virtual void SetEnabled(int); 00064 00066 virtual void SetProcessEvents( int ); 00067 00069 00072 virtual void SetFade( int ); 00073 virtual int GetFade(); 00074 vtkBooleanMacro(Fade, int); 00076 00078 00079 enum 00080 { 00081 BeginResizeEvent = 1000, 00082 ResizingEvent, 00083 EndResizeEvent, 00084 BoundsChangedEvent, 00085 ExtentsChangedEvent 00086 }; 00087 //ETX 00089 00091 virtual void SetRepresentation( vtkKWEBoundingBoxRepresentation2D * ); 00092 00094 virtual void CreateDefaultRepresentation(); 00095 00097 00098 virtual void SetShowSliceScaleBar(int); 00099 vtkGetMacro( ShowSliceScaleBar, int ); 00100 vtkBooleanMacro( ShowSliceScaleBar, int ); 00102 00103 protected: 00104 vtkKWEBoundingBoxWidget2D(); 00105 ~vtkKWEBoundingBoxWidget2D(); 00106 00108 static void OnMouseMoveCallback ( vtkAbstractWidget* ); 00109 static void OnLeftButtonDownCallback ( vtkAbstractWidget* ); 00110 static void OnLeftButtonUpCallback ( vtkAbstractWidget* ); 00111 void SetCursor( int ); 00113 00114 int ShowSliceScaleBar; 00115 void SetEnabledStateOfSliceScaleBar(); 00116 00117 double LastComputedBounds[6]; 00118 int LastComputedExtent[6]; 00119 00120 private: 00121 vtkKWEBoundingBoxWidget2D(const vtkKWEBoundingBoxWidget2D&); //Not implemented 00122 void operator=(const vtkKWEBoundingBoxWidget2D&); //Not implemented 00123 00124 vtkHandleWidget ** HandleWidgets; 00125 }; 00126 00127 #endif 00128
1.7.1