[][src]Module cursive_core::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 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

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 View::draw on a scroll::Scroller.

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 View::draw on a scroll::Scroller.

important_area

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

layout

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

on_event

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

required_size

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