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.
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.
styles
fn styles(self: &Self) -> Ref<Styles>
The styles for the element.
styling_parent
fn styling_parent(self: &Self) -> Option<StyleHostRef>
The parent style host element.
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.
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.
Trait implementations
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.