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 00025 #ifndef __vtkKWEPaintbrushSelectionWidget_h 00026 #define __vtkKWEPaintbrushSelectionWidget_h 00027 00028 #include "VTKEdgeConfigure.h" // needed for export symbols directives 00029 #include "vtkKWEAbstractPaintbrushWidget.h" 00030 #include <vtkstd/vector> 00031 00032 class vtkKWEPaintbrushSelectionRepresentation; 00033 class vtkKWEPaintbrushSketch; 00034 class vtkKWEWidgetGroup; 00035 00036 class VTKEdge_WIDGETS_EXPORT vtkKWEPaintbrushSelectionWidget : public vtkKWEAbstractPaintbrushWidget 00037 { 00038 public: 00040 static vtkKWEPaintbrushSelectionWidget *New(); 00041 00043 00044 vtkTypeRevisionMacro(vtkKWEPaintbrushSelectionWidget,vtkKWEAbstractPaintbrushWidget); 00045 void PrintSelf(ostream& os, vtkIndent indent); 00047 00051 virtual void SetEnabled(int); 00052 00056 void SetRepresentation(vtkKWEPaintbrushSelectionRepresentation *r); 00057 00060 virtual void CreateDefaultRepresentation(); 00061 00063 00065 vtkSetMacro( EnableDragAndDrop, int ); 00066 vtkGetMacro( EnableDragAndDrop, int ); 00067 vtkBooleanMacro( EnableDragAndDrop, int ); 00069 00071 virtual void DeleteSelectedSketches(); 00072 00076 //BTX 00077 //virtual void RemoveSketches( std::vector< vtkKWEPaintbrushSketch * > ); 00078 //virtual void MergeSketchesInto( std::vector< vtkKWEPaintbrushSketch * >, 00079 // vtkKWEPaintbrushSketch *newSketch ); 00080 //ETX 00081 00083 virtual void DeepCopy( vtkAbstractWidget * ); 00084 00086 00089 vtkGetObjectMacro( EventCallbackCommand, vtkCallbackCommand ); 00091 00092 protected: 00093 vtkKWEPaintbrushSelectionWidget(); 00094 ~vtkKWEPaintbrushSelectionWidget(); 00095 00097 00098 enum 00099 { 00100 Disabled = 10000, 00101 BeginSelecting, 00102 EndSelecting, 00103 None 00104 }; 00105 //ETX 00107 00109 00123 static void BeginToggleSelectSketchCallback( vtkAbstractWidget* ); 00124 static void EndToggleSelectSketchCallback ( vtkAbstractWidget* ); 00125 static void DeleteSelectionCallback ( vtkAbstractWidget* ); 00126 static void MergeSelectionCallback ( vtkAbstractWidget* ); 00127 static void SelectAllSketchesCallback ( vtkAbstractWidget* ); 00128 static void UnSelectAllSketchesCallback ( vtkAbstractWidget* ); 00129 static void ToggleSelectAllSketchesCallback( vtkAbstractWidget* ); 00130 static void MoveCallback ( vtkAbstractWidget* ); 00132 00134 00135 int SelectSketchAction ( vtkKWEPaintbrushSelectionWidget *dispatcher); 00136 int UnselectSketchAction ( vtkKWEPaintbrushSelectionWidget *dispatcher); 00137 int SelectAllSketchesAction ( vtkKWEPaintbrushSelectionWidget *dispatcher); 00138 int UnSelectAllSketchesAction( vtkKWEPaintbrushSelectionWidget *dispatcher); 00139 int ReleaseSelectAction ( vtkKWEPaintbrushSelectionWidget *dispatcher); 00140 int DeleteSelectionAction ( vtkKWEPaintbrushSelectionWidget *dispatcher); 00141 int MergeSelectionAction ( vtkKWEPaintbrushSelectionWidget *dispatcher); 00143 00144 int WidgetState; 00145 vtkKWEPaintbrushSketch * MergedSketch; 00146 int RemoveSketchesDuringMerge; 00147 int EnableDragAndDrop; 00148 00149 private: 00150 vtkKWEPaintbrushSelectionWidget(const 00151 vtkKWEPaintbrushSelectionWidget&); //Not implemented 00152 void operator=(const vtkKWEPaintbrushSelectionWidget&); //Not implemented 00153 }; 00154 00155 #endif
1.7.1