#include <ugdk/system/eventhandler.h>
ugdk::system::EventHandler::EventHandler |
( |
| ) |
|
|
inline |
ugdk::system::EventHandler::~EventHandler |
( |
| ) |
|
|
inline |
template<class Event , class Handler >
IListener* ugdk::system::EventHandler::AddListener |
( |
Handler |
handler | ) |
|
|
inline |
template<class Event >
IListener* ugdk::system::EventHandler::AddListener |
( |
void(*)(const Event &) |
handler | ) |
|
|
inline |
void ugdk::system::EventHandler::AddObjectListener |
( |
IListener * |
listener | ) |
|
|
inline |
Adds an object to listen to all events dispatched to this EventHandler. The object must implement the Listener<T> interface for the events it wants to track.
- Parameters
-
listener | The object to dispatch events to. This class does not delete the received pointer and should be notified when it becomes invalid via RemoveObjectListener. |
IListener* ugdk::system::EventHandler::AddRawListener |
( |
const std::type_index & |
type, |
|
|
const std::shared_ptr< IListener > & |
listener |
|
) |
| |
|
inline |
template<class Event >
void ugdk::system::EventHandler::RaiseEvent |
( |
const Event & |
ev | ) |
const |
|
inline |
template<class Event >
static void ugdk::system::EventHandler::RaiseGlobalEvent |
( |
const Event & |
ev | ) |
|
|
inlinestatic |
void ugdk::system::EventHandler::RemoveListener |
( |
const std::type_index & |
type, |
|
|
IListener * |
listener |
|
) |
| |
|
inline |
template<class Event >
void ugdk::system::EventHandler::RemoveListener |
( |
IListener * |
listener | ) |
|
|
inline |
void ugdk::system::EventHandler::RemoveObjectListener |
( |
IListener * |
listener | ) |
|
|
inline |
void ugdk::system::EventHandler::set_dispatch_as_global |
( |
bool |
flag | ) |
|
|
inline |
If true, events raised on this handler will be raised as global events.
The documentation for this class was generated from the following file: