FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    FerroPropertyRegistry

    struct · ferroui-base · v0.5.0

    struct FerroPropertyRegistry
    

    Tracks registered property definitions.

    View source

    Members

    instance

    fn instance() -> &'static FerroPropertyRegistry
    

    The property registry of the current thread.

    Source

    unregister_by_module

    fn unregister_by_module(self: &Self, types: impl IntoIterator<Item = &'static TypeInfo>) -> bool
    

    Unregisters the properties of the given types: removes the metadata every registered, attached and direct property holds for each type, and the property lists cached for it.

    Returns whether the types were unregistered. (The managed original returns false when unregistering throws; nothing fails here.)

    Source

    get_registered

    fn get_registered(self: &Self, type_: &'static TypeInfo) -> std::rc::Rc<Vec<&'static crate::FerroProperty>>
    

    Gets all non-attached properties registered on a type (and its bases).

    Source

    get_registered_attached

    fn get_registered_attached(self: &Self, type_: &'static TypeInfo) -> std::rc::Rc<Vec<&'static crate::FerroProperty>>
    

    Gets all attached properties registered on a type (and its bases).

    Source

    get_registered_direct

    fn get_registered_direct(self: &Self, type_: &'static TypeInfo) -> std::rc::Rc<Vec<&'static crate::FerroProperty>>
    

    Gets all direct properties registered on a type (and its bases).

    Source

    get_registered_inherited

    fn get_registered_inherited(self: &Self, type_: &'static TypeInfo) -> std::rc::Rc<Vec<&'static crate::FerroProperty>>
    

    Gets all inherited properties registered on a type: registered and attached properties whose values are inherited.

    Source

    get_declared

    fn get_declared(self: &Self, type_: &'static TypeInfo) -> Vec<&'static FerroProperty>
    

    Gets the properties a type itself declares (registered with the type as owner: styled, direct, attached and added-owner properties), in declaration order, without those of its base types.

    Source

    get_registered_for

    fn get_registered_for(self: &Self, o: &FerroObject) -> std::rc::Rc<Vec<&'static crate::FerroProperty>>
    

    Gets all properties registered on an object's type.

    Source

    get_registered_direct_for

    fn get_registered_direct_for<T: PropertyValue>(self: &Self, o: &FerroObject, property: &'static DirectPropertyBase<T>) -> &'static DirectPropertyBase<T>
    

    Finds the direct property registered on the type of o that shares the identity of property.

    Panics if the property is not registered on the object's type.

    Source

    find_registered_direct

    fn find_registered_direct<T: PropertyValue>(self: &Self, o: &FerroObject, property: &'static DirectPropertyBase<T>) -> Option<&'static DirectPropertyBase<T>>
    

    Finds the direct property registered on the type of o that shares the identity of property.

    Source

    find_registered

    fn find_registered(self: &Self, type_: &'static TypeInfo, name: &str) -> Option<&'static FerroProperty>
    

    Finds a registered property on a type by name.

    Panics if name contains a .: attached properties are not looked up through this method.

    Source

    find_registered_for

    fn find_registered_for(self: &Self, o: &FerroObject, name: &str) -> Option<&'static FerroProperty>
    

    Finds a registered property on an object's type by name.

    Source

    find_registered_by_id

    fn find_registered_by_id(self: &Self, id: u32) -> Option<&'static FerroProperty>
    

    Finds a registered property by its ID.

    Source

    is_registered

    fn is_registered(self: &Self, type_: &'static TypeInfo, property: &FerroProperty) -> bool
    

    Checks whether a property is registered on a type (or its bases).

    Source

    is_registered_for

    fn is_registered_for(self: &Self, o: &FerroObject, property: &FerroProperty) -> bool
    

    Checks whether a property is registered on an object's type.

    Source

    register

    fn register<P: Registrable>(self: &Self, type_: &'static TypeInfo, property: &'static P)
    

    Registers a property on a type.

    You won't usually want to call this method directly; use the FerroProperty::register* functions instead.

    Source

    register_attached

    fn register_attached<P: Registrable>(self: &Self, type_: &'static TypeInfo, property: &'static P)
    

    Registers an attached property on a host type.

    Source

    Trait implementations

    • Send
    • Sync
    • Freeze
    • UnsafeUnpin
    • Unpin
    • UnwindSafe
    • RefUnwindSafe
    • ClassDefaults
    • Borrow<T>
    • BorrowMut<T>
    • Into<U>
    • From<T>
    • TryInto<U>
    • TryFrom<U>
    • Any
    • ErasedDestructor
    • IntoEither
    • Default

    Availability

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