Expand description

Core mechanisms to implement scrolling.

This module is still unstable and may go through breaking changes.

This modules defines:

  • scroll::Core: stores the state variables required to handle scrolling. Any view that needs to implement scrolling should embed a scroll::Core.
  • Some free functions to help implement the usual View trait for a type implementing scroll::Scroller. Some methods, like View::call_on_any, are not affected by scrolling and are not covered here.
    • The functions defined here will usually take a reference to the Scroller object, as well as closures to implement the “inner view”.

ScrollView may be an easier way to add scrolling to an existing view.

Structs

Core system for scrolling views.

Enums

Defines the scrolling behaviour on content or size change

Traits

Describes an item with a scroll core.

Functions

Performs View::draw on a scroll::Scroller.

Draws a box-style frame around a scrollable content.

Draws a frame around the scrollable content.

Performs a line-based View::draw on a scroll::Scroller.

Performs View::important_area on a scroll::Scroller.

Performs View::layout on a scroll::Scroller.

Performs View::on_event on a scroll::Scroller.

Performs View::required_size on a scroll::Scroller.