FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    IResourceDictionary

    trait · ferroui-base · v0.5.0

    trait IResourceDictionary: IResourceProvider
    

    An indexed dictionary of resources.

    View source

    Members

    merged_dictionaries

    fn merged_dictionaries(self: &Self) -> FerroList<Rc<dyn IResourceProvider>>
    

    The collection of child resource dictionaries, shared with the dictionary: a change to the list is a change to the dictionary. The default, for a dictionary that keeps no such list, is a new list with the providers of merged_dictionaries_snapshot, which the dictionary does not see change.

    Source

    merged_dictionaries_snapshot

    fn merged_dictionaries_snapshot(self: &Self) -> Rc<Vec<Rc<dyn IResourceProvider>>>
    

    A snapshot of the collection of child resource dictionaries.

    Source

    theme_dictionaries_snapshot

    fn theme_dictionaries_snapshot(self: &Self) -> Vec<(ThemeVariant, Rc<dyn IThemeVariantProvider>)>
    

    A snapshot of the collection of resource providers used for specific theme variants.

    Source

    count

    fn count(self: &Self) -> usize
    

    The number of resources in the dictionary itself.

    Source

    add

    fn add(self: &Self, key: ResourceKey, value: ResourceValue)
    

    Adds a resource. Panics if the key is already present.

    Source

    set

    fn set(self: &Self, key: ResourceKey, value: ResourceValue)
    

    Adds or replaces a resource.

    Source

    contains_key

    fn contains_key(self: &Self, key: &ResourceKey) -> bool
    

    Whether the dictionary itself contains the key.

    Source

    remove

    fn remove(self: &Self, key: &ResourceKey) -> bool
    

    Removes a resource. Returns whether it was present.

    Source

    try_get_value

    fn try_get_value(self: &Self, key: &ResourceKey) -> Option<ResourceValue>
    

    Gets a resource of the dictionary itself.

    Source

    clear

    fn clear(self: &Self)
    

    Removes all resources of the dictionary itself.

    Source

    Availability

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