7 #ifndef IMAGINE_GRAPHICS_EVENTS_H 8 #define IMAGINE_GRAPHICS_EVENTS_H 18 KEY_BACK=16777219, KEY_TAB=16777217,
19 KEY_RETURN=16777220, KEY_NUMPAD_ENTER=16777221,
21 KEY_INSERT=16777222, KEY_DELETE=16777223,
22 KEY_HOME=16777232, KEY_END=16777233,
23 KEY_PAGEUP=16777238, KEY_PAGEDOWN,
24 KEY_LEFT=16777234, KEY_UP, KEY_RIGHT, KEY_DOWN,
25 KEY_SHIFT=16777248, KEY_CONTROL=16777249,
26 KEY_CMD=16777299, KEY_ALT=16777251,
27 KEY_PRINT=16777225, KEY_SCROLL=16777254,
28 KEY_PAUSE=16777224, KEY_MENU=16777301,
29 KEY_F1=16777264, KEY_F2, KEY_F3, KEY_F4, KEY_F5, KEY_F6,
30 KEY_F7, KEY_F8, KEY_F9, KEY_F10, KEY_F11, KEY_F12,
127 int getKey(
bool ignoreModifier=
true);
IntPoint2 pix
Mouse position (only for EVT_BUT_ON, EVT_BUT_OFF and EVT_MOTION).
Definition: Events.h:73
int anyClick()
Wait for mouse click in any window.
void milliSleep(int msec)
...
Window win
Window where the event occurred.
Definition: Events.h:82
int subWin
SubWindow where the event occurred.
Definition: Events.h:84
EventState
Event State.
Definition: Events.h:59
int button
Mouse button (1,2,3) that triggered the event, if any.
Definition: Events.h:75
void flushEvents()
Flush event queue, discarding unhandled events.
const T & x() const
Read alias.
Definition: FVector.h:104
void unGetEvent(const Event &ev)
Unget event.
int key
Key code that triggered the event, if any (only for types EVT_KEY_ON and EVT_KEY_OFF).
Definition: Events.h:78
WindowInternal * Window
Handle to a display window.
Definition: Types.h:48
void getEvent(int ms, Event &ev)
Get keyboard and mouse events.
int anyGetKey(Window &win, int &subWin, bool ignoreModifier=true)
Wait for key press in any window.
int getKey(bool ignoreModifier=true)
Wait for key press in active window.
EventType
Event type (keyboard or mouse event).
Definition: Events.h:43
EventType type
Event type.
Definition: Events.h:71
EventState state
Keyboard state (bitfield) just before the event occured.
Definition: Events.h:80
KeyCode
Keyboard codes for characterless keys.
Definition: Events.h:17
Event info.
Definition: Events.h:69
const T & y() const
Read alias.
Definition: FVector.h:118
Imagine++ namespace.
Definition: Array.h:7
int getMouse(int &x, int &y)
Wait for mouse click in active window (returning position).
int click()
Wait for mouse click in active window.
int anyGetMouse(int &x, int &y, Window &win, int &subWin)
Wait for mouse click in any window (returning window and position).