Skip to main content

UniformListDecoration

Trait UniformListDecoration 

Source
pub trait UniformListDecoration {
    // Required method
    fn compute(
        &self,
        visible_range: Range<usize>,
        bounds: Bounds<Pixels>,
        scroll_offset: Point<Pixels>,
        item_height: Pixels,
        item_count: usize,
        window: &mut Window,
        cx: &mut App,
    ) -> AnyElement;
}
Expand description

A decoration for a UniformList. This can be used for various things, such as rendering indent guides, or other visual effects.

Required Methods§

Source

fn compute( &self, visible_range: Range<usize>, bounds: Bounds<Pixels>, scroll_offset: Point<Pixels>, item_height: Pixels, item_count: usize, window: &mut Window, cx: &mut App, ) -> AnyElement

Compute the decoration element, given the visible range of list items, the bounds of the list, and the height of each item.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§