Holds mouse state. More...
#include <glv_core.h>
Public Types | |
enum | { Left = 0, Middle, Right, Extra = (GLV_MAX_MOUSE_BUTTONS - 1) } |
Mouse button enumeration. More... | |
Public Member Functions | |
Mouse () | |
Constructor. | |
space_t | x () const |
Current x position. | |
space_t | y () const |
Current y position. | |
space_t | x (int button) const |
Get button's last down absolute x position. | |
space_t | y (int button) const |
Get button's last down absolute y position. | |
space_t | w () const |
Current wheel position. | |
space_t | dx () const |
Current x velocity. | |
space_t | dy () const |
Current y velocity. | |
space_t | dw () const |
Current wheel velocity. | |
space_t | ddx () const |
Current x acceleration. | |
space_t | ddy () const |
Current y acceleration. | |
space_t | ddw () const |
Current wheel acceleration. | |
space_t | xRel () const |
Current x position relative to current listener. | |
space_t | yRel () const |
Current y position relative to current listener. | |
space_t | xRel (int button) const |
Get button's last down relative x position. | |
space_t | yRel (int button) const |
Get button's last down relative y position. | |
int | button () const |
Last event button number. | |
int | clicks () const |
Number of sequential clicks of buttons. | |
bool | isDown () const |
Whether last event was button down. | |
bool | isDown (int button) const |
Whether button is currently down. | |
bool | left () const |
Whether left button is currently down. | |
bool | middle () const |
Whether middle button is currently down. | |
bool | right () const |
Whether right button is currently down. | |
void | print () const |
Print out information about Mouse to stdout. | |
void | setContext (View *v) |
Translate relative pos into sub-View. | |
void | unsetContext (View *v) |
Translate relative pos out of sub-View. |
Holds mouse state.
anonymous enum |
Mouse button enumeration.