U3D
Open-source, cross-platform 2D and 3D game engine built in C++
Loading...
Searching...
No Matches
Urho3D::EventHandler Class Referenceabstract

Internal helper class for invoking event handler functions. More...

#include </var/dev/u3d/stable/Source/Urho3D/Core/Object.h>

Inheritance diagram for Urho3D::EventHandler:
[legend]
Collaboration diagram for Urho3D::EventHandler:
[legend]

Public Member Functions

 EventHandler (Object *receiver, void *userData=nullptr)
 Construct with specified receiver and userdata.
 
virtual ~EventHandler ()=default
 Destruct.
 
void SetSenderAndEventType (Object *sender, StringHash eventType)
 Set sender and event type.
 
virtual void Invoke (VariantMap &eventData)=0
 Invoke event handler function. More...
 
virtual EventHandlerClone () const =0
 Return a unique copy of the event handler. More...
 
ObjectGetReceiver () const
 Return event receiver.
 
ObjectGetSender () const
 Return event sender. Null if the handler is non-specific.
 
const StringHashGetEventType () const
 Return event type.
 
void * GetUserData () const
 Return userdata.
 
- Public Member Functions inherited from Urho3D::LinkedListNode
 LinkedListNode ()
 Construct.
 

Protected Attributes

Objectreceiver_
 Event receiver.
 
Objectsender_
 Event sender.
 
StringHash eventType_
 Event type.
 
void * userData_
 Userdata.
 

Additional Inherited Members

- Public Attributes inherited from Urho3D::LinkedListNode
LinkedListNodenext_
 Pointer to next node.
 

Detailed Description

Internal helper class for invoking event handler functions.

Member Function Documentation

◆ Clone()

virtual EventHandler * Urho3D::EventHandler::Clone ( ) const
pure virtual

Return a unique copy of the event handler.

Implemented in Urho3D::EventHandlerImpl< T >, and Urho3D::EventHandler11Impl.

◆ Invoke()

virtual void Urho3D::EventHandler::Invoke ( VariantMap eventData)
pure virtual

Invoke event handler function.

Implemented in Urho3D::EventHandlerImpl< T >, and Urho3D::EventHandler11Impl.

Here is the caller graph for this function:

The documentation for this class was generated from the following file: