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]
impl<C: RepeatedComponent + 'static> Repeater<C>
[src]pub fn ensure_updated(
self: Pin<&Self>,
init: impl Fn() -> VRc<ComponentVTable, C>
)
[src]
self: Pin<&Self>,
init: impl Fn() -> VRc<ComponentVTable, C>
)
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]
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>>
)
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]
impl<C: RepeatedComponent> Repeater<C>
[src]pub fn set_model_binding(
&self,
binding: impl Fn() -> ModelHandle<C::Data> + 'static
)
[src]
&self,
binding: impl Fn() -> ModelHandle<C::Data> + 'static
)
Set the model binding
pub fn visit(
&self,
order: TraversalOrder,
visitor: ItemVisitorRefMut<'_>
) -> VisitChildrenResult
[src]
&self,
order: TraversalOrder,
visitor: ItemVisitorRefMut<'_>
) -> VisitChildrenResult
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]
&self,
viewport_width: Pin<&Property<f32>>,
listview_width: f32
)
Same as compule_layout, but only for the ListView
Trait Implementations
Auto Trait Implementations
impl<C> !RefUnwindSafe for Repeater<C>
impl<C> !RefUnwindSafe for Repeater<C>
impl<C> !UnwindSafe for Repeater<C>
impl<C> !UnwindSafe for Repeater<C>