Module breadcrumb
Expand description
Breadcrumb widget — a horizontal path indicator with clickable ancestor segments and a chevron icon between them.
The trail takes the width it is given. When its segments do not fit, it
truncates the middle: keeps the first segment, puts the
Icon::MoreHorizontal glyph in place of the hidden ones, keeps the
last two, then fewer. What still does not fit ends the current
segment’s label in an ellipsis, and where the … leaves it no room the
current segment stands alone. Nothing paints past the trail’s width.
An optional root icon (Breadcrumb::root_icon) leads the first
segment (a drive, Home). A trail that doubles as an editable path
reports a click on its empty space through
Breadcrumb::on_edit_requested, so the host can swap in a field.
Structs§
- Breadcrumb
segment_rectsandvisible_originmirror the truncatedcached_visiblelist (not the originalsegments) so the click hit-test matches what’s on screen.- Breadcrumb
Props - Where a page is, as the path to it: each place it is in, a chevron between them, the page itself last. Pressing a place goes there. Where the path does not fit, its middle gives way first, the first place and the page itself staying.
- Breadcrumb
Segment Props - One place of a path: what it is called, and going there.