Function termimad::compute_scrollbar[][src]

pub fn compute_scrollbar<U1, U2, U3>(
    scroll: U1,
    content_height: U1,
    available_height: U3,
    top: U2
) -> Option<(U2, U2)> where
    U1: Into<usize>,
    U2: Into<usize> + TryFrom<usize>,
    <U2 as TryFrom<usize>>::Error: Debug,
    U3: Into<usize> + TryFrom<usize>,
    <U3 as TryFrom<usize>>::Error: Debug
Expand description

Compute the min and max y (from the top of the terminal, both inclusive) for the thumb part of the scrollbar which would represent the scrolled content in the available height.

If you represent some data in an Area, you should directly use the scrollbar method of Area.