Skip to main content

DevScrollAreaExt

Trait DevScrollAreaExt 

Source
pub trait DevScrollAreaExt {
    // Required methods
    fn dev_show<R>(
        self,
        ui: &mut Ui,
        id: impl Into<String>,
        add_contents: impl FnOnce(&mut Ui) -> R,
    ) -> ScrollAreaOutput<R>;
    fn dev_show_viewport<R>(
        self,
        ui: &mut Ui,
        id: impl Into<String>,
        add_contents: impl FnOnce(&mut Ui, Rect) -> R,
    ) -> ScrollAreaOutput<R>;
}
Expand description

Helper extensions for recording scroll areas with explicit ids.

Required Methods§

Source

fn dev_show<R>( self, ui: &mut Ui, id: impl Into<String>, add_contents: impl FnOnce(&mut Ui) -> R, ) -> ScrollAreaOutput<R>

Show a scroll area and record it with DevMCP metadata.

Source

fn dev_show_viewport<R>( self, ui: &mut Ui, id: impl Into<String>, add_contents: impl FnOnce(&mut Ui, Rect) -> R, ) -> ScrollAreaOutput<R>

Show a scroll area with viewport access and record it with DevMCP metadata.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl DevScrollAreaExt for ScrollArea

Source§

fn dev_show<R>( self, ui: &mut Ui, id: impl Into<String>, add_contents: impl FnOnce(&mut Ui) -> R, ) -> ScrollAreaOutput<R>

Source§

fn dev_show_viewport<R>( self, ui: &mut Ui, id: impl Into<String>, add_contents: impl FnOnce(&mut Ui, Rect) -> R, ) -> ScrollAreaOutput<R>

Implementors§