FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    IResourceProvider

    trait · ferroui-base · v0.5.0

    trait IResourceProvider: IResourceNode
    

    Represents an object that can be queried for resources but does not appear in the logical tree.

    The interface represented by this trait is implemented by resource dictionaries, styles and the like.

    View source

    Members

    as_resource_dictionary

    fn as_resource_dictionary(self: &Self) -> Option<&dyn IResourceDictionary>
    

    Views this provider through its dictionary contract when it implements one. Plain providers return None; dictionaries return their actual interface.

    Source

    as_any

    fn as_any(self: &Self) -> Option<&dyn Any>
    

    The provider as Any, for a downcast to its concrete type (the type test of the managed original). None from a provider that does not offer it; the providers of the framework return themselves.

    Source

    owner

    fn owner(self: &Self) -> Option<ResourceHostRef>
    

    The owner of the resource provider.

    If the resource provider is, or is a child of, a resource dictionary or style that is hosted by an element, this is that element.

    Source

    owner_changed

    fn owner_changed(self: &Self, handler: Rc<dyn Fn() -> ()>) -> Rc<dyn IDisposable>
    

    Raised when the owner of the resource provider changes.

    Source

    add_owner

    fn add_owner(self: &Self, owner: &ResourceHostRef)
    

    Adds an owner to the resource provider.

    Source

    remove_owner

    fn remove_owner(self: &Self, owner: &ResourceHostRef)
    

    Removes a resource provider owner.

    Source

    development_source

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

    Canonical source of a development markup include, without loading it.

    Source

    as_object

    fn as_object(self: &Self) -> Option<&FerroObject>
    

    The provider as an object, when it is a class instance. Used for identity comparison and type tests.

    Source

    Availability

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