Detailed Description

Handles all actively animated css properties. Also keeps track of a single set of css properties as used in any animate method (PowerUI.Element.animate) and can be used to monitor the progress of an animation.

Public Member Functions

 UIAnimation (Element animating, string properties, float constantSpeedTime, float timeToAccelerateFor, float timeToDecelerateFor)
 Creates a new UIAnimation for animating CSS and immediately animates it. See PowerUI.Element.animate. More...
 
void Finished ()
 Called when this animation is finished. More...
 
void OnDone (DynamicMethod< Nitro.Void > method)
 Calls the given function when the animation is over. More...
 
void OnDone (AnimationCompleted onComplete)
 Calls the given delegate when the animation is over. More...
 
void Stop ()
 Call this to halt the animation early. This internally will cause the finished event to run. More...
 
void Stop (bool runEvent)
 Call this to halt the animation early. More...
 

Static Public Member Functions

static void Clear ()
 Removes all active animations. More...
 
static void Update ()
 Called at the UI update rate to progress the currently animated properties. More...
 
static AnimatedProperty GetAnimatedProperty (Element animating, string property)
 Searches the current animated properties for the named property on the given element. More...
 
static AnimatedProperty GetAnimatedProperty (Element animating, CssProperty property, int innerIndex)
 Searches the current animated properties for the named property on the given element. More...
 

Public Attributes

object Data
 A custom data object. More...
 
bool Decelerate
 True if this animation decelerates. More...
 
float TotalTime
 The total time in seconds that this animation lasts for. More...
 
Element Animating
 The element being animated. More...
 
float DecelerateAt
 The time in seconds to begin decelerating at. More...
 
float ConstantSpeedTime
 The time in seconds that the animation should remain at a constant speed for. More...
 
UIAnimation NextAnimation
 All current animations are stored in a linked list. This is the next one. More...
 
ElementStyle ElementStyle
 A shortcut to the element style object. More...
 
float TimeToAccelerateFor
 The time in seconds that this animation should accelerate for. More...
 
float TimeToDecelerateFor
 The time in seconds that this animation should decelerate for. More...
 
AnimationCompleted OnComplete
 The method to call (a c# or JS method) when the animation is done playing. More...
 
DynamicMethod< Nitro.VoidDone
 The dynamic method (a nitro function) to call when this animation is done. More...
 

Static Public Attributes

static AnimatedProperty LastProperty
 Actively animated properties are stored in a linked list. This is the tail of that list. More...
 
static AnimatedProperty FirstProperty
 Actively animated properties are stored in a linked list. This is the head of that list. More...
 

Private Member Functions

void AnimateComposite (CssProperty property, Css.Value value)
 
void Animate (CssProperty property, int innerIndex, Css.Value value, bool updateCss)
 Starts animating the named property and target value. Must not be composite properties. (e.g. color-overlay-r instead of color-overlay) More...
 

Private Attributes

bool FinishedPlaying
 True if this animation has finished; false otherwise. More...
 

Constructor & Destructor Documentation

PowerUI.UIAnimation.UIAnimation ( Element  animating,
string  properties,
float  constantSpeedTime,
float  timeToAccelerateFor,
float  timeToDecelerateFor 
)
inline

Creates a new UIAnimation for animating CSS and immediately animates it. See PowerUI.Element.animate.

Parameters
animatingThe element being animated.
propertiesThe CSS property string. Each property should define the value it will be when the animation is done.
constantSpeedTimeHow long this animation lasts for at a constant speed.
timeToAccelerateForHow long this animation accelerates for. Creates smooth animations when used.
timeToDecelerateForHow long this animation decelerates for. Creates smooth animations when used.

Member Function Documentation

void PowerUI.UIAnimation.Animate ( CssProperty  property,
int  innerIndex,
Css.Value  value,
bool  updateCss 
)
inlineprivate

Starts animating the named property and target value. Must not be composite properties. (e.g. color-overlay-r instead of color-overlay)

Parameters
propertyThe property to update.
innerIndexThe inner index of the property to update.
valueThe target value of the property.
updateCssTrue if this property should update CSS/ the screen when it's progressed.
void PowerUI.UIAnimation.AnimateComposite ( CssProperty  property,
Css.Value  value 
)
inlineprivate
static void PowerUI.UIAnimation.Clear ( )
inlinestatic

Removes all active animations.

void PowerUI.UIAnimation.Finished ( )
inline

Called when this animation is finished.

static AnimatedProperty PowerUI.UIAnimation.GetAnimatedProperty ( Element  animating,
string  property 
)
inlinestatic

Searches the current animated properties for the named property on the given element.

Parameters
animatingThe element being animated.
propertyThe CSS property to look for. Note: Must not be a composite property such as color-overlay. Must be a full property such as color-overlay-r.
Returns
An AnimatedProperty if it was found; Null otherwise.
static AnimatedProperty PowerUI.UIAnimation.GetAnimatedProperty ( Element  animating,
CssProperty  property,
int  innerIndex 
)
inlinestatic

Searches the current animated properties for the named property on the given element.

Parameters
animatingThe element being animated.
propertyThe CSS property to look for. Note: Must not be a composite property such as color-overlay. Must be a full property such as color-overlay-r.
Returns
An AnimatedProperty if it was found; Null otherwise.
void PowerUI.UIAnimation.OnDone ( DynamicMethod< Nitro.Void method)
inline

Calls the given function when the animation is over.

void PowerUI.UIAnimation.OnDone ( AnimationCompleted  onComplete)
inline

Calls the given delegate when the animation is over.

void PowerUI.UIAnimation.Stop ( )
inline

Call this to halt the animation early. This internally will cause the finished event to run.

void PowerUI.UIAnimation.Stop ( bool  runEvent)
inline

Call this to halt the animation early.

Parameters
runEventOptionally run the finished event if there is one.
static void PowerUI.UIAnimation.Update ( )
inlinestatic

Called at the UI update rate to progress the currently animated properties.

Member Data Documentation

Element PowerUI.UIAnimation.Animating

The element being animated.

float PowerUI.UIAnimation.ConstantSpeedTime

The time in seconds that the animation should remain at a constant speed for.

object PowerUI.UIAnimation.Data

A custom data object.

bool PowerUI.UIAnimation.Decelerate

True if this animation decelerates.

float PowerUI.UIAnimation.DecelerateAt

The time in seconds to begin decelerating at.

DynamicMethod<Nitro.Void> PowerUI.UIAnimation.Done

The dynamic method (a nitro function) to call when this animation is done.

ElementStyle PowerUI.UIAnimation.ElementStyle

A shortcut to the element style object.

bool PowerUI.UIAnimation.FinishedPlaying
private

True if this animation has finished; false otherwise.

AnimatedProperty PowerUI.UIAnimation.FirstProperty
static

Actively animated properties are stored in a linked list. This is the head of that list.

AnimatedProperty PowerUI.UIAnimation.LastProperty
static

Actively animated properties are stored in a linked list. This is the tail of that list.

UIAnimation PowerUI.UIAnimation.NextAnimation

All current animations are stored in a linked list. This is the next one.

AnimationCompleted PowerUI.UIAnimation.OnComplete

The method to call (a c# or JS method) when the animation is done playing.

float PowerUI.UIAnimation.TimeToAccelerateFor

The time in seconds that this animation should accelerate for.

float PowerUI.UIAnimation.TimeToDecelerateFor

The time in seconds that this animation should decelerate for.

float PowerUI.UIAnimation.TotalTime

The total time in seconds that this animation lasts for.