FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    ItemsControlImpl

    trait · ferroui-controls · v0.5.0

    trait ItemsControlImpl: TemplatedControlImpl + $crate::Upcast<ItemsControl>
    

    The overridable members introduced by the class.

    View source

    Members

    create_container_for_item_override

    fn create_container_for_item_override(this: &Self, item: &Option<BoxedValue>, index: i32, recycle_key: Option<RecycleKey>) -> Ref<Control>
    

    Creates or a container that can be used to display an item.

    Source

    prepare_container_for_item_override

    fn prepare_container_for_item_override(this: &Self, container: &Ref<Control>, item: &Option<BoxedValue>, index: i32)
    

    Prepares the specified element to display the specified item.

    Source

    container_for_item_prepared_override

    fn container_for_item_prepared_override(this: &Self, container: &Ref<Control>, item: &Option<BoxedValue>, index: i32)
    

    Called when a container has been fully prepared to display an item.

    This method will be called when a container has been fully prepared and added to the logical and visual trees, but may be called before a layout pass has completed. It is called immediately before the container_prepared event is raised.

    Source

    container_index_changed_override

    fn container_index_changed_override(this: &Self, container: &Ref<Control>, old_index: i32, new_index: i32)
    

    Called when the index for a container changes due to an insertion or removal in the items collection.

    Source

    clear_container_for_item_override

    fn clear_container_for_item_override(this: &Self, container: &Ref<Control>)
    

    Undoes the effects of the prepare_container_for_item_override method.

    Source

    needs_container_override

    fn needs_container_override(this: &Self, item: &Option<BoxedValue>, index: i32) -> (bool, Option<RecycleKey>)
    

    Determines whether the specified item can be its own container.

    Returns true if the item needs a container; otherwise false if the item can itself be used as a container. The second value is a key that can be used to locate a previously recycled container of the correct type, or None if the item cannot be recycled. If the item is its own container then by definition it cannot be recycled, so the key should be None.

    Source

    on_items_view_collection_changed

    fn on_items_view_collection_changed(this: &Self, e: &ItemsChangedEventArgs<'_>)
    

    Called when the collection changed event is raised on the items view.

    Source

    Trait implementations

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.