Cursor GUI element.
More...
#include <hV_GUI.h>
|
| Cursor (GUI *gui) |
| Constructor.
|
|
void | dDefine (uint16_t x0, uint16_t y0, uint16_t dx, uint16_t dy, int32_t minValue, int32_t maxValue) |
| Define cursor, vector coordinates.
|
|
void | setOption (bool option=true) |
| Set orientation of the cursor.
|
|
void | draw (fsmGUI_e fsm=fsmReleased) |
| Draw the cursor.
|
|
bool | check (uint8_t mode=0) |
| Check cursor is pressed.
|
|
void | setValue (int32_t value) |
| Set current value of the cursor.
|
|
int32_t | getValue () |
| Return current value.
|
|
| Area (GUI *gui) |
| Constructor.
|
|
void | dDefine (uint16_t x0, uint16_t y0, uint16_t dx, uint16_t dy, uint16_t index=0x0000) |
| Define area, vector coordinates.
|
|
bool | getState () |
| Return state of the area.
|
|
void | setState (bool state=true) |
| Define state of the area.
|
|
void | setOption (bool option=true) |
| Set option of the area.
|
|
void | setStyle (uint8_t style=0) |
| Define the default style.
|
|
bool | check (uint8_t mode=0) |
| Check if area is pressed.
|
|
uint16_t | getIndex () |
| Return index.
|
|
Cursor GUI element.
Cursor is an area with a cursor
◆ Cursor()
Cursor::Cursor |
( |
GUI * | gui | ) |
|
Constructor.
- Parameters
-
gui | &gui to which the element belongs |
◆ check()
bool Cursor::check |
( |
uint8_t | mode = 0 | ) |
|
Check cursor is pressed.
With cursor animation
- Parameters
-
mode | default = checkNormal = area waits for release, checkInstant = element is activated by press only |
- Returns
- true if button pressed
◆ dDefine()
void Cursor::dDefine |
( |
uint16_t | x0, |
|
|
uint16_t | y0, |
|
|
uint16_t | dx, |
|
|
uint16_t | dy, |
|
|
int32_t | minValue, |
|
|
int32_t | maxValue ) |
Define cursor, vector coordinates.
- Parameters
-
x0 | point coordinate, x-axis |
y0 | point coordinate, y-axis |
dx | length, x-axis |
dy | height, y-axis |
minValue | minimum value, int32 |
maxValue | maximum value, int32 |
More: Coordinates, Colours
◆ draw()
Draw the cursor.
- Parameters
-
- Note
- 4 states
* if cursor enabled,
fsm = fsmReleased, fsmTouched, fsmConfirmed
* if cursor disabled,
flag = true: statement cursor, flag = false: unavailable cursor
◆ getValue()
int32_t Cursor::getValue |
( |
| ) |
|
Return current value.
- Returns
- current value between minValue and maxValue
◆ setOption()
void Cursor::setOption |
( |
bool | option = true | ) |
|
Set orientation of the cursor.
The cursor is initialised with false = horizontal. Use setOption to change the orientation.
- Parameters
-
option | default = optionVertical = vertical, optionHorizontal = horizontal |
◆ setValue()
void Cursor::setValue |
( |
int32_t | value | ) |
|
Set current value of the cursor.
- Parameters
-
value | value between minValue and maxValue |
The documentation for this class was generated from the following file: