Main Page | Directories | Class Hierarchy | Alphabetical List | Class List | 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 =========================================================================*/
00048 #ifndef __vtkCallbackCommand_h
00049 #define __vtkCallbackCommand_h
00050 
00051 #include "vtkCommand.h"
00052 
00053 class VTK_COMMON_EXPORT vtkCallbackCommand : public vtkCommand
00054 {
00055 public:
00056   static vtkCallbackCommand *New() 
00057     {return new vtkCallbackCommand;};
00058 
00063   void Execute(vtkObject *caller, unsigned long eid, void *callData);
00064 
00066 
00068   void SetClientData(void *cd) 
00069     {this->ClientData = cd;}
00070   void* GetClientData()
00071     {return this->ClientData; }
00072   void SetCallback(void (*f)(vtkObject *caller, unsigned long eid, 
00073                              void *clientdata, void *calldata)) 
00074     {this->Callback = f;}
00075   void SetClientDataDeleteCallback(void (*f)(void *))
00076     {this->ClientDataDeleteCallback = f;}
00078   
00079   void *ClientData;
00080   void (*Callback)(vtkObject *, unsigned long, void *, void *);
00081   void (*ClientDataDeleteCallback)(void *);
00082 
00083 protected:
00084   vtkCallbackCommand();
00085   ~vtkCallbackCommand();
00086 };
00087 
00088 
00089 
00090 #endif /* __vtkCallbackCommand_h */
00091