![]() |
Blamite Game Engine - Strings
00402.09.29.23.0627.blamite
A library containing general purpose utilities and classes for use in multiple projects.
|
Class representing an Event Listener. More...
#include <events.h>
Public Member Functions | |
void | Subscribe (BlamEventType type) |
Subscribes to an event type. More... | |
~BlamEventListener () | |
std::vector< BlamEventType > | GetSubscribedEvents () |
Retrieves the list of subscribed event types. More... | |
bool | IsSubscribed (BlamEventType type) |
Determines whether or not the listener is subscribed to the specified event type. More... | |
void | SetPriority (int new_priority) |
Sets the priority of the listener. More... | |
int | GetPriority () |
Retrieves the priority of the listener. More... | |
virtual void | OnCharacterInputEvent (CharacterInputEvent *event) |
Called when the listener is subscribed to Character Input events, and a new CharacterInputEvent is fired. More... | |
virtual void | OnConfigurationReloadEvent (ConfigurationReloadEvent *event) |
Called when the listener is subscribed to configuration reload events, and a new ConfigurationReloadEvent is fired. More... | |
virtual void | OnKeyPressEvent (KeyPressEvent *event) |
Called when the listener is subscribed to Key Press events, and a new KeyPressEvent is fired. More... | |
virtual void | OnMouseClickEvent (MouseClickEvent *event) |
Called when the listener is subscribed to Mouse Click events, and a new MouseClickEvent is fired. More... | |
virtual void | OnMouseMoveEvent (MouseMoveEvent *event) |
Called when the listener is subscribed to Mouse Move events, and a new MouseMoveEvent is fired. More... | |
virtual void | OnTickEvent (TickEvent *event) |
Called when the listener is subscribed to Tick events, and a new TickEvent is fired. More... | |
virtual void | OnNewFrameEvent (NewFrameEvent *event) |
Called when the listener is subscribed to New Frame events, and a new NewFrameEvent is fired. More... | |
virtual void | OnLogMessageEvent (LogMessageEvent *event) |
Called when the listener is subscribed to Log Message events, and a new LogMessageEvent is fired. More... | |
virtual void | OnEditorTickEvent (EditorTickEvent *event) |
Called when the listener is subscribed to Editor Tick events, and a new EditorTickEvent is fired. More... | |
virtual void | OnEditorThemeChangeEvent (EditorThemeChangeEvent *event) |
Called when the listener is subscribed to Editor Theme Change events, and a new EditorThemeChangeEvent is fired. More... | |
Public Attributes | |
std::string | name = "" |
The name of the listener. Used for debugging purposes. More... | |
Class representing an Event Listener.
Event listeners are used to receive event notifications. They can subscribe and unsubscribe from any number of event types.
The class is intended to be used as an interface.
BlamEventListener::~BlamEventListener | ( | ) |
int BlamEventListener::GetPriority | ( | ) |
Retrieves the priority of the listener.
std::vector< BlamEventType > BlamEventListener::GetSubscribedEvents | ( | ) |
Retrieves the list of subscribed event types.
bool BlamEventListener::IsSubscribed | ( | BlamEventType | type | ) |
Determines whether or not the listener is subscribed to the specified event type.
type | - The type to check against. |
|
inlinevirtual |
Called when the listener is subscribed to Character Input events, and a new CharacterInputEvent is fired.
event | - The event that was fired. |
|
inlinevirtual |
Called when the listener is subscribed to configuration reload events, and a new ConfigurationReloadEvent is fired.
event | - The event that was fired. |
|
inlinevirtual |
Called when the listener is subscribed to Editor Theme Change events, and a new EditorThemeChangeEvent is fired.
event | - The event that was fired. |
|
inlinevirtual |
Called when the listener is subscribed to Editor Tick events, and a new EditorTickEvent is fired.
event | - The event that was fired. |
|
inlinevirtual |
Called when the listener is subscribed to Key Press events, and a new KeyPressEvent is fired.
event | - The event that was fired. |
|
inlinevirtual |
Called when the listener is subscribed to Log Message events, and a new LogMessageEvent is fired.
event | - The event that was fired. |
|
inlinevirtual |
Called when the listener is subscribed to Mouse Click events, and a new MouseClickEvent is fired.
event | - The event that was fired. |
|
inlinevirtual |
Called when the listener is subscribed to Mouse Move events, and a new MouseMoveEvent is fired.
event | - The event that was fired. |
|
inlinevirtual |
Called when the listener is subscribed to New Frame events, and a new NewFrameEvent is fired.
event | - The event that was fired. |
|
inlinevirtual |
Called when the listener is subscribed to Tick events, and a new TickEvent is fired.
event | - The event that was fired. |
void BlamEventListener::SetPriority | ( | int | new_priority | ) |
Sets the priority of the listener.
Higher priority listeners will recieve event notifications before lower priority listeners.
new_priority | - The new priority of the listener. |
void BlamEventListener::Subscribe | ( | BlamEventType | type | ) |
Subscribes to an event type.
This will cause the listener to recieve notifications about the specified event type.
type | - The event type to subscribe to. |
std::string BlamEventListener::name = "" |
The name of the listener. Used for debugging purposes.