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
Text Class Reference

Text GUI element. More...

#include <hV_GUI.h>

Inheritance diagram for Text:
Collaboration diagram for Text:

Public Member Functions

 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.
 
- 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

Text GUI element.

Text displays a text with format options

Constructor & Destructor Documentation

◆ Text()

Text::Text ( GUI * gui)

Constructor.

Parameters
gui&gui to which the element belongs

Member Function Documentation

◆ 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
x0point coordinate, x-axis
y0point coordinate, y-axis
dxlength, x-axis
dyheight, y-axis
horizontal0horizontal position with 0 = center, 1 = left, 2 = right, optional
vertical0vertical position with 0 = center, 1 = top, 2 = bottom, optional
sizesize of the font, default = fontSizeAutomatic = automatic, optional


More: Coordinates, Colours

◆ draw()

void Text::draw ( STRING_CONST_TYPE text)

Display the text.

Parameters
texttext to be displayed

◆ drawFormat()

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

Format and display the values.

Parameters
formatformat 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
optiondefault = optionWithFrame = within a frame, optionWithoutFrame = no frame

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