libtextscreen
Typedefs | Functions
txt_label.h File Reference

Text label widget. More...

#include "txt_main.h"
#include "txt_widget.h"

Typedefs

typedef struct txt_label_s txt_label_t
 Label widget. More...
 

Functions

txt_label_tTXT_NewLabel (const char *label)
 Create a new label widget. More...
 
void TXT_SetLabel (txt_label_t *label, const char *value)
 Set the string displayed in a label widget. More...
 
void TXT_SetBGColor (txt_label_t *label, txt_color_t color)
 Set the background color of a label widget. More...
 
void TXT_SetFGColor (txt_label_t *label, txt_color_t color)
 Set the foreground color of a label widget. More...
 

Detailed Description

Text label widget.

Typedef Documentation

◆ txt_label_t

typedef struct txt_label_s txt_label_t

Label widget.

A label widget does nothing except show a text label.

Function Documentation

◆ TXT_NewLabel()

txt_label_t* TXT_NewLabel ( const char *  label)

Create a new label widget.

Parameters
labelString to display in the widget (UTF-8 format).
Returns
Pointer to the new label widget.

◆ TXT_SetBGColor()

void TXT_SetBGColor ( txt_label_t label,
txt_color_t  color 
)

Set the background color of a label widget.

Parameters
labelThe widget.
colorThe background color to use.

◆ TXT_SetFGColor()

void TXT_SetFGColor ( txt_label_t label,
txt_color_t  color 
)

Set the foreground color of a label widget.

Parameters
labelThe widget.
colorThe foreground color to use.

◆ TXT_SetLabel()

void TXT_SetLabel ( txt_label_t label,
const char *  value 
)

Set the string displayed in a label widget.

Parameters
labelThe widget.
valueThe string to display (UTF-8 format).