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

A paginated reflowed-text body: page state + margins + engine seam. More...

#include <ra8_widget_reflow_view.h>

Detailed Description

A paginated reflowed-text body: page state + margins + engine seam.

Caller-owned plain data bound to a ra8_widget_t with ra8_widget_reflow_view_init. render clears the widget rect to bg (through the injected ra8_widget_paint_t) and asks the seam to paint page inside the body rect (the widget rect inset by margin_x / margin_y). on_input routes a touch: it offers the tap to follow_link first (a link jump adopts the returned page); otherwise it turns the page – a tap on the left half steps back, the right half steps forward, clamped at page 0 and the last page. A body tap is always consumed.

Invariant
page < page_count (clamped on every mutation).
page_count >= 1 for a non-empty book.
Example:
ra8_widget_reflow_ops_t ops = {.user = &engine,
.render_page = paint_page,
.follow_link = tap_link};
ra8_widget_reflow_view_t rv = {.paint = &paint, .ops = &ops, .bg = 0x00FFFFFFU,
.page = 0, .page_count = 12,
.margin_x = 24, .margin_y = 8};
ra8_widget_t w = {};
struct ra8_widget ra8_widget_t
ra8_err_t ra8_widget_reflow_view_init(ra8_widget_t *w, ra8_widget_reflow_view_t *view)
Bind a widget instance to a reflow view.
Injected seam driving a reflow engine from the reflow-view widget.
A paginated reflowed-text body: page state + margins + engine seam.
See also
ra8_widget_reflow_view_init
ra8_widget_reflow_ops_t
Since
0.1.0

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