FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    ResourceProvider

    struct · ferroui-base · v0.5.0

    struct ResourceProvider
    

    Base implementation for resource providers.

    View source

    Members

    TYPE

    const TYPE: &'static $crate::TypeInfo
    

    The runtime type of this class.

    Source

    to_ref

    fn to_ref(self: &Self) -> $crate::Ref<ResourceProvider>
    

    Returns a strong reference to this object.

    Source

    has_resources

    fn has_resources(self: &Self) -> bool
    

    Whether the provider has resources.

    Source

    try_get_resource

    fn try_get_resource(self: &Self, key: &ResourceKey, theme: Option<&ThemeVariant>) -> Option<ResourceValue>
    

    Tries to find a resource within the provider.

    Source

    on_add_owner

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

    Handles when the owner is added. The base method notifies the owner about its resources changing, if the provider has any.

    Source

    on_remove_owner

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

    Handles when the owner is removed. The base method notifies the owner about its resources changing, if the provider has any.

    Source

    construct

    fn construct() -> Self
    

    Creates the class data of a provider without an owner.

    Source

    construct_with_owner

    fn construct_with_owner(owner: &ResourceHostRef) -> Self
    

    Creates the class data of a provider that belongs to owner.

    Source

    owner

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

    The owner of the resource provider.

    Source

    owner_changed

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

    Raised when the owner of the resource provider changes.

    Source

    raise_resources_changed

    fn raise_resources_changed(self: &Self)
    

    Notifies the owner, if any, that the resources of the provider have changed.

    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

    Trait implementations

    Availability

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