FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    CompositionAnimation

    struct · ferroui-base · v0.5.0

    struct CompositionAnimation
    

    This is the base class for ExpressionAnimation and KeyFrameAnimation.

    Use the start_animation method of a composition object to start the animation. Value parameters (as opposed to reference parameters which are set using set_reference_parameter) are copied and "embedded" into an expression at the time start_animation is called. Changing the value of the variable after start_animation is called will not affect the value of the ExpressionAnimation. See the remarks of ExpressionAnimation for additional information.

    A class derives from it by embedding it (base) and dereferencing to it; the class implements ICompositionAnimation, whose Rc<dyn ..> is the handle of an animation of any class.

    View source

    Members

    object

    fn object(self: &Self) -> &CompositionObject
    

    The embedded CompositionObject.

    Source

    compositor

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

    The associated compositor.

    Source

    clear_all_parameters

    fn clear_all_parameters(self: &Self)
    

    Clears all of the parameters of the animation.

    Source

    clear_parameter

    fn clear_parameter(self: &Self, key: &str)
    

    Clears a parameter from the animation.

    Source

    set_boolean_parameter

    fn set_boolean_parameter(self: &Self, key: &str, value: bool)
    

    Sets a boolean value parameter for use with an expression animation or an expression key frame.

    Source

    set_color_parameter

    fn set_color_parameter(self: &Self, key: &str, value: Color)
    

    Source

    set_expression_reference_parameter

    fn set_expression_reference_parameter(self: &Self, key: &str, animation_object: Rc<dyn AsCompositionObject>)
    

    Sets an object as a reference parameter of an expression: the expression reads its properties (key.Offset) every time it is evaluated, as with set_reference_parameter.

    Source

    set_matrix3x2_parameter

    fn set_matrix3x2_parameter(self: &Self, key: &str, value: Matrix3x2)
    

    Source

    set_matrix4x4_parameter

    fn set_matrix4x4_parameter(self: &Self, key: &str, value: Matrix4x4)
    

    Source

    set_quaternion_parameter

    fn set_quaternion_parameter(self: &Self, key: &str, value: Quaternion)
    

    Source

    set_reference_parameter

    fn set_reference_parameter(self: &Self, key: &str, composition_object: Rc<dyn AsCompositionObject>)
    

    Source

    set_scalar_parameter

    fn set_scalar_parameter(self: &Self, key: &str, value: f32)
    

    Source

    set_vector2_parameter

    fn set_vector2_parameter(self: &Self, key: &str, value: Vector2)
    

    Source

    set_vector3_parameter

    fn set_vector3_parameter(self: &Self, key: &str, value: Vector3)
    

    Source

    set_vector4_parameter

    fn set_vector4_parameter(self: &Self, key: &str, value: Vector4)
    

    Source

    target

    fn target(self: &Self) -> Option<String>
    

    The name of the property the animation targets.

    Source

    set_target

    fn set_target(self: &Self, value: Option<String>)
    

    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

    Availability

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