The event class describes the circumstances under which an event occured. Not all the values possibly stored in the Event class are filled in by each different type of event. Refer to each class's object event documentation to see which values are set by that type of event.
Method Summary: | ||
Event::Event | (); | |
bool | Event::getState | (); |
Size& | Event::getSize | (); |
Point& | Event::getPoint | (); |
String& | Event::getString | (); |
int | Event::getButton | (); |
bool | Event::getCtrl | (); |
bool | Event::getShift | (); |
bool | Event::getAlt | (); |
int | Event::getIndex | (); |
int | Event::getId | (); |
int | Event::getKey | (); |
void | Event::accept | (); |
void | Event::decline | (); |
Event::Event |
Event::Event(); Constructs a new event object with the default values. |
bool Event::getState |
bool Event::getState(); Returns the boolean state of the event. For example, a Toggle widget sets this to its state. |
Size& Event::getSize |
Size& Event::getSize(); Returns the size. Generally used by Resize events. |
Point& Event::getPoint |
Point& Event::getPoint(); Returns the point location of the event. Generally used by Canvas mouse events. |
String& Event::getString |
String& Event::getString(); Returns the string of the event. Choice selections and Canvas key events are some events that set this field. |
int Event::getButton |
int Event::getButton(); Returns the button of the event. Canvas mouse events use this field, for example. |
bool Event::getCtrl |
bool Event::getCtrl(); Returns whether the Control key was pressed when the event happened. Canvas mouse and keyboard events use this field. |
bool Event::getShift |
bool Event::getShift(); Returns whether the Shift key was pressed when the event happened. Canvas mouse and keyboard events use this field. |
bool Event::getAlt |
bool Event::getAlt(); Returns whether the Alt/Meta key was pressed when the event happened. Canvas mouse and keyboard events use this field. |
int Event::getIndex |
int Event::getIndex(); Returns any index that may be associated with the event. A Choice selection event fills this field, for example. |
int Event::getId |
int Event::getId(); Returns any identification number that might be associated with this event. Timer events supply the id, for example. |
int Event::getKey |
int Event::getKey(); Returns the unshifted ASCII code corresponding to the key press. This may also be a KEY_* constant for non-printing characters. Canvas key events use this field. |
void Event::accept |
void Event::accept(); Indicates that the event handler accepted the event. This is used mostly for window close events. For detail on how the window closing mechanism works, see the Window class documentation. |
void Event::decline |
void Event::decline(); Indicates that the event handler declined the event. This is used mostly for window close events. For detail on how the window closing mechanism works, see the Window class documentation. |