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

A search-field + count-chip toolbar band with a tappable field. More...

#include <ra8_widget_toolbar.h>

Detailed Description

A search-field + count-chip toolbar band with a tappable field.

Caller-owned plain data bound to a ra8_widget_t with ra8_widget_toolbar_init. The band is inset by pad; the count chip takes a fixed count_w on the right and the search field flexes to fill the rest. render fills bg, draws the border-framed field box with the hint placeholder, then the right-aligned count text. on_input consumes a touch that lands inside the search-field rect (incrementing searches and firing on_search); everything else is declined.

Invariant
searches only ever increases.
border_w >= 0; count_w >= 0.
Example:
ra8_widget_toolbar_t tb = {.paint = &paint, .hint = "Search",
.count = "12 books", .on_search = open_kbd,
.bg = 0x00FFFFFFU, .field = 0x00F0F0F0U,
.border = 0x00C0C0C0U, .hint_fg = 0x00909090U,
.count_fg = 0x00909090U, .pad = 8, .border_w = 1,
.count_w = 72};
ra8_widget_t w = {};
(void)ra8_widget_toolbar_init(&w, &tb);
ra8_err_t ra8_widget_toolbar_init(ra8_widget_t *w, ra8_widget_toolbar_t *bar)
Bind a widget instance to a toolbar.
One widget instance (caller-owned, no allocation).
A search-field + count-chip toolbar band with a tappable field.
See also
ra8_widget_toolbar_init
Since
0.1.0

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