FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    CompositionPropertySet

    struct · ferroui-base · v0.5.0

    struct CompositionPropertySet
    

    Property sets are composition objects that allow storage of key values pairs that can be shared across the application and are not tied to the lifetime of another composition object. Property sets are most commonly used with animations, where they maintain key-value pairs that are referenced to drive portions of composition animations. Property sets provide the ability to insert key-value pairs or retrieve a value for a given key. A property set does not support a delete function – ensure you use property sets to store values that will be shared across the application.

    A property set made with new (or Compositor::create_property_set) is live, as in WinUI: it has a server counterpart that receives its entries with each batch, its entries can be animated with start_animation, and an expression that refers to it reads its current values. Upstream's property sets live on the UI thread only, and an expression sees a copy of them taken when its animation starts; the parameters of an animation are such a set (see docs/porting/winui-composition.md).

    View source

    Members

    new

    fn new(compositor: &Rc<Compositor>) -> Rc<CompositionPropertySet>
    

    Creates a live property set (Compositor.CreatePropertySet).

    Source

    is_live

    fn is_live(self: &Self) -> bool
    

    Whether the set is live (has a server counterpart).

    Source

    compositor

    fn compositor(self: &Self) -> &Rc<Compositor>
    

    Source

    insert_color

    fn insert_color(self: &Self, property_name: &str, value: Color)
    

    Source

    insert_matrix3x2

    fn insert_matrix3x2(self: &Self, property_name: &str, value: Matrix3x2)
    

    Source

    insert_matrix4x4

    fn insert_matrix4x4(self: &Self, property_name: &str, value: Matrix4x4)
    

    Source

    insert_quaternion

    fn insert_quaternion(self: &Self, property_name: &str, value: Quaternion)
    

    Source

    insert_scalar

    fn insert_scalar(self: &Self, property_name: &str, value: f32)
    

    Source

    insert_vector2

    fn insert_vector2(self: &Self, property_name: &str, value: Vector2)
    

    Source

    insert_vector3

    fn insert_vector3(self: &Self, property_name: &str, value: Vector3)
    

    Source

    insert_vector4

    fn insert_vector4(self: &Self, property_name: &str, value: Vector4)
    

    Source

    try_get_color

    fn try_get_color(self: &Self, property_name: &str) -> (CompositionGetValueStatus, Color)
    

    Source

    try_get_matrix3x2

    fn try_get_matrix3x2(self: &Self, property_name: &str) -> (CompositionGetValueStatus, Matrix3x2)
    

    Source

    try_get_matrix4x4

    fn try_get_matrix4x4(self: &Self, property_name: &str) -> (CompositionGetValueStatus, Matrix4x4)
    

    Source

    try_get_quaternion

    fn try_get_quaternion(self: &Self, property_name: &str) -> (CompositionGetValueStatus, Quaternion)
    

    Source

    try_get_scalar

    fn try_get_scalar(self: &Self, property_name: &str) -> (CompositionGetValueStatus, f32)
    

    Source

    try_get_vector2

    fn try_get_vector2(self: &Self, property_name: &str) -> (CompositionGetValueStatus, Vector2)
    

    Source

    try_get_vector3

    fn try_get_vector3(self: &Self, property_name: &str) -> (CompositionGetValueStatus, Vector3)
    

    Source

    try_get_vector4

    fn try_get_vector4(self: &Self, property_name: &str) -> (CompositionGetValueStatus, Vector4)
    

    Source

    insert_boolean

    fn insert_boolean(self: &Self, property_name: &str, value: bool)
    

    Source

    try_get_boolean

    fn try_get_boolean(self: &Self, property_name: &str) -> (CompositionGetValueStatus, bool)
    

    Source

    Trait implementations

    Availability

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