#include <mouse.h>
Public Types | |
| enum | Button { LEFT = SDL_BUTTON(SDL_BUTTON_LEFT), RIGHT = SDL_BUTTON(SDL_BUTTON_RIGHT), MIDDLE = SDL_BUTTON(SDL_BUTTON_MIDDLE), WHEEL_UP = SDL_BUTTON(4), WHEEL_DOWN = SDL_BUTTON(5) } |
| Available masks for buttons. More... | |
Public Member Functions | |
| Mouse () | |
| Default ctor. | |
| ~Mouse () | |
| Default dtor. | |
| void | warp (const Point &p) |
| move the mouse pointer to a new screen position | |
| const Point & | position () const |
| get the current mouse pointer location | |
| Button | buttons () const |
| returns a mask indicating which buttons are pressed | |
| bool | hidden () const |
| hidden flag accessor | |
| void | setPointer (const Surface &, const Point &hotspot) |
| Only available with software pointer. | |
| void | setPointer (Pointer::Resource *) |
| Only available with software pointer. | |
| void | setPointer (const std::string &name) |
| Only available with software pointer. | |
| const Pointer * | getPointer () const |
| Only available with software pointer. | |
| void | hidePointer () |
| remove pointer from screen, and update | |
| void | showPointer () |
| paint pointer on screen | |
| bool | handleEvent (const SDL_Event *) |
| called by wftk mainloop | |
Static Public Member Functions | |
| static bool | isInit () |
| Check if we have initialized the singleton. | |
| static Mouse * | instance () |
| Singleton class - one and only one mouse pointer. | |
Public Attributes | |
|
SigC::Signal3< bool, const Point &, const Point &, Button, BoolMarshal > | mouseMove |
| absolute and relative position, button state mask | |
|
SigC::Signal3< bool, Button, bool, const Point &, BoolMarshal > | mouseClick |
| button, pressed (true) or release (false), position | |
| SigC::Signal0< bool, BoolMarshal > | lostMouse |
| application has lost mouse focus (signalled by window manager) | |
| SigC::Signal0< bool, BoolMarshal > | gotMouse |
| application has gained mouse focus (signalled by window manager) | |
it allows setting special mousepointers for specified areas of the screen.
|
|
Available masks for buttons.
|
This document is licensed under the terms of the GNU Free Documentation License and may be freely distributed under the conditions given by this license.