rat-scrolled

Crates.iorat-scrolled
lib.rsrat-scrolled
version0.27.0
sourcesrc
created_at2024-05-18 15:32:05.407605
updated_at2024-11-01 19:51:45.329333
descriptionratatui scroll widget and traits
homepage
repositoryhttps://github.com/thscharler/rat-scrolled
max_upload_size
id1244356
size155,763
(thscharler)

documentation

README

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.
Commit count: 111

cargo fmt