Text GUI element.
More...
#include <hV_GUI.h>
|
| Text (GUI *gui) |
| Constructor.
|
|
void | dDefine (uint16_t x0, uint16_t y0, uint16_t dx, uint16_t dy, uint8_t horizontal0=0, uint8_t vertical0=0, uint8_t size=0xff) |
| Define a text box, vector coordinates.
|
|
void | setOption (bool option=true) |
| Draw a frame around the text.
|
|
void | draw (STRING_CONST_TYPE text) |
| Display the text.
|
|
void | drawFormat (const char *format,...) |
| Format and display the values.
|
|
| 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.
|
|
Text GUI element.
Text displays a text with format options
◆ Text()
Constructor.
- Parameters
-
gui | &gui to which the element belongs |
◆ dDefine()
void Text::dDefine |
( |
uint16_t | x0, |
|
|
uint16_t | y0, |
|
|
uint16_t | dx, |
|
|
uint16_t | dy, |
|
|
uint8_t | horizontal0 = 0, |
|
|
uint8_t | vertical0 = 0, |
|
|
uint8_t | size = 0xff ) |
Define a text box, vector coordinates.
- Parameters
-
x0 | point coordinate, x-axis |
y0 | point coordinate, y-axis |
dx | length, x-axis |
dy | height, y-axis |
horizontal0 | horizontal position with 0 = center, 1 = left, 2 = right, optional |
vertical0 | vertical position with 0 = center, 1 = top, 2 = bottom, optional |
size | size of the font, default = fontSizeAutomatic = automatic, optional |
More: Coordinates, Colours
◆ draw()
void Text::draw |
( |
STRING_CONST_TYPE | text | ) |
|
Display the text.
- Parameters
-
◆ drawFormat()
void Text::drawFormat |
( |
const char * | format, |
|
|
| ... ) |
Format and display the values.
- Parameters
-
format | format with standard codes |
... | list of values |
◆ setOption()
void Text::setOption |
( |
bool | option = true | ) |
|
Draw a frame around the text.
The text is initialised with false = no frame. Use setOption to draw a frame.
- Parameters
-
option | default = optionWithFrame = within a frame, optionWithoutFrame = no frame |
The documentation for this class was generated from the following file: