Trait i_slint_core::model::RepeatedComponent
source · [−]pub trait RepeatedComponent: Component + HasStaticVTable<ComponentVTable> + 'static {
type Data: 'static;
fn update(&self, index: usize, data: Self::Data);
fn listview_layout(
self: Pin<&Self>,
_offset_y: &mut Coord,
_viewport_width: Pin<&Property<Coord>>
) { ... }
fn box_layout_data(
self: Pin<&Self>,
_orientation: Orientation
) -> BoxLayoutCellData { ... }
}
Expand description
Component that can be instantiated by a repeater.
Required Associated Types
Required Methods
Provided Methods
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.
fn box_layout_data(
self: Pin<&Self>,
_orientation: Orientation
) -> BoxLayoutCellData
fn box_layout_data(
self: Pin<&Self>,
_orientation: Orientation
) -> BoxLayoutCellData
Returns what’s needed to perform the layout if this component is in a box layout