pub trait ICompositionObjectAnimations {
// Required methods
fn try_start_animation(
&self,
property_name: &str,
animation: &dyn ICompositionAnimation,
final_value: Option<ExpressionVariant>,
) -> bool;
fn get_composition_property(
&self,
property_name: &str,
) -> Option<&'static CompositionProperty>;
fn composition_object(&self) -> &CompositionObject;
// Provided methods
fn start_animation(
&self,
property_name: &str,
animation: &dyn ICompositionAnimation,
) { ... }
fn start_animation_with_final_value(
&self,
property_name: &str,
animation: &dyn ICompositionAnimation,
final_value: Option<ExpressionVariant>,
) { ... }
fn start_animation_with_controller(
&self,
property_name: &str,
animation: &dyn ICompositionAnimation,
controller: &Rc<AnimationController>,
) { ... }
fn try_get_animation_controller(
&self,
property_name: &str,
) -> Option<Rc<AnimationController>> { ... }
fn stop_animation(&self, property_name: &str) { ... }
fn start_animation_group(&self, grp: &dyn ICompositionAnimationBase) { ... }
fn start_animation_group_part(
&self,
animation: &dyn ICompositionAnimation,
target: &str,
final_value: ExpressionVariant,
) -> bool { ... }
fn start_animation_group_for(
&self,
grp: &dyn ICompositionAnimationBase,
target: &str,
final_value: ExpressionVariant,
) -> bool { ... }
fn stop_animation_group(&self, grp: &dyn ICompositionAnimationBase) { ... }
}Expand description
The animation members of CompositionObject, written against the class
that embeds one.
Required Methods§
Sourcefn try_start_animation(
&self,
property_name: &str,
animation: &dyn ICompositionAnimation,
final_value: Option<ExpressionVariant>,
) -> bool
fn try_start_animation( &self, property_name: &str, animation: &dyn ICompositionAnimation, final_value: Option<ExpressionVariant>, ) -> bool
StartAnimation(propertyName, animation, finalValue) of the class:
returns false for a property the class does not know.
Sourcefn get_composition_property(
&self,
property_name: &str,
) -> Option<&'static CompositionProperty>
fn get_composition_property( &self, property_name: &str, ) -> Option<&'static CompositionProperty>
The composition property with the given name.
Sourcefn composition_object(&self) -> &CompositionObject
fn composition_object(&self) -> &CompositionObject
The embedded CompositionObject.
Provided Methods§
Sourcefn start_animation(
&self,
property_name: &str,
animation: &dyn ICompositionAnimation,
)
fn start_animation( &self, property_name: &str, animation: &dyn ICompositionAnimation, )
Connects an animation with the named property of the object and starts the animation.
Sourcefn start_animation_with_final_value(
&self,
property_name: &str,
animation: &dyn ICompositionAnimation,
final_value: Option<ExpressionVariant>,
)
fn start_animation_with_final_value( &self, property_name: &str, animation: &dyn ICompositionAnimation, final_value: Option<ExpressionVariant>, )
See start_animation. property_name may
name a sub-channel of a vector property (Offset.X, Scale.XY,
components X, Y, Z, W in any case): the animation then animates a
value of the sub-channel’s type (a scalar for one component, a
Vector2 for two, …) and leaves the other components alone. Several
sub-channels of one property run together; an animation of the whole
property replaces them.
Sourcefn start_animation_with_controller(
&self,
property_name: &str,
animation: &dyn ICompositionAnimation,
controller: &Rc<AnimationController>,
)
fn start_animation_with_controller( &self, property_name: &str, animation: &dyn ICompositionAnimation, controller: &Rc<AnimationController>, )
StartAnimation(propertyName, animation, animationController): starts
the animation under controller, which can pause, resume, scrub and
speed it up. property_name may name a sub-channel, as for
start_animation.
Sourcefn try_get_animation_controller(
&self,
property_name: &str,
) -> Option<Rc<AnimationController>>
fn try_get_animation_controller( &self, property_name: &str, ) -> Option<Rc<AnimationController>>
The controller of the animation of the named property
(TryGetAnimationController): the controller it was started with, or
a new controller that takes the running animation over. None when no
animation was started on the property through this object, or it was
stopped.
Sourcefn stop_animation(&self, property_name: &str)
fn stop_animation(&self, property_name: &str)
Disconnects an animation from the named property and stops it,
applying its stop behavior. property_name may name a sub-channel
(Offset.X): the animations of the sub-channels that share a
component with it are stopped.
Sourcefn start_animation_group(&self, grp: &dyn ICompositionAnimationBase)
fn start_animation_group(&self, grp: &dyn ICompositionAnimationBase)
Starts an animation group. The StartAnimationGroup method on CompositionObject lets you start CompositionAnimationGroup. All the animations in the group will be started at the same time on the object.
Sourcefn start_animation_group_part(
&self,
animation: &dyn ICompositionAnimation,
target: &str,
final_value: ExpressionVariant,
) -> bool
fn start_animation_group_part( &self, animation: &dyn ICompositionAnimation, target: &str, final_value: ExpressionVariant, ) -> bool
StartAnimationGroupPart.
Sourcefn start_animation_group_for(
&self,
grp: &dyn ICompositionAnimationBase,
target: &str,
final_value: ExpressionVariant,
) -> bool
fn start_animation_group_for( &self, grp: &dyn ICompositionAnimationBase, target: &str, final_value: ExpressionVariant, ) -> bool
Starts an animation or an animation group triggered by the change
of property target to final_value. Returns whether one of the
animations targets that property.
Sourcefn stop_animation_group(&self, grp: &dyn ICompositionAnimationBase)
fn stop_animation_group(&self, grp: &dyn ICompositionAnimationBase)
Stops an animation group.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
impl ICompositionObjectAnimations for AnimationController
impl ICompositionObjectAnimations for CompositionBitmapCache
impl ICompositionObjectAnimations for CompositionBrush
impl ICompositionObjectAnimations for CompositionClip
impl ICompositionObjectAnimations for CompositionGeometry
impl ICompositionObjectAnimations for CompositionGradientStop
impl ICompositionObjectAnimations for CompositionLight
impl ICompositionObjectAnimations for CompositionPropertySet
impl ICompositionObjectAnimations for CompositionShape
impl ICompositionObjectAnimations for CompositionShapeCollection
impl ICompositionObjectAnimations for CompositionTarget
The class has no animated property: upstream does not override
StartAnimation, whose base implementation rejects every property.
impl ICompositionObjectAnimations for CompositionViewBox
impl ICompositionObjectAnimations for CompositionVisual
impl ICompositionObjectAnimations for CompositionVisualCollection
The class has no animated property: upstream does not override
StartAnimation, whose base implementation rejects every property.