ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
ra8_widget_status_bar_t Struct Reference

A status band: a fill, a left + right label, and a bottom hairline. More...

#include <ra8_widget_status_bar.h>

Detailed Description

A status band: a fill, a left + right label, and a bottom hairline.

Caller-owned plain data bound to a ra8_widget_t with ra8_widget_status_bar_init. render fills the rect with bg, places left at the left inset and right at the right inset (right alignment needs the backend's text_size; without it the right text falls back to the left inset), then fills a rule-coloured strip rule_h pixels tall at the band's bottom. A NULL left / right draws no text; a rule_h <= 0 draws no rule.

Invariant
rule_h <= 0 disables the bottom hairline.
A NULL label string draws no text for that side.
Example:
ra8_widget_status_bar_t sb = {.paint = &paint, .left = "Library",
.right = "12:00", .bg = 0x00FFFFFFU,
.fg = 0x00101010U, .fg_right = 0x00808080U,
.rule = 0x00C0C0C0U, .pad = 8, .rule_h = 1};
ra8_widget_t w = {};
ra8_err_t ra8_widget_status_bar_init(ra8_widget_t *w, ra8_widget_status_bar_t *bar)
Bind a widget instance to a status bar.
A status band: a fill, a left + right label, and a bottom hairline.
One widget instance (caller-owned, no allocation).
See also
ra8_widget_status_bar_init
Since
0.1.0

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