#include <buttonEvent.h>
Public Types | |
enum | Type { T_down, T_resume_down, T_up, T_keystroke } |
Public Member Functions | |
ButtonEvent () | |
ButtonEvent (ButtonHandle button, Type type) | |
ButtonEvent (short keycode) | |
ButtonEvent (const ButtonEvent ©) | |
void | operator= (const ButtonEvent ©) |
bool | operator== (const ButtonEvent &other) const |
bool | operator!= (const ButtonEvent &other) const |
bool | operator< (const ButtonEvent &other) const |
void | output (ostream &out) const |
Public Attributes | |
ButtonHandle | _button |
short | _keycode |
Type | _type |
This is either a keyboard or mouse button (or some other kind of button) changing state from up to down, or vice-versa, or it is a single "keystroke".
A keystroke is different than a button event in that (a) it does not necessarily correspond to a physical button on a keyboard, but might be the result of a combination of buttons (e.g. "A" is the result of shift + "a"); and (b) it does not manage separate "up" and "down" events, but is itself an instantaneous event.
Normal up/down button events can be used to track the state of a particular button on the keyboard, while keystroke events are best used to monitor what a user is attempting to type.
Button up/down events are defined across all the physical keys on the keyboard (and other buttons for which there is a corresponding ButtonHandle object), while keystroke events are defined across the entire Unicode character set.
Definition at line 80 of file buttonEvent.h.
|
Definition at line 82 of file buttonEvent.h. |
|
Definition at line 31 of file buttonEvent.I. |
|
Definition at line 46 of file buttonEvent.I. References INLINE. |
|
Definition at line 61 of file buttonEvent.I. References INLINE. |
|
Definition at line 76 of file buttonEvent.I. |
|
Definition at line 119 of file buttonEvent.I. References _type. |
|
Definition at line 131 of file buttonEvent.I. |
|
Definition at line 91 of file buttonEvent.I. |
|
Definition at line 105 of file buttonEvent.I. |
|
Definition at line 32 of file buttonEvent.cxx. |
|
Definition at line 115 of file buttonEvent.h. Referenced by ButtonEvent(), ModifierButtons::get_num_buttons(), ButtonThrower::has_throw_button(), operator=(), and operator==(). |
|
Definition at line 119 of file buttonEvent.h. Referenced by ButtonEvent(), operator=(), and operator==(). |
|
Definition at line 121 of file buttonEvent.h. Referenced by ButtonEvent(), ModifierButtons::get_num_buttons(), ButtonThrower::has_throw_button(), operator!=(), and operator=(). |