Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

GUI/Widgets/vtkKWDragAndDropTargetSet.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Module:    $RCSfile: vtkKWDragAndDropTargetSet.h,v $
00004 
00005   Copyright (c) Kitware, Inc.
00006   All rights reserved.
00007   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00008 
00009      This software is distributed WITHOUT ANY WARRANTY; without even
00010      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00011      PURPOSE.  See the above copyright notice for more information.
00012 
00013 =========================================================================*/
00030 #ifndef __vtkKWDragAndDropTargetSet_h
00031 #define __vtkKWDragAndDropTargetSet_h
00032 
00033 #include "vtkKWObject.h"
00034 
00035 class vtkKWWidget;
00036 class vtkKWDragAndDropTargetSetInternals;
00037 
00038 class KWWIDGETS_EXPORT vtkKWDragAndDropTargetSet : public vtkKWObject
00039 {
00040 public:
00041   static vtkKWDragAndDropTargetSet* New();
00042   vtkTypeRevisionMacro(vtkKWDragAndDropTargetSet,vtkKWObject);
00043   void PrintSelf(ostream& os, vtkIndent indent);
00044 
00046 
00047   virtual void SetEnable(int);
00048   vtkBooleanMacro(Enable, int);
00049   vtkGetMacro(Enable, int);
00051 
00053 
00056   virtual void SetSource(vtkKWWidget*);
00057   vtkGetObjectMacro(Source, vtkKWWidget);
00059 
00061 
00068   virtual void SetSourceAnchor(vtkKWWidget*);
00069   vtkGetObjectMacro(SourceAnchor, vtkKWWidget);
00071 
00073 
00074   virtual int AddTarget(vtkKWWidget *target);
00075   virtual int RemoveTarget(vtkKWWidget *target);
00076   virtual int HasTarget(vtkKWWidget *target);
00077   virtual int GetNumberOfTargets();
00079 
00081 
00091   virtual int SetTargetStartCommand(
00092     vtkKWWidget *target, vtkObject *object, const char *method);
00093   virtual int SetTargetPerformCommand(
00094     vtkKWWidget *target, vtkObject *object, const char *method);
00095   virtual int SetTargetEndCommand(
00096     vtkKWWidget *target, vtkObject *object, const char *method);
00098 
00100 
00101   virtual void StartCallback(int x, int y);
00102   virtual void PerformCallback(int x, int y);
00103   virtual void EndCallback(int x, int y);
00105 
00107 
00115   virtual void SetStartCommand(vtkObject *object, const char *method);
00116   virtual void SetPerformCommand(vtkObject *object, const char *method);
00117   virtual void SetEndCommand(vtkObject *object, const char *method);
00119 
00120 protected:
00121   vtkKWDragAndDropTargetSet();
00122   ~vtkKWDragAndDropTargetSet();
00123 
00124   // Drag and Drop
00125 
00126   //BTX
00127 
00128   class TargetSlot
00129   {
00130   public:
00131     vtkKWWidget *Target;
00132     char *StartCommand;
00133     char *PerformCommand;
00134     char *EndCommand;
00135 
00136     void SetStartCommand(const char*);
00137     void SetEndCommand(const char*);
00138     void SetPerformCommand(const char*);
00139 
00140     TargetSlot();
00141     ~TargetSlot();
00142   };
00143 
00144   // PIMPL Encapsulation for STL containers
00145 
00146   vtkKWDragAndDropTargetSetInternals *Internals;
00147   friend class vtkKWDragAndDropTargetSetInternals;
00148 
00149   TargetSlot* GetTarget(vtkKWWidget *target);
00150 
00151   //ETX
00152 
00153   int Enable;
00154 
00155   vtkKWWidget *SourceAnchor;
00156   vtkKWWidget *Source;
00157 
00158   char *StartCommand;
00159   char *PerformCommand;
00160   char *EndCommand;
00161 
00162   virtual void AddBindings();
00163   virtual void RemoveBindings();
00164   virtual void DeleteAllTargets();
00165 
00166 private:
00167   
00168   vtkKWDragAndDropTargetSet(const vtkKWDragAndDropTargetSet&); // Not implemented
00169   void operator=(const vtkKWDragAndDropTargetSet&); // Not implemented
00170 };
00171 
00172 #endif

Generated on Tue May 30 12:31:42 2006 for ParaView by doxygen 1.3.5