Pervasive Displays Library Suite - Reference Manual 9.0.3
Library for Pervasive Displays e-paper screens, extension boards and development kits
Loading...
Searching...
No Matches
TextBox Class Reference

TextBox GUI element. More...

#include <hV_GUI.h>

Inheritance diagram for TextBox:
Collaboration diagram for TextBox:

Public Member Functions

 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.
 
- Public Member Functions inherited from Area
 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.
 

Detailed Description

TextBox GUI element.

TextBox is an area for text with word-wrap and auto-scrolling
Special commands are accepted:


  • = new line
  • \r = for clear

Constructor & Destructor Documentation

◆ TextBox()

TextBox::TextBox ( GUI * gui)

Constructor.

Parameters
gui&gui to which the element belongs

Member Function Documentation

◆ 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
x0point coordinate, x-axis
y0point coordinate, y-axis
dxlength, x-axis
dyheight, y-axis
sizesize of the font, default = 0


More: Coordinates, Colours

◆ draw()

void TextBox::draw ( STRING_CONST_TYPE text)

Display text on the text box.

Parameters
textstring to be printed

◆ drawFormat()

void TextBox::drawFormat ( const char * format,
... )

Format and display the values on the text box.

Parameters
formatformat 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
optiondefault = optionWithoutFrame no frame, true = with frame

The documentation for this class was generated from the following file: