#include <system.h>
Public Attributes | |
TPoint | where |
ulong | eventFlags |
ulong | controlKeyState |
uchar | buttons |
This structure holds the data that characterizes a mouse event: button number, whether double-clicked, and the coordinates of the point where the click was detected.
Definition at line 114 of file system.h.
|
This variable reports the status of the mouse buttons when the event happened. It's a combination of the following constants:
Flag Value Meaning mbLeftButton 0x01 Set if left button was pressed mbRightButton 0x02 Set if right button was pressed These constants are useful when examining the buttons data member. For example:
if ((event.what == evMouseDown) && (event.buttons == mbLeftButton)) doLeftButtonDownAction(); Note: you can swap left and right buttons by setting variable TEventQueue::mouseReverse to True. See the `demo' program for more information. |
|
This bitmap variable stores the status of the control keys when the event happened. The following values define keyboard states, and can be used when examining the keyboard shift state:
Flag Value Meaning kbRightShift 0x0001 Set if the Right Shift key is currently down kbLeftShift 0x0002 Set if the Left Shift key is currently down kbCtrlShift 0x0004 Set if the Ctrl key is currently down kbAltShift 0x0008 Set if the Alt key is currently down kbScrollState 0x0010 Set if the keyboard is in the Scroll Lock state kbNumState 0x0020 Set if the keyboard is in the Num Lock state kbCapsState 0x0040 Set if the keyboard is in the Caps Lock state kbInsState 0x0080 Set if the keyboard is in the Ins Lock state Its value is 0 if none of these keys was pressed. Warning: this information is not reliable. Its value depends on your operating system and libraries (gpm, ncurses). Usually only a subset of these flags are detected. See file `system.cc' for details. |
|
Helps to specify the event. This bitmap variable is set to meDoubleClick if a double-click event happened. If the mouse is simply moved its value is meMouseMoved. Otherwise its value is 0.
Flag Value Meaning meMouseMoved 0x01 Set if mouse is moved meDoubleClick 0x02 Set if a button was double clicked |
|
This is the position where the event happened. |