14 releases (7 breaking)

0.27.0 Nov 1, 2024
0.25.1 Oct 18, 2024
0.12.0 Jul 3, 2024

#904 in Command-line interface

Download history 12/week @ 2024-08-17 278/week @ 2024-08-24 51/week @ 2024-08-31 154/week @ 2024-09-07 112/week @ 2024-09-14 46/week @ 2024-09-21 53/week @ 2024-09-28 180/week @ 2024-10-05 223/week @ 2024-10-12 203/week @ 2024-10-19 112/week @ 2024-10-26 93/week @ 2024-11-02 13/week @ 2024-11-09 71/week @ 2024-11-16 234/week @ 2024-11-23 121/week @ 2024-11-30

440 downloads per month
Used in 9 crates (5 directly)

MIT/Apache

52KB
1K SLoC

crates.io Documentation License License

This crate is a part of rat-salsa.

For examples see rat-scrolled GitHub

Scroll

Scroll adds support for widgets that want to scroll their content.

Scroll works analogous to Block, it can be set on the widget struct where it is supported. The widget can decide which scrolling it can do, horizontal vertical or both.

Adding scroll to a widget

  • Add Scroll to the widget struct.
  • Use ScrollArea for the layout and rendering of the combination of Block+Scroll+Scroll your widget supports.
  • Add ScrollState to the widget state struct.
  • Create a ScrollAreaState for event-handling.

Dependencies

~6–16MB
~213K SLoC