VTK
vtkOldStyleCallbackCommand.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkOldStyleCallbackCommand.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
33 #ifndef vtkOldStyleCallbackCommand_h
34 #define vtkOldStyleCallbackCommand_h
35 
36 #include "vtkCommonCoreModule.h" // For export macro
37 #include "vtkCommand.h"
38 
39 // the old style void fund(void *) callbacks
41 {
42 public:
44 
46  {return new vtkOldStyleCallbackCommand;};
47 
49  void Execute(vtkObject *invoker, unsigned long eid, void *calldata);
50 
52 
53  void SetClientData(void *cd)
54  {this->ClientData = cd;};
55  void SetCallback(void (*f)(void *clientdata))
56  {this->Callback = f;};
57  void SetClientDataDeleteCallback(void (*f)(void *))
58  {this->ClientDataDeleteCallback = f;};
60 
61  void *ClientData;
62  void (*Callback)(void *);
63  void (*ClientDataDeleteCallback)(void *);
64 
65 protected:
68 };
69 
70 
71 #endif /* vtkOldStyleCallbackCommand_h */
72 
73 // VTK-HeaderTest-Exclude: vtkOldStyleCallbackCommand.h
virtual void Execute(vtkObject *caller, unsigned long eventId, void *callData)=0
abstract base class for most VTK objects
Definition: vtkObject.h:61
#define VTKCOMMONCORE_EXPORT
superclass for callback/observer methods
Definition: vtkCommand.h:325
supports legacy function callbacks for VTK
static vtkOldStyleCallbackCommand * New()
void SetCallback(void(*f)(void *clientdata))
void SetClientDataDeleteCallback(void(*f)(void *))