Trait zng_wgt_scroll::WidgetInfoExt

source ·
pub trait WidgetInfoExt {
    // Required methods
    fn is_scroll(&self) -> bool;
    fn scroll_info(&self) -> Option<ScrollInfo>;
    fn viewport(&self) -> Option<PxRect>;
}
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<PxRect>

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

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

Implementations on Foreign Types§

source§

impl WidgetInfoExt for WidgetInfo

Implementors§