Class MouseCtrl Used to control user gesture (scrolling, clicks...) With this class, you can know if user try to click, double click, do a long press, scroll up/down or left/right. More...
#include <SDK_Manila_Sense.h>

Public Member Functions | |
| ~MouseCtrl (void) | |
| Element * | changeMouseAnalyse (Element *e) |
| used to change the element which will analyze the user gestures | |
| int | getMouseDX () |
| to get the speed of horizontal scrolling | |
| double | getMouseDXMean () |
| to get the mean speed of horizontal scrolling | |
| int | getMouseDY () |
| to get the speed of vertical scrolling | |
| void | getMousePosition (int &x, int &y) |
| get the mouse position (update x and y) | |
| Element * | giveControlBack () |
| This method is used by element when the control of interaction with user is no longer needed. | |
| bool | isClicked () |
| Get infos about mouse. | |
| bool | isDblClicked () |
| Get infos about mouse. | |
| bool | isMouseDown () |
| To know if left button of mouse is down. | |
| bool | isRightClicked () const |
| Get infos about mouse. | |
| bool | isSelected () |
| To know if left button of mouse is down. | |
| bool | isSlidingLeft () |
| Get infos about mouse. | |
| void | leftBtnDown (int x, int y) |
| used to emulate a left button down in (x,y). | |
| void | leftBtnMove (int x, int y) |
| used to emulate a left button move in (x,y). | |
| void | leftBtnUp (int x, int y) |
| used to emulate a left button up in (x,y). | |
| bool | pickChange () |
| This method is used know if user is trying to do something since the last time you use this method (contrary to MouseCtrl::sthgHasChange). | |
| void | rightBtnDown (int x, int y) |
| used to emulate a right click in (x,y). A right click is a long press in rthe same position | |
| void | setClickSelected (bool val) |
| used to emulate a left button movement | |
| bool | setMouseAnalyse (Element *e) |
| used to set the main proc for mouse analyze (should not be used) | |
| bool | sthgHasChange () |
| Get infos about mouse. | |
| void | stopScroll () |
| When you want to stop the scrolling effect, use this method. | |
| int | updateElement () |
| This method is called before each frame to know what user has done. | |
Static Public Member Functions | |
| static MouseCtrl * | getInstance () |
| Use this method to obtain a valid pointer on MouseCtrl. | |
Class MouseCtrl Used to control user gesture (scrolling, clicks...) With this class, you can know if user try to click, double click, do a long press, scroll up/down or left/right.
Definition at line 733 of file SDK_Manila_Sense.h.
| MouseCtrl::~MouseCtrl | ( | void | ) |
Definition at line 43 of file MouseCtrl.cpp.
used to change the element which will analyze the user gestures
| e | new element which will be responsible of decision according to user gesture. |
Definition at line 218 of file MouseCtrl.cpp.
| MouseCtrl * MouseCtrl::getInstance | ( | ) | [static] |
Use this method to obtain a valid pointer on MouseCtrl.
Definition at line 49 of file MouseCtrl.cpp.
| int MouseCtrl::getMouseDX | ( | ) |
to get the speed of horizontal scrolling
Definition at line 288 of file MouseCtrl.cpp.
| double MouseCtrl::getMouseDXMean | ( | ) |
to get the mean speed of horizontal scrolling
Definition at line 304 of file MouseCtrl.cpp.
| int MouseCtrl::getMouseDY | ( | ) |
to get the speed of vertical scrolling
Definition at line 240 of file MouseCtrl.cpp.
| void MouseCtrl::getMousePosition | ( | int & | x, | |
| int & | y | |||
| ) |
get the mouse position (update x and y)
Definition at line 349 of file MouseCtrl.cpp.
| Element* MouseCtrl::giveControlBack | ( | ) | [inline] |
This method is used by element when the control of interaction with user is no longer needed.
Definition at line 784 of file SDK_Manila_Sense.h.
| bool MouseCtrl::isClicked | ( | ) |
Get infos about mouse.
Definition at line 326 of file MouseCtrl.cpp.
| bool MouseCtrl::isDblClicked | ( | ) |
Get infos about mouse.
Definition at line 338 of file MouseCtrl.cpp.
| bool MouseCtrl::isMouseDown | ( | ) |
To know if left button of mouse is down.
Definition at line 334 of file MouseCtrl.cpp.
| bool MouseCtrl::isRightClicked | ( | ) | const [inline] |
Get infos about mouse.
Definition at line 860 of file SDK_Manila_Sense.h.
| bool MouseCtrl::isSelected | ( | ) |
To know if left button of mouse is down.
Definition at line 323 of file MouseCtrl.cpp.
| bool MouseCtrl::isSlidingLeft | ( | ) |
Get infos about mouse.
Definition at line 342 of file MouseCtrl.cpp.
| void MouseCtrl::leftBtnDown | ( | int | x, | |
| int | y | |||
| ) |
used to emulate a left button down in (x,y).
Definition at line 84 of file MouseCtrl.cpp.
| void MouseCtrl::leftBtnMove | ( | int | x, | |
| int | y | |||
| ) |
used to emulate a left button move in (x,y).
Definition at line 160 of file MouseCtrl.cpp.
| void MouseCtrl::leftBtnUp | ( | int | x, | |
| int | y | |||
| ) |
used to emulate a left button up in (x,y).
Definition at line 116 of file MouseCtrl.cpp.
| bool MouseCtrl::pickChange | ( | ) | [inline] |
This method is used know if user is trying to do something since the last time you use this method (contrary to MouseCtrl::sthgHasChange).
Definition at line 823 of file SDK_Manila_Sense.h.
| void MouseCtrl::rightBtnDown | ( | int | x, | |
| int | y | |||
| ) |
used to emulate a right click in (x,y). A right click is a long press in rthe same position
Definition at line 55 of file MouseCtrl.cpp.
| void MouseCtrl::setClickSelected | ( | bool | val | ) | [inline] |
used to emulate a left button movement
| val | true if you want to emulate a button down, false else |
Definition at line 808 of file SDK_Manila_Sense.h.
| bool MouseCtrl::setMouseAnalyse | ( | Element * | e | ) |
used to set the main proc for mouse analyze (should not be used)
Definition at line 207 of file MouseCtrl.cpp.
| bool MouseCtrl::sthgHasChange | ( | ) |
Get infos about mouse.
Definition at line 345 of file MouseCtrl.cpp.
| void MouseCtrl::stopScroll | ( | ) |
When you want to stop the scrolling effect, use this method.
Definition at line 152 of file MouseCtrl.cpp.
| int MouseCtrl::updateElement | ( | ) |
This method is called before each frame to know what user has done.
Definition at line 314 of file MouseCtrl.cpp.