FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    StyledProperty

    struct · ferroui-base · v0.5.0

    struct StyledProperty<T: PropertyValue>
    

    A styled property: a property whose value is held by the property store and can come from local values, styles, templates, animations, bindings and inheritance, resolved by priority.

    View source

    Members

    as_property

    fn as_property(self: &'static Self) -> &'static FerroProperty
    

    The untyped base of the property.

    Source

    validate_value

    fn validate_value(self: &Self) -> Option<&dyn Fn(&T) -> bool>
    

    The value validation callback for the property.

    Source

    add_owner

    fn add_owner<TOwner: ObjectType>(self: &'static Self) -> &'static Self
    

    Registers the property on another class.

    Source

    add_owner_with

    fn add_owner_with<TOwner: ObjectType>(self: &'static Self, metadata: StyledPropertyMetadata<T>) -> &'static Self
    

    Registers the property on another class, with metadata for that class.

    Source

    coerce_value

    fn coerce_value(self: &Self, instance: &FerroObject, base_value: T) -> T
    

    Coerces base_value with the coercion callback registered for the type of instance, if any.

    Source

    get_default_value

    fn get_default_value(self: &Self, type_: &'static TypeInfo) -> T
    

    Gets the default value for the property on the specified type.

    Source

    get_default_value_for

    fn get_default_value_for(self: &Self, owner: &FerroObject) -> T
    

    Gets the default value for the property on the type of owner.

    Source

    get_metadata

    fn get_metadata(self: &Self, type_: &'static TypeInfo) -> Rc<StyledPropertyMetadata<T>>
    

    Gets the property metadata for the specified type.

    Source

    get_metadata_for

    fn get_metadata_for(self: &Self, owner: &FerroObject) -> Rc<StyledPropertyMetadata<T>>
    

    Gets the property metadata for the type of owner.

    Source

    override_default_value

    fn override_default_value<TOwner: ObjectType>(self: &Self, default_value: T)
    

    Overrides the default value for the property on class TOwner.

    Source

    override_default_value_for

    fn override_default_value_for(self: &Self, type_: &'static TypeInfo, default_value: T)
    

    Overrides the default value for the property on the specified type.

    Source

    override_metadata

    fn override_metadata<TOwner: ObjectType>(self: &Self, metadata: StyledPropertyMetadata<T>)
    

    Overrides the metadata for the property on class TOwner.

    Source

    override_metadata_for

    fn override_metadata_for(self: &Self, type_: &'static TypeInfo, metadata: StyledPropertyMetadata<T>)
    

    Overrides the metadata for the property on the specified type.

    Source

    unregister

    fn unregister(self: &Self, type_: &'static TypeInfo)
    

    Removes the metadata registered for the specified type.

    Source

    Trait implementations

    Availability

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