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

Interface class for allowing script objects or functions to subscribe to events. More...

#include </var/dev/u3d/stable/Source/Urho3D/AngelScript/ScriptEventListener.h>

Inheritance diagram for Urho3D::ScriptEventListener:
[legend]

Public Member Functions

virtual ~ScriptEventListener ()=default
 Destruct.
 
virtual void AddEventHandler (StringHash eventType, const String &handlerName)=0
 Add a scripted event handler. More...
 
virtual void AddEventHandler (Object *sender, StringHash eventType, const String &handlerName)=0
 Add a scripted event handler for a specific sender. More...
 
virtual void RemoveEventHandler (StringHash eventType)=0
 Remove a scripted event handler. More...
 
virtual void RemoveEventHandler (Object *sender, StringHash eventType)=0
 Remove a scripted event handler for a specific sender. More...
 
virtual void RemoveEventHandlers (Object *sender)=0
 Remove all scripted event handlers for a specific sender. More...
 
virtual void RemoveEventHandlers ()=0
 Remove all scripted event handlers. More...
 
virtual void RemoveEventHandlersExcept (const PODVector< StringHash > &exceptions)=0
 Remove all scripted event handlers, except those listed. More...
 
virtual bool HasEventHandler (StringHash eventType) const =0
 Return whether has subscribed to an event. More...
 
virtual bool HasEventHandler (Object *sender, StringHash eventType) const =0
 Return whether has subscribed to a specific sender's event. More...
 

Detailed Description

Interface class for allowing script objects or functions to subscribe to events.

Member Function Documentation

◆ AddEventHandler() [1/2]

virtual void Urho3D::ScriptEventListener::AddEventHandler ( Object sender,
StringHash  eventType,
const String handlerName 
)
pure virtual

Add a scripted event handler for a specific sender.

Implemented in Urho3D::ScriptFile, and Urho3D::ScriptInstance.

◆ AddEventHandler() [2/2]

virtual void Urho3D::ScriptEventListener::AddEventHandler ( StringHash  eventType,
const String handlerName 
)
pure virtual

Add a scripted event handler.

Implemented in Urho3D::ScriptFile, and Urho3D::ScriptInstance.

◆ HasEventHandler() [1/2]

virtual bool Urho3D::ScriptEventListener::HasEventHandler ( Object sender,
StringHash  eventType 
) const
pure virtual

Return whether has subscribed to a specific sender's event.

Implemented in Urho3D::ScriptFile, and Urho3D::ScriptInstance.

◆ HasEventHandler() [2/2]

virtual bool Urho3D::ScriptEventListener::HasEventHandler ( StringHash  eventType) const
pure virtual

Return whether has subscribed to an event.

Implemented in Urho3D::ScriptFile, and Urho3D::ScriptInstance.

◆ RemoveEventHandler() [1/2]

virtual void Urho3D::ScriptEventListener::RemoveEventHandler ( Object sender,
StringHash  eventType 
)
pure virtual

Remove a scripted event handler for a specific sender.

Implemented in Urho3D::ScriptFile, and Urho3D::ScriptInstance.

◆ RemoveEventHandler() [2/2]

virtual void Urho3D::ScriptEventListener::RemoveEventHandler ( StringHash  eventType)
pure virtual

Remove a scripted event handler.

Implemented in Urho3D::ScriptFile, and Urho3D::ScriptInstance.

◆ RemoveEventHandlers() [1/2]

virtual void Urho3D::ScriptEventListener::RemoveEventHandlers ( )
pure virtual

Remove all scripted event handlers.

Implemented in Urho3D::ScriptFile, and Urho3D::ScriptInstance.

◆ RemoveEventHandlers() [2/2]

virtual void Urho3D::ScriptEventListener::RemoveEventHandlers ( Object sender)
pure virtual

Remove all scripted event handlers for a specific sender.

Implemented in Urho3D::ScriptFile, and Urho3D::ScriptInstance.

◆ RemoveEventHandlersExcept()

virtual void Urho3D::ScriptEventListener::RemoveEventHandlersExcept ( const PODVector< StringHash > &  exceptions)
pure virtual

Remove all scripted event handlers, except those listed.

Implemented in Urho3D::ScriptFile, and Urho3D::ScriptInstance.


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