GUI
|
GUISystem's internal event queue; collects fired events and affiliates them with particular event listener. More...
#include <EventQueue.h>
Classes | |
struct | Entry |
EventQueue's inner class that contains an Event object and event listener it's destined. More... | |
Public Member Functions | |
EventQueue () | |
~EventQueue () | |
void | addToQueue (Event &&event, EventListener eventListener) |
Adds an event to the queue and affiliated event listener. More... | |
bool | empty () |
Is queue empty. More... | |
Event | getNextEvent (EventListener &eventListener) |
Pops an event from the queue. The returned event is removed from the queue. More... | |
Private Attributes | |
std::queue< Entry > | queue |
GUISystem's internal event queue; collects fired events and affiliates them with particular event listener.
Definition at line 21 of file EventQueue.h.
|
inline |
Definition at line 24 of file EventQueue.h.
|
inline |
Definition at line 25 of file EventQueue.h.
References addToQueue(), empty(), and getNextEvent().
void EventQueue::addToQueue | ( | Event && | event, |
EventListener | eventListener | ||
) |
Adds an event to the queue and affiliated event listener.
event | The event |
eventListener | EventListener handling the event |
Definition at line 9 of file EventQueue.cpp.
References queue.
bool EventQueue::empty | ( | ) |
Is queue empty.
Definition at line 14 of file EventQueue.cpp.
References queue.
Event EventQueue::getNextEvent | ( | EventListener & | eventListener | ) |
Pops an event from the queue. The returned event is removed from the queue.
eventListener | Reference to EventListener handling the event. |
Definition at line 19 of file EventQueue.cpp.
References gui::EventQueue::Entry::event, gui::EventQueue::Entry::eventListener, and queue.
|
private |
Definition at line 76 of file EventQueue.h.