Struct sixtyfps_corelib::model::Repeater[][src]

pub struct Repeater<C: RepeatedComponent> { /* fields omitted */ }

This field is put in a component when using the for syntax It helps instantiating the components C

Implementations

impl<C: RepeatedComponent + 'static> Repeater<C>[src]

pub fn ensure_updated(
    self: Pin<&Self>,
    init: impl Fn() -> VRc<ComponentVTable, C>
)
[src]

Call this function to make sure that the model is updated. The init function is the function to create a component

pub fn ensure_updated_listview(
    self: Pin<&Self>,
    init: impl Fn() -> VRc<ComponentVTable, C>,
    viewport_width: Pin<&Property<f32>>,
    viewport_height: Pin<&Property<f32>>,
    viewport_y: Pin<&Property<f32>>,
    listview_width: f32,
    listview_height: Pin<&Property<f32>>
)
[src]

Same as Self::ensuer_updated but for a ListView

pub fn model_set_row_data(self: Pin<&Self>, row: usize, data: C::Data)[src]

Sets the data directly in the model

impl<C: RepeatedComponent> Repeater<C>[src]

pub fn set_model_binding(
    &self,
    binding: impl Fn() -> ModelHandle<C::Data> + 'static
)
[src]

Set the model binding

pub fn visit(
    &self,
    order: TraversalOrder,
    visitor: ItemVisitorRefMut<'_>
) -> VisitChildrenResult
[src]

Call the visitor for each component

pub fn len(&self) -> usize[src]

Return the amount of item currently in the component

pub fn components_vec(&self) -> Vec<VRc<ComponentVTable, C>>[src]

Returns a vector containing all components

pub fn compute_layout(&self)[src]

Recompute the layout of each child elements

pub fn compute_layout_listview(
    &self,
    viewport_width: Pin<&Property<f32>>,
    listview_width: f32
)
[src]

Same as compule_layout, but only for the ListView

Trait Implementations

impl<C: RepeatedComponent> Default for Repeater<C>[src]

Auto Trait Implementations

impl<C> !RefUnwindSafe for Repeater<C>

impl<C> !Send for Repeater<C>

impl<C> !Sync for Repeater<C>

impl<C> !Unpin for Repeater<C>

impl<C> !UnwindSafe for Repeater<C>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.