FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    IScrollable

    trait · ferroui-base · v0.5.0

    trait IScrollable
    

    Interface implemented by scrollable controls.

    Upstream this contract lives with the control primitives; it is defined here because directional navigation is its only consumer in the base library so far. An input element exposes it through the as_scrollable virtual member of InputElement.

    View source

    Members

    extent

    fn extent(self: &Self) -> Size
    

    The extent of the scrollable content, in logical units.

    Source

    offset

    fn offset(self: &Self) -> Vector
    

    The current scroll offset, in logical units.

    Source

    set_offset

    fn set_offset(self: &Self, value: Vector)
    

    Sets the current scroll offset, in logical units.

    Source

    viewport

    fn viewport(self: &Self) -> Size
    

    The size of the viewport, in logical units.

    Source

    can_horizontally_scroll

    fn can_horizontally_scroll(self: &Self) -> bool
    

    Whether the content can be scrolled horizontally.

    Source

    can_vertically_scroll

    fn can_vertically_scroll(self: &Self) -> bool
    

    Whether the content can be scrolled vertically.

    Source

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.