FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    InlineCollection

    struct · ferroui-controls · v0.5.0

    struct InlineCollection
    

    A collection of Inlines.

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

    View source

    Members

    new

    fn new() -> Self
    

    Initializes a new instance of the InlineCollection class.

    Source

    text

    fn text(self: &Self) -> Option<String>
    

    Gets the text contained in this collection: the text of every inline, or None when the collection is empty.

    Source

    add

    fn add(self: &Self, inline: impl IntoRef<Inline>)
    

    Adds an inline (of any class) to the collection.

    The text of a hosting text block becomes the first run of the collection.

    Source

    add_text

    fn add_text(self: &Self, text: &str)
    

    Adds a text inline to this collection.

    Source

    add_control

    fn add_control(self: &Self, control: impl IntoRef<Control>)
    

    Adds a control wrapped inside an InlineUIContainer to this collection.

    Source

    invalidated

    fn invalidated(self: &Self, handler: impl Fn() -> () + 'static) -> Subscription
    

    Raised when an inline in the collection changes.

    Dropping the returned guard removes the handler; Subscription::detach keeps it for the life of the collection.

    Source

    Trait implementations

    Availability

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