FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    VirtualizingPanel

    struct · ferroui-controls · v0.5.0

    struct VirtualizingPanel
    

    Base class for panels that can be used to virtualize items for an ItemsControl.

    Panels should implement the abstract members of this class to provide virtualization of items in an ItemsControl. Derived panels can manage scrolling by implementing the logical scrollable contract or by listening to the effective viewport changed event.

    The methods on the ItemContainerGenerator should be used to create, prepare and clear containers for items.

    This class is abstract: its abstract members panic unless overridden.

    View source

    Members

    TYPE

    const TYPE: &'static $crate::TypeInfo
    

    The runtime type of this class.

    Source

    to_ref

    fn to_ref(self: &Self) -> $crate::Ref<VirtualizingPanel>
    

    Returns a strong reference to this object.

    Source

    scroll_into_view

    fn scroll_into_view(self: &Self, index: i32) -> Option<Ref<Control>>
    

    Scrolls the specified item into view.

    Returns the element with the specified index, or None if the element could not be brought into view.

    Source

    container_from_index

    fn container_from_index(self: &Self, index: i32) -> Option<Ref<Control>>
    

    Returns the container for the item at the specified index.

    Returns the container for the item at the specified index within the item collection, if the item is realized; otherwise, None.

    Note for implementors: if the item at the specified index is an item-is-self-container item that has previously been realized, then the item should be returned even if it currently falls outside the realized viewport.

    Source

    index_from_container

    fn index_from_container(self: &Self, container: &Ref<Control>) -> i32
    

    Returns the index to the item that has the specified realized container.

    Returns the index to the item that corresponds to the specified realized container, or -1 if container is not found.

    Source

    get_realized_containers

    fn get_realized_containers(self: &Self) -> Option<Vec<Ref<Control>>>
    

    Gets the currently realized containers.

    Source

    get_control_in_direction

    fn get_control_in_direction(self: &Self, direction: NavigationDirection, from: Option<&Ref<InputElement>>, wrap: bool) -> Option<Ref<InputElement>>
    

    Gets the next control in the specified direction.

    from is the control from which movement begins and wrap tells whether to wrap around when the first or last item is reached.

    Source

    on_items_control_changed

    fn on_items_control_changed(self: &Self, old_value: Option<&Ref<ItemsControl>>)
    

    Called when the ItemsControl that owns the panel changes.

    Source

    on_items_changed

    fn on_items_changed(self: &Self, items: &Rc<ItemsSourceView>, e: &ItemsChangedEventArgs<'_>)
    

    Called when the items collection of the owner ItemsControl changes.

    This method is called a collection changed event is raised by the items, or when the items property of the items control is set to a new collection, in which case the action will be a reset.

    Source

    construct

    fn construct() -> Self
    

    Creates the class data; see ferroui_base::FerroObject::construct.

    Source

    item_container_generator

    fn item_container_generator(self: &Self) -> Option<Rc<ItemContainerGenerator>>
    

    Gets the ItemContainerGenerator for this VirtualizingPanel.

    Source

    items

    fn items(self: &Self) -> Rc<ItemsSourceView>
    

    Gets the items to display.

    Source

    items_control

    fn items_control(self: &Self) -> Option<Ref<ItemsControl>>
    

    Gets the ItemsControl that the panel is displaying items for.

    Source

    add_internal_child

    fn add_internal_child(self: &Self, control: &Ref<Control>)
    

    Adds the specified Control to the children collection of a VirtualizingPanel element.

    Source

    insert_internal_child

    fn insert_internal_child(self: &Self, index: usize, control: &Ref<Control>)
    

    Adds the specified Control to the children collection of a VirtualizingPanel element at the specified index position.

    Source

    remove_internal_child

    fn remove_internal_child(self: &Self, child: &Ref<Control>)
    

    Removes a child element from the children collection.

    Source

    remove_internal_child_range

    fn remove_internal_child_range(self: &Self, index: usize, count: usize)
    

    Removes child elements from the children collection.

    Source

    Trait implementations

    Availability

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