xoreos
0.0.5
|
The notification manager, handling all notifications. More...
#include <notifications.h>
Public Member Functions | |
NotificationManager () | |
~NotificationManager () | |
void | init () |
void | resized (int oldWidth, int oldHeight, int newWidth, int newHeight) |
Notify all Notifyables that the screen size changed. More... | |
void | cameraMoved () |
Notify all Notifyables that the camera moved. More... | |
Private Member Functions | |
std::list< Notifyable * >::iterator | registerNotifyable (Notifyable ¬ifyable) |
void | unregisterNotifyable (const std::list< Notifyable *>::iterator &it) |
Private Attributes | |
Common::Mutex | _mutex |
std::list< Notifyable * > | _notifyables |
Friends | |
class | Notifyable |
Additional Inherited Members | |
Static Public Member Functions inherited from Common::Singleton< NotificationManager > | |
static NotificationManager & | instance () |
static void | destroy () |
Protected Types inherited from Common::Singleton< NotificationManager > | |
typedef NotificationManager | SingletonBaseType |
Protected Member Functions inherited from Common::Singleton< NotificationManager > | |
Singleton () | |
virtual | ~Singleton () |
The notification manager, handling all notifications.
Notifications are handed out to all classes of the Notifyable type for special backend code that need to be reacted to by the client game code.
One example would be a change in the display resolution: GUI elements with an affinity to a screen edge or corner need to told that this change occurred, so that they can reposition themselves to the new coordinates.
Definition at line 49 of file notifications.h.
Events::NotificationManager::NotificationManager | ( | ) |
Definition at line 32 of file notifications.cpp.
Events::NotificationManager::~NotificationManager | ( | ) |
Definition at line 35 of file notifications.cpp.
void Events::NotificationManager::cameraMoved | ( | ) |
Notify all Notifyables that the camera moved.
Definition at line 62 of file notifications.cpp.
References _mutex, and _notifyables.
void Events::NotificationManager::init | ( | ) |
Definition at line 38 of file notifications.cpp.
|
private |
Definition at line 41 of file notifications.cpp.
References _mutex, and _notifyables.
void Events::NotificationManager::resized | ( | int | oldWidth, |
int | oldHeight, | ||
int | newWidth, | ||
int | newHeight | ||
) |
Notify all Notifyables that the screen size changed.
Definition at line 55 of file notifications.cpp.
References _mutex, and _notifyables.
|
private |
Definition at line 49 of file notifications.cpp.
References _mutex, and _notifyables.
|
friend |
Definition at line 69 of file notifications.h.
|
private |
Definition at line 62 of file notifications.h.
Referenced by cameraMoved(), registerNotifyable(), resized(), and unregisterNotifyable().
|
private |
Definition at line 64 of file notifications.h.
Referenced by cameraMoved(), registerNotifyable(), resized(), and unregisterNotifyable().