Expand description
fill_rect and thumb_geometry/offset_for_pos: the handful of
things genuinely useful as standalone functions rather than
Widgets.
fill_rect is a one-shot fill with no configuration worth building.
thumb_geometry/offset_for_pos are pure position/size arithmetic with
no Terminal involved, reused for
hit-testing independently of drawing a
Scrollbar.
Everything else that used to live here (panel, modal,
progress_bar, print_line, log, gauge, stat_bar, sparkline,
table, meter_ramp, scrollbar) is now a Widget
(or StatefulWidget) struct under
widget, one file each, so there’s a single way to draw
each of them instead of a free function and a builder both doing the same
thing.
Functions§
- fill_
rect - Fill
rectwithchin the givenstyle. - offset_
for_ pos - The offset a vertical scrollbar should jump to for a click/drag at
pos. - thumb_
geometry - The thumb’s row span within
area((start, len), both relative toarea.top()) for a vertical scrollbar coveringtotal_lenitems in avisible_len-row viewport currently starting atoffset.