Module cursive_core::view::scroll
source · 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 ascroll::Core
.scroll::Scroller
: a trait for something that embeds a such ascroll::Core
.
- Some free functions to help implement the usual
View
trait for a type implementingscroll::Scroller
. Some methods, likeView::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”.
- The functions defined here will usually take a reference to the
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
.