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§
Sourcefn 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
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.