A container class for storing information about an Event. More...
#include <Event.h>
Public Member Functions | |
| Event (EventType type, int value1, int value2, const std::string &id="") | |
| Event () | |
| Event (const Event &event) | |
| Event & | operator= (const Event &rhs) |
| EventType | getType () const |
| const std::string & | getId () const |
| int | getFirst () const |
| int | getSecond () const |
| void | consume () |
| bool | isConsumed () |
Private Attributes | |
| EventType | mEventType |
| std::string | mId |
| int | mValue1 |
| int | mValue2 |
| bool | mConsumed |
A container class for storing information about an Event.
Events are the low-level messages used to grab events like keypresses, mouse clicks and joystick motion. Depending on the type of event the values of first and second will change.
Keydown/Keyup Events
getFirst() Keyboard keycode from keyCode.getSecond() A key modifier value from keyMod.Mouse Motion Events
getFirst() X-Coordinate of the mouse pointer.getSecond() Y-Coordinate of the mouse pointer.Mouse Button Events
getFirst() Will be either MOUSE_BUTTON_LEFT, MOUSE_BUTTON_MIDDLE, or MOUSE_BUTTON_RIGHT.Mouse Wheel Events
getType() Will be either EVENT_MOUSE_WHEEL_UP, or EVENT_MOUSE_WHEEL_DOWN.| Event::Event | ( | EventType | type, | |
| int | value1, | |||
| int | value2, | |||
| const std::string & | id = "" | |||
| ) | [inline] |
| Event::Event | ( | ) | [inline] |
Constructor for building a NULL event.
| Event::Event | ( | const Event & | event | ) | [inline] |
| void Event::consume | ( | ) | [inline] |
Flags this Event as used.
| int Event::getFirst | ( | ) | const [inline] |
Returns the First value.
| const std::string& Event::getId | ( | ) | const [inline] |
Returns the Message ID.
| int Event::getSecond | ( | ) | const [inline] |
Returns the Second value.
| EventType Event::getType | ( | ) | const [inline] |
Returns the Message Type.
| bool Event::isConsumed | ( | ) | [inline] |
Indicates whether or not this Event has been consumed.
bool Event::mConsumed [private] |
Internal flag indicating whether this event has been used.
EventType Event::mEventType [private] |
Event Type.
std::string Event::mId [private] |
Event ID.
int Event::mValue1 [private] |
Value 1.
int Event::mValue2 [private] |
Value 2.
1.7.1