pub struct InitialValueExpressionCollection { /* private fields */ }Expand description
The initial values of a CompositionAnimation
(CompositionAnimation.InitialValueExpressions): a map from the name of a
property of the target object ("Offset", "Opacity") to an expression
string. When the animation starts, each expression is evaluated against the
target object and the parameters of the animation, and the property is set
to the result before the animation runs; this.StartingValue and
this.CurrentValue in such an expression are the value the property has
at that moment.
Implementations§
Source§impl InitialValueExpressionCollection
impl InitialValueExpressionCollection
Sourcepub fn insert(&self, property_name: &str, expression: &str) -> bool
pub fn insert(&self, property_name: &str, expression: &str) -> bool
Sets the initial value expression of a property. Returns true when it
replaced an expression the property already had.
Sourcepub fn lookup(&self, property_name: &str) -> Option<String>
pub fn lookup(&self, property_name: &str) -> Option<String>
The initial value expression of a property, if it has one.
Sourcepub fn has_key(&self, property_name: &str) -> bool
pub fn has_key(&self, property_name: &str) -> bool
Whether the property has an initial value expression.
Sourcepub fn remove(&self, property_name: &str) -> bool
pub fn remove(&self, property_name: &str) -> bool
Removes the initial value expression of a property. Returns true when
the property had one.
Sourcepub fn get_view(&self) -> Vec<(String, String)>
pub fn get_view(&self) -> Vec<(String, String)>
The (property name, expression) pairs, ordered by property name.
Sourcepub fn parse_all(
&self,
) -> Result<Vec<(String, Expression)>, ExpressionParseException>
pub fn parse_all( &self, ) -> Result<Vec<(String, Expression)>, ExpressionParseException>
The expressions parsed, ordered by property name, in the form the
starting animation takes them to the server (Send). Fails with the
error of the first expression that cannot be parsed.
Sourcepub fn evaluate_parsed(
expressions: &[(String, Expression)],
target: &dyn IExpressionObject,
parameters: Option<&dyn IExpressionParameterCollection>,
foreign_function_interface: &dyn IExpressionForeignFunctionInterface,
) -> Vec<(String, ExpressionVariant)>
pub fn evaluate_parsed( expressions: &[(String, Expression)], target: &dyn IExpressionObject, parameters: Option<&dyn IExpressionParameterCollection>, foreign_function_interface: &dyn IExpressionForeignFunctionInterface, ) -> Vec<(String, ExpressionVariant)>
Evaluates parsed initial value expressions for a target object: for each
(property name, expression) pair (from parse_all),
the value the property starts with. this.StartingValue,
this.CurrentValue and this.FinalValue are the value the target has
for that property, this.Target is the target and the parameters are
those of the animation. A result that is Invalid (an expression that
does not evaluate) is left out, so the property keeps its value.
This is the step the start of an animation runs on the server before the animation instance is initialized; writing the values to the properties is left to the caller, which knows the property ids.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for InitialValueExpressionCollection
impl !RefUnwindSafe for InitialValueExpressionCollection
impl !Sync for InitialValueExpressionCollection
impl Send for InitialValueExpressionCollection
impl Unpin for InitialValueExpressionCollection
impl UnsafeUnpin for InitialValueExpressionCollection
impl UnwindSafe for InitialValueExpressionCollection
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
affects_render, metadata
overrides). Read more