VTK  9.3.1
vtkEventForwarderCommand.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
16 #ifndef vtkEventForwarderCommand_h
17 #define vtkEventForwarderCommand_h
18 
19 #include "vtkCommand.h"
20 #include "vtkCommonCoreModule.h" // For export macro
21 
22 VTK_ABI_NAMESPACE_BEGIN
23 class VTKCOMMONCORE_EXPORT vtkEventForwarderCommand : public vtkCommand
24 {
25 public:
27 
29 
36  void Execute(vtkObject* caller, unsigned long eid, void* callData) override;
37 
42  virtual void SetTarget(vtkObject* obj) { this->Target = obj; }
43  virtual void* GetTarget() { return this->Target; }
44 
45 protected:
47 
49  ~vtkEventForwarderCommand() override = default;
50 };
51 
52 VTK_ABI_NAMESPACE_END
53 #endif /* vtkEventForwarderCommand_h */
54 
55 // 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:51
static vtkEventForwarderCommand * New()
superclass for callback/observer methods
Definition: vtkCommand.h:383
virtual void SetTarget(vtkObject *obj)
Methods to set and get client and callback information, and the callback function.