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

vtkCallbackCommand.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkCallbackCommand.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 =========================================================================*/
00043 #ifndef __vtkCallbackCommand_h
00044 #define __vtkCallbackCommand_h
00045 
00046 #include "vtkCommand.h"
00047 
00048 class VTK_COMMON_EXPORT vtkCallbackCommand : public vtkCommand
00049 {
00050 public:
00051   static vtkCallbackCommand *New() 
00052     {return new vtkCallbackCommand;};
00053 
00058   virtual void Execute(vtkObject *caller, unsigned long eid, void *callData);
00059 
00061 
00063   virtual void SetClientData(void *cd) 
00064     { this->ClientData = cd; }
00065   virtual void* GetClientData()
00066     { return this->ClientData; }
00067   virtual void SetCallback(void (*f)(vtkObject *caller, unsigned long eid, 
00068                                      void *clientdata, void *calldata)) 
00069     { this->Callback = f; }
00070   virtual void SetClientDataDeleteCallback(void (*f)(void *))
00071     { this->ClientDataDeleteCallback = f; }
00073   
00075 
00078   void SetAbortFlagOnExecute(int f)  
00079     { this->AbortFlagOnExecute = f; }
00080   int GetAbortFlagOnExecute() 
00081     { return this->AbortFlagOnExecute; }
00082   void AbortFlagOnExecuteOn() 
00083     { this->SetAbortFlagOnExecute(1); }
00084   void AbortFlagOnExecuteOff() 
00085     { this->SetAbortFlagOnExecute(0); }
00087 
00088   void (*Callback)(vtkObject *, unsigned long, void *, void *);
00089   void (*ClientDataDeleteCallback)(void *);
00090 
00091 protected:
00092 
00093   int AbortFlagOnExecute;
00094   void *ClientData;
00095 
00096   vtkCallbackCommand();
00097   ~vtkCallbackCommand();
00098 };
00099 
00100 
00101 
00102 #endif /* __vtkCallbackCommand_h */
00103  

Generated on Mon Jan 21 23:07:16 2008 for VTK by  doxygen 1.4.3-20050530