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 //============================================================================= 00021 00030 #ifndef __vtkKWEPaintbrushAnnotationWidget_h 00031 #define __vtkKWEPaintbrushAnnotationWidget_h 00032 00033 #include "VTKEdgeConfigure.h" // needed for export symbols directives 00034 #include "vtkAbstractWidget.h" 00035 00036 class vtkKWEPaintbrushAnnotationRepresentation; 00037 class vtkKWEPaintbrushWidget; 00038 00039 class VTKEdge_WIDGETS_EXPORT vtkKWEPaintbrushAnnotationWidget : public vtkAbstractWidget 00040 { 00041 //BTX 00042 friend class vtkKWEPaintbrushWidget; 00043 //ETX 00044 public: 00045 00047 00048 static vtkKWEPaintbrushAnnotationWidget *New(); 00049 vtkTypeRevisionMacro(vtkKWEPaintbrushAnnotationWidget,vtkAbstractWidget); 00050 void PrintSelf(ostream& os, vtkIndent indent); 00052 00054 00055 void AnnotatePaintbrushMode(); 00056 void AnnotateNewSketch(); 00057 void AnnotateIncrementSketch(); 00058 void AnnotateDecrementSketch(); 00059 void AnnotateSize(); 00060 void AnnotateString( const char * ); 00062 00063 protected: 00064 vtkKWEPaintbrushAnnotationWidget(); 00065 ~vtkKWEPaintbrushAnnotationWidget(); 00066 00067 // The widget can be in any of the following states. 00068 //BTX 00069 enum { Start = 0, BeginTimer, EndTimer, Timing, TimedOut }; 00070 //ETX 00071 00073 00075 virtual void SetWidgetState(int); 00076 vtkGetMacro( WidgetState, int ); 00078 00080 virtual void SetEnabled(int); 00081 00083 00085 static void MoveCallback ( vtkAbstractWidget* ); 00086 static void HoverCallback ( vtkAbstractWidget* ); 00088 00091 virtual void CreateDefaultRepresentation(); 00092 00096 void SetRepresentation(vtkKWEPaintbrushAnnotationRepresentation *r); 00097 00098 private: 00099 vtkKWEPaintbrushAnnotationWidget(const vtkKWEPaintbrushAnnotationWidget&); //Not implemented 00100 void operator=(const vtkKWEPaintbrushAnnotationWidget&); //Not implemented 00101 00103 int Movement; 00104 int WidgetState; 00105 int TimerId; 00106 int TimerDuration; 00107 vtkKWEPaintbrushWidget * PaintbrushWidget; 00108 }; 00110 00111 #endif
1.7.1