FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    IStyleHost

    trait · ferroui-base · v0.5.0

    trait IStyleHost: IResourceHost
    

    Defines an element that has a Styles collection.

    Implemented by StyledElement and by the application object, which holds the global styles and is the root of the styling-parent chain. Every style host is also a resource host.

    View source

    Members

    is_styles_initialized

    fn is_styles_initialized(self: &Self) -> bool
    

    Whether the styles collection has been created.

    The styles collection is created lazily; this lets a style lookup skip hosts without styles without creating the collection.

    Source

    styles

    fn styles(self: &Self) -> Ref<Styles>
    

    The styles for the element.

    Source

    styling_parent

    fn styling_parent(self: &Self) -> Option<StyleHostRef>
    

    The parent style host element.

    Source

    styles_added

    fn styles_added(self: &Self, styles: &[Rc<dyn IStyle>])
    

    Called when styles are added to the styles collection of the host or a nested styles collection.

    Source

    styles_removed

    fn styles_removed(self: &Self, styles: &[Rc<dyn IStyle>])
    

    Called when styles are removed from the styles collection of the host or a nested styles collection.

    Source

    Trait implementations

    Availability

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