[−][src]Module cursive::view::scroll
Core mechanisms to implement scrolling.
This module is still unstable and may go through breaking changes.
In addition, it is private unless you enable the unstable_scroll
feature.
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 | Core system for scrolling views. |
Enums
ScrollStrategy | Defines the scrolling behaviour on content or size change |
Traits
Scroller | Describes an item with a scroll core. |
Functions
draw | Performs |
draw_box_frame | Draws a box-style frame around a scrollable content. |
draw_frame | Draws a frame around the scrollable content. |
draw_lines | Performs a line-based |
important_area | Performs |
layout | Performs |
on_event | Performs |
required_size | Performs |