![]() |
GFXprim
2D bitmap graphics library with emphasis on speed and correctness
|
A text log widget. More...
Go to the source code of this file.
Functions | |
| void | gp_widget_log_append (gp_widget *self, const char *text) |
| Appends text to the log. | |
| gp_widget * | gp_widget_log_new (gp_widget_tattr tattr, unsigned int min_width, unsigned int min_lines, size_t max_logs) |
| Allocates a log widget. | |
A text log widget.
| Attribute | Type | Default | Description |
|---|---|---|---|
| max_logs | uint | A maximal number of log lines the widget can store. | |
| min_lines | uint | 25 | A minimal number of log lines visible on the screen. |
| min_width | uint | 80 | A minimal widget width in text characters. |
| tattr | string | normal | Log text attributes gp_widget_tattr, e.g. mono for monospace. |
Definition in file gp_widget_log.h.
| void gp_widget_log_append | ( | gp_widget * | self, |
| const char * | text ) |
Appends text to the log.
| self | A log widget. |
| text | Text to be appended. |
| gp_widget * gp_widget_log_new | ( | gp_widget_tattr | tattr, |
| unsigned int | min_width, | ||
| unsigned int | min_lines, | ||
| size_t | max_logs ) |
Allocates a log widget.
The log widget is a circular buffer of loglines, when size reaches the max_log_lines the oldest message gets removed from the log.
| tattr | Text attributes |
| min_width | Minimal width in letters |
| min_lines | Minimal number of lines |
| max_logs | Maximal number of log lines stored internally. |