Manages events and their responses. More...
#include <gui_eventmanager.hpp>
Public Member Functions | |
void | register_event (event_receiver *pReceiver, const std::string &sEvent) |
Enables an event_receiver's reaction to an event. | |
void | unregister_event (event_receiver *pReceiver, const std::string &sEvent) |
Disables an event_receiver's reaction to an event. | |
void | unregister_receiver (event_receiver *pReceiver) |
Disables all events connected to the provided event_receiver. | |
void | fire_event (const event &mEvent) |
Tells this manager an Event as occured. | |
void | frame_ended () |
Tells this manager to clear the fired Events list. |
Manages events and their responses.
Definition at line 15 of file gui_eventmanager.hpp.
void gui::event_manager::fire_event | ( | const event & | mEvent | ) |
Tells this manager an Event as occured.
mEvent | The Event which has occured |
Definition at line 68 of file gui_eventmanager.cpp.
void gui::event_manager::frame_ended | ( | ) |
Tells this manager to clear the fired Events list.
Definition at line 94 of file gui_eventmanager.cpp.
void gui::event_manager::register_event | ( | event_receiver * | pReceiver, | |
const std::string & | sEvent | |||
) |
Enables an event_receiver's reaction to an event.
pReceiver | The event_receiver to consider | |
sEvent | The name of the event it should react to |
Definition at line 15 of file gui_eventmanager.cpp.
void gui::event_manager::unregister_event | ( | event_receiver * | pReceiver, | |
const std::string & | sEvent | |||
) |
Disables an event_receiver's reaction to an event.
pReceiver | The event_receiver to consider | |
sEvent | The name of the event it shouldn't react to anymore |
Definition at line 37 of file gui_eventmanager.cpp.
void gui::event_manager::unregister_receiver | ( | event_receiver * | pReceiver | ) |
Disables all events connected to the provided event_receiver.
pReceiver | The event_receiver to disable |
Definition at line 56 of file gui_eventmanager.cpp.