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.
Members
as_resource_dictionaryas_anyownerowner_changedadd_ownerremove_ownerdevelopment_sourceas_object
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.
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.
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.
owner_changed
fn owner_changed(self: &Self, handler: Rc<dyn Fn() -> ()>) -> Rc<dyn IDisposable>
Raised when the owner of the resource provider changes.
add_owner
fn add_owner(self: &Self, owner: &ResourceHostRef)
Adds an owner to the resource provider.
remove_owner
fn remove_owner(self: &Self, owner: &ResourceHostRef)
Removes a resource provider owner.
development_source
fn development_source(self: &Self) -> Option<String>
Canonical source of a development markup include, without loading it.
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.
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.