Trait zng::scroll::WidgetInfoExt

source ·
pub trait WidgetInfoExt {
    // Required methods
    fn is_scroll(&self) -> bool;
    fn scroll_info(&self) -> Option<ScrollInfo>;
    fn viewport(&self) -> Option<Rect<Px, Px>>;
}
Expand description

Scroll extensions for WidgetInfo.

Required Methods§

source

fn is_scroll(&self) -> bool

Returns true if the widget is a Scroll!.

source

fn scroll_info(&self) -> Option<ScrollInfo>

Returns a reference to the viewport bounds if the widget is a Scroll!.

source

fn viewport(&self) -> Option<Rect<Px, Px>>

Gets the viewport bounds relative to the scroll widget inner bounds.

The value is updated every layout and render, without requiring an info rebuild.

Implementors§