#include <CursorTask.h>
|
int | x = 0 |
|
int | y = 0 |
|
bool | state = false |
|
CursorTask class.
The class to be used for accessing the touchpad (mouse) and click information.
Examples of usage:
- Note
- WidgetApplication creates a KeyboardTask object at initialisation. It is then better to ask for a direct access to its CursorTask by using the WidgetApplication::getmousehandler() method.
- See also
- WidgetApplication::getmousehandler()
◆ cursortype
Enumerator for mouse cursor style.
Gives the style of mouse cursor. triangle style represents simple triangular arrow cursor. rounclock style represents the simple clock cursor (not animated)
◆ CursorTask()
CursorTask::CursorTask |
( |
| ) |
|
|
inline |
Simple constructor
Simple constructor, will need specific properties assignement later.
- Parameters
-
- Returns
- Nothing
◆ ~CursorTask()
virtual CursorTask::~CursorTask |
( |
| ) |
|
|
inlinevirtual |
Object destructor.
Object destructor, remove all trace of the object and free allocated memory.
- Parameters
-
- Returns
- Nothing
◆ hidemouse()
virtual void CursorTask::hidemouse |
( |
| ) |
|
|
inlinevirtual |
The CursorTask hidemouse method
Method to be launched to hide (and hence not draw) the mouse cursor on the screen.
- Parameters
-
- Returns
- Nothing.
- Note
- By default, at initialisation, the cursor is shown
◆ ismouseclickevent()
virtual bool CursorTask::ismouseclickevent |
( |
| ) |
|
|
inlinevirtual |
◆ ismouseevent()
virtual bool CursorTask::ismouseevent |
( |
| ) |
|
|
inlinevirtual |
◆ ismousemoveevent()
virtual bool CursorTask::ismousemoveevent |
( |
| ) |
|
|
inlinevirtual |
◆ ismousereleaseevent()
virtual bool CursorTask::ismousereleaseevent |
( |
| ) |
|
|
inlinevirtual |
◆ ismousevisible()
virtual bool CursorTask::ismousevisible |
( |
| ) |
|
|
inlinevirtual |
The CursorTask ismousevisible method
Method to be launched to know if the mosue cursor is hiden or visible.
- Parameters
-
- Returns
- Boolean : true if the cursor is visible and false otherwise.
- Note
- By default, at initialisation, the cursor is shown.
◆ logic()
void CursorTask::logic |
( |
| ) |
|
|
virtual |
The CursorTask logic mechanism
All the properties of the Touchpad will be updated and member of the current object will be updated accordingly.
- Parameters
-
- Returns
- Nothing, internal members will be updated.
◆ render()
void CursorTask::render |
( |
SDL_Surface * |
screen | ) |
|
|
virtual |
The CursorTask render method
Method to be launched to draw the mouse cursor on the screen.
- Parameters
-
screen | : pointer to a SDL_Surface object where we would like to draw the widget. |
- Returns
- Nothing.
◆ setcursortype()
Cursor style setter.
Gives the style of mouse cursor
- Parameters
-
type | refers to one of the styles given by the cursortype enumerator |
- Returns
- Nothing
- See also
- cursortype
◆ showmouse()
virtual void CursorTask::showmouse |
( |
| ) |
|
|
inlinevirtual |
The CursorTask showmouse method
Method to be launched to actually show (and hence draw) the mouse cursor on the screen.
- Parameters
-
- Returns
- Nothing.
- Note
- By default, at initialisation, the cursor is shown
◆ state
bool CursorTask::state = false |
Cursor click status
Gives direct access to the button status of the touchpad
- Note
- value is equal to true if clicked and fals otherwise.
- See also
- CursorTask::x CursorTask::y
Cursor Y coordinate in the screen
Gives direct access to the X coordinate of the cursor on the screen
- Note
- value should be between 0 and 320
- See also
- CursorTask::y CursorTask::state
Cursor Y coordinate in the screen
Gives direct access to the Y coordinate of the cursor on the screen
- Note
- value should be between 0 and 240
- See also
- CursorTask::x CursorTask::state
The documentation for this class was generated from the following files:
- /home/sylvain/NSpire_Programming/Widgets/Widgets/Toolkit/CursorTask.h
- /home/sylvain/NSpire_Programming/Widgets/Widgets/Toolkit/CursorTask.cpp