TextBox GUI element.
More...
#include <hV_GUI.h>
|
| TextBox (GUI *gui) |
| Constructor.
|
|
void | dDefine (uint16_t x0, uint16_t y0, uint16_t dx, uint16_t dy, uint8_t size=0) |
| Define a text box, vector coordinates.
|
|
void | setOption (bool option=false) |
| Draw a frame around the text box option of the area.
|
|
void | clear () |
| Clear and draw the text box.
|
|
void | scroll () |
| Scroll the text on line up.
|
|
void | draw (STRING_CONST_TYPE text) |
| Display text on the text box.
|
|
void | drawFormat (const char *format,...) |
| Format and display the values on the text box.
|
|
| 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.
|
|
TextBox GUI element.
TextBox is an area for text with word-wrap and auto-scrolling
Special commands are accepted:
= new line
- \r = for clear
◆ TextBox()
TextBox::TextBox |
( |
GUI * | gui | ) |
|
Constructor.
- Parameters
-
gui | &gui to which the element belongs |
◆ dDefine()
void TextBox::dDefine |
( |
uint16_t | x0, |
|
|
uint16_t | y0, |
|
|
uint16_t | dx, |
|
|
uint16_t | dy, |
|
|
uint8_t | size = 0 ) |
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 |
size | size of the font, default = 0 |
More: Coordinates, Colours
◆ draw()
void TextBox::draw |
( |
STRING_CONST_TYPE | text | ) |
|
Display text on the text box.
- Parameters
-
◆ drawFormat()
void TextBox::drawFormat |
( |
const char * | format, |
|
|
| ... ) |
Format and display the values on the text box.
- Parameters
-
format | format with standard codes |
... | list of values |
◆ setOption()
void TextBox::setOption |
( |
bool | option = false | ) |
|
Draw a frame around the text box option of the area.
- Parameters
-
option | default = optionWithoutFrame no frame, true = with frame |
The documentation for this class was generated from the following file: