FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    Controls

    struct · ferroui-controls · v0.5.0

    struct Controls
    

    A collection of Controls.

    The value is a shared handle: clones refer to the same collection, and handles compare by identity.

    View source

    Members

    new

    fn new() -> Self
    

    Creates an empty collection.

    Source

    from_items

    fn from_items(items: impl IntoIterator<Item = Ref<Control>>) -> Self
    

    Creates a collection with the initial items.

    Source

    add

    fn add(self: &Self, item: impl IntoRef<Control>)
    

    Adds a control (of any class) to the collection.

    Source

    insert

    fn insert(self: &Self, index: usize, item: impl IntoRef<Control>)
    

    Inserts a control (of any class) at the specified index.

    Source

    remove

    fn remove(self: &Self, item: impl IntoRef<Control>) -> bool
    

    Removes a control (of any class) from the collection. Returns true if it was present.

    Source

    set

    fn set(self: &Self, index: usize, item: impl IntoRef<Control>)
    

    Replaces the control at index.

    Source

    Trait implementations

    Availability

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