|
Rebel Fork Framework
|
Internal helper class for invoking event handler functions. More...
#include <Urho3D/Core/Object.h>
Public Types | |
| using | HandlerFunction = ea::function< void(Object *receiver, StringHash eventType, VariantMap &eventData)> |
Public Member Functions | |
| EventHandler (Object *receiver, HandlerFunction handler) | |
| Construct with specified receiver and handler. | |
| template<class T > | |
| EventHandler (Object *receiver, T handler) | |
| Construct with specified receiver and handler of flexible signature. | |
| void | SetSenderAndEventType (Object *sender, StringHash eventType) |
| Set sender and event type. | |
| void | Invoke (VariantMap &eventData) const |
| Invoke event handler function. | |
| Object * | GetReceiver () const |
| Return event receiver. | |
| Object * | GetSender () const |
| Return event sender. Null if the handler is non-specific. | |
| const StringHash & | GetEventType () const |
| Return event type. | |
Private Attributes | |
| Object * | receiver_ |
| Object * | sender_ |
| StringHash | eventType_ |
| HandlerFunction | handler_ |
Internal helper class for invoking event handler functions.