VTK
vtkEventForwarderCommand.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkEventForwarderCommand.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 =========================================================================*/
28 #ifndef vtkEventForwarderCommand_h
29 #define vtkEventForwarderCommand_h
30 
31 #include "vtkCommonCoreModule.h" // For export macro
32 #include "vtkCommand.h"
33 
34 class VTKCOMMONCORE_EXPORT vtkEventForwarderCommand : public vtkCommand
35 {
36 public:
38 
40  {return new vtkEventForwarderCommand;};
41 
48  void Execute(vtkObject *caller,
49  unsigned long eid,
50  void *callData) VTK_OVERRIDE;
51 
56  virtual void SetTarget(vtkObject *obj)
57  { this->Target = obj; }
58  virtual void* GetTarget()
59  { return this->Target; }
60 
61 protected:
62 
64 
66  ~vtkEventForwarderCommand() VTK_OVERRIDE {}
67 };
68 
69 #endif /* vtkEventForwarderCommand_h */
70 
71 // VTK-HeaderTest-Exclude: vtkEventForwarderCommand.h
a simple event forwarder command
virtual void Execute(vtkObject *caller, unsigned long eventId, void *callData)=0
All derived classes of vtkCommand must implement this method.
abstract base class for most VTK objects
Definition: vtkObject.h:59
static vtkEventForwarderCommand * New()
superclass for callback/observer methods
Definition: vtkCommand.h:341
virtual void SetTarget(vtkObject *obj)
Methods to set and get client and callback information, and the callback function.