Plus-minus button GUI element.
More...
#include <hV_GUI.h>
|
void | dDefine (uint16_t x0, uint16_t y0, uint16_t dx, uint16_t dy, const char *minus="-", const char *plus="+") |
| Define plus-minus button, vector coordinates.
|
|
void | setOption (bool option=true) |
| Set orientation of the plus-minus button.
|
|
void | draw (int8_t value=0) |
| Draw the button.
|
|
bool | check (uint8_t mode=0) |
| Check plus-minus button is pressed.
|
|
int8_t | getValue () |
| Return current value of the plus-minus button.
|
|
| 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.
|
|
Plus-minus button GUI element.
PlusMinus displays a combined plus-minus button
◆ check()
bool PlusMinus::check |
( |
uint8_t | mode = 0 | ) |
|
Check plus-minus button is pressed.
With button animation
- Parameters
-
mode | default = checkNormal = area waits for release, checkInstant = element is activated by press only |
- Returns
- true if button pressed
◆ dDefine()
void PlusMinus::dDefine |
( |
uint16_t | x0, |
|
|
uint16_t | y0, |
|
|
uint16_t | dx, |
|
|
uint16_t | dy, |
|
|
const char * | minus = "-", |
|
|
const char * | plus = "+" ) |
Define plus-minus button, vector coordinates.
- Parameters
-
x0 | point coordinate, x-axis |
y0 | point coordinate, y-axis |
dx | length, x-axis |
dy | height, y-axis |
minus | bottom or left label, default = "-" |
plus | top or right label, default = "+" |
◆ draw()
void PlusMinus::draw |
( |
int8_t | value = 0 | ) |
|
Draw the button.
- Parameters
-
value | default = 0 = no overriding, -1 = minus, 1 = plus |
◆ getValue()
int8_t PlusMinus::getValue |
( |
| ) |
|
Return current value of the plus-minus button.
- Returns
- current value minus = -1, nil = 0, plus = +1
◆ setOption()
void PlusMinus::setOption |
( |
bool | option = true | ) |
|
Set orientation of the plus-minus button.
- Parameters
-
flag | default = optionVertical = vertical, optionHorizontal = horizontal |
The documentation for this class was generated from the following file: