Trait i_slint_core::model::RepeatedItemTree

source ·
pub trait RepeatedItemTree:
    ItemTree
    + HasStaticVTable<ItemTreeVTable>
    + 'static {
    type Data: 'static;

    // Required method
    fn update(&self, index: usize, data: Self::Data);

    // Provided methods
    fn init(&self) { ... }
    fn listview_layout(
        self: Pin<&Self>,
        _offset_y: &mut LogicalLength,
        _viewport_width: Pin<&Property<LogicalLength>>,
    ) { ... }
    fn box_layout_data(
        self: Pin<&Self>,
        _orientation: Orientation,
    ) -> BoxLayoutCellData { ... }
}
Expand description

ItemTree that can be instantiated by a repeater.

Required Associated Types§

source

type Data: 'static

The data corresponding to the model

Required Methods§

source

fn update(&self, index: usize, data: Self::Data)

Update this ItemTree at the given index and the given data

Provided Methods§

source

fn init(&self)

Called once after the ItemTree has been instantiated and update() was called once.

source

fn listview_layout( self: Pin<&Self>, _offset_y: &mut LogicalLength, _viewport_width: Pin<&Property<LogicalLength>>, )

Layout this item in the listview

offset_y is the y position where this item should be placed. it should be updated to be to the y position of the next item.

source

fn box_layout_data( self: Pin<&Self>, _orientation: Orientation, ) -> BoxLayoutCellData

Returns what’s needed to perform the layout if this ItemTrees is in a box layout

Object Safety§

This trait is not object safe.

Implementors§