using Tizen.NUI.BaseComponents;
/// <summary>
- /// Animation can be used to animate the properties of any number of objects, typically View.<br>
+ /// Animation can be used to animate the properties of any number of objects, typically view.<br>
/// If the "Finished" event is connected to a member function of an object, it must be disconnected before the object is destroyed.<br>
- /// This is typically done in the object destructor, and requires either the Animation handle to be stored.<br>
+ /// This is typically done in the object destructor, and requires either the animation handle to be stored.<br>
/// The overall animation time is superseded by the values given in the animation time used when calling the AnimateTo(), AnimateBy(), AnimateBetween() and AnimatePath() methods.<br>
- /// If any of the individual calls to those functions exceeds the overall animation time(Duration), then the overall animation time is automatically extended.<br>
+ /// If any of the individual calls to those functions exceeds the overall animation time (Duration), then the overall animation time is automatically extended.<br>
/// </summary>
public class Animation : BaseHandle
{
}
/// <summary>
- /// To make Animation instance be disposed.
+ /// To make animation instance be disposed.
/// </summary>
protected override void Dispose(DisposeTypes type)
{
}
/// <summary>
- /// Create an initialized Animation.<br>
+ /// Creates an initialized animation.<br>
/// The animation will not loop.<br>
/// The default end action is "Cancel".<br>
- /// The default Alpha function is linear.<br>
+ /// The default alpha function is linear.<br>
/// </summary>
/// <remarks>DurationmSeconds must be greater than zero.</remarks>
- /// <param name="durationMilliSeconds">The duration in milli seconds.</param>
+ /// <param name="durationMilliSeconds">The duration in milliseconds.</param>
public Animation(int durationMilliSeconds) : this(NDalicPINVOKE.Animation_New((float)durationMilliSeconds / 1000.0f), true)
{
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
private delegate void AnimationFinishedEventCallbackType(IntPtr data);
private event EventHandler _animationFinishedEventHandler;
/**
- * @brief Event for Finished signal which can be used to subscribe/unsubscribe the event handler.
- * Finished signal is emitted when an Animation's animations have finished.
+ * @brief Event for the finished signal which can be used to subscribe or unsubscribe the event handler.
+ * The finished signal is emitted when an animation's animations have finished.
*/
public event EventHandler Finished
{
private AnimationProgressReachedEventCallbackType _animationProgressReachedEventCallback;
private event EventHandler _animationProgressReachedEventHandler;
/**
- * @brief Event for ProgressReached signal which can be used to subscribe/unsubscribe the event handler.
- * ProgressReached signal is emitted when the Animation has reached a given progress percentage, this is set in the api SetProgressNotification.
+ * @brief Event for the ProgressReached signal, which can be used to subscribe or unsubscribe the event handler.
+ * The ProgressReached signal is emitted when the animation has reached a given progress percentage, this is set in the api SetProgressNotification.
*/
public event EventHandler ProgressReached
{
/// <summary>
- /// Gets/Sets the duration in milli seconds of the animation.
+ /// Gets or sets the duration in milliseconds of the animation.
/// </summary>
public int Duration
{
}
/// <summary>
- /// Gets/Sets the default alpha function for the animation.
+ /// Gets or sets the default alpha function for the animation.
/// </summary>
public AlphaFunction DefaultAlphaFunction
{
}
/// <summary>
- /// Set : Enables looping for 'count' repeats. A zero is the same as Looping = true; i.e.repeat forever.<br>
+ /// Set: Enables looping for 'count' repeats. A zero is the same as Looping = true; i.e., repeat forever.<br>
/// If Play() Stop() or 'count' loops is reached, the loop counter will reset.<br>
/// Setting this parameter does not cause the animation to Play().<br>
- /// Get : Gets the loop count. A zero is the same as Looping = true; ie repeat forever.<br>
+ /// Get: Gets the loop count. A zero is the same as Looping = true; i.e., repeat forever.<br>
/// The loop count is initially 1 for play once.<br>
/// </summary>
public int LoopCount
}
/// <summary>
- /// Gets/Sets the status of whether the animation will loop.<br>
- /// This property resets the loop count and should not be used with LoopCount property.<br>
+ /// Gets or sets the status of whether the animation will loop.<br>
+ /// This property resets the loop count and should not be used with the LoopCount property.<br>
/// Setting this parameter does not cause the animation to Play().<br>
/// </summary>
public bool Looping
/// <summary>
- /// Gets/Sets the end action of the animation.<br>
+ /// Gets or sets the end action of the animation.<br>
/// This action is performed when the animation ends or if it is stopped.<br>
- /// Default end action is Cancel.<br>
+ /// The default end action is cancel.<br>
/// </summary>
public EndActions EndAction
{
/// <summary>
/// Stops the animation.
/// </summary>
- /// <param name="action">end action can be set</param>
+ /// <param name="action">The end action can be set.</param>
public void Stop(EndActions action = EndActions.Cancel)
{
SetEndAction(action);
}
/// <summary>
- /// Gets/Sets the disconnect action.<br>
+ /// Gets or sets the disconnect action.<br>
/// If any of the animated property owners are disconnected from the stage while the animation is being played, then this action is performed.<br>
- /// Default action is to Cancel.<br>
+ /// The default action is cancel.<br>
/// </summary>
public EndActions DisconnectAction
{
/// <summary>
- /// Gets/Sets the progress of the animation.<br>
- /// The animation will play(or continue playing) from this point.<br>
- /// The progress must be in the 0-1 interval or in the play range interval if defined.<br>
+ /// Gets or sets the progress of the animation.<br>
+ /// The animation will play (or continue playing) from this point.<br>
+ /// The progress must be in the 0-1 interval or in the play range interval if defined<br>
/// otherwise, it will be ignored.<br>
/// </summary>
public float CurrentProgress
}
/// <summary>
- /// Gets/Sets Specifies a speed factor for the animation.<br>
+ /// Gets or sets specificifications of a speed factor for the animation.<br>
/// The speed factor is a multiplier of the normal velocity of the animation.<br>
- /// Values between[0, 1] will slow down the animation and values above one will speed up the animation.<br>
+ /// Values between [0, 1] will slow down the animation and values above one will speed up the animation.<br>
/// It is also possible to specify a negative multiplier to play the animation in reverse.<br>
/// </summary>
public float SpeedFactor
}
/// <summary>
- /// Gets/Sets the playing range.<br>
- /// Animation will play between the values specified. Both values(range.x and range.y ) should be between 0-1,
- /// otherwise they will be ignored.If the range provided is not in proper order(minimum, maximum ), it will be reordered.<br>
+ /// Gets or sets the playing range.<br>
+ /// Animation will play between the values specified. Both values (range.x and range.y ) should be between 0-1,
+ /// otherwise they will be ignored. If the range provided is not in proper order (minimum, maximum ), it will be reordered.<br>
/// </summary>
public RelativeVector2 PlayRange
{
/// <summary>
- /// Gets/Sets the Progress notification marker which triggers the ProgressReachedSignal.<br>
- /// percentage of animation progress should be greater than 0 and less than 1, e.g 0.3 for 30% <br>
- /// One notification can be set on each animation
+ /// Gets or sets the progress notification marker which triggers the ProgressReachedSignal.<br>
+ /// Percentage of animation progress should be greater than 0 and less than 1, for example, 0.3 for 30% <br>
+ /// One notification can be set on each animation.
/// </summary>
public float ProgressNotification
{
/// <summary>
/// Animates a property value by a relative amount.<br>
/// </summary>
- /// <param name="target">The target object to animate</param>
- /// <param name="property">The target property to animate</param>
- /// <param name="relativeValue">The property value will change by this amount</param>
- /// <param name="alphaFunction">The alpha function to apply</param>
+ /// <param name="target">The target object to animate.</param>
+ /// <param name="property">The target property to animate.</param>
+ /// <param name="relativeValue">The property value will change by this amount.</param>
+ /// <param name="alphaFunction">The alpha function to apply.</param>
public void AnimateBy(View target, string property, object relativeValue, AlphaFunction alphaFunction = null)
{
- string _str1 = property.Substring(0, 1);
- string _str2 = property.Substring(1);
- string _str = _str1.ToLower() + _str2;
-
- Property _prop = new Property(target, _str);
- if (_prop.propertyIndex == Property.INVALID_INDEX)
- {
- throw new System.ArgumentException("second argument string property is invalid parameter!");
- }
+ Property _prop = PropertyHelper.GetPropertyFromString(target, property);
PropertyType propertyType = target.GetPropertyType(_prop.propertyIndex);
if(propertyType.Equals(PropertyType.Float))
/// <summary>
/// Animates a property value by a relative amount.<br>
/// </summary>
- /// <param name="target">The target object to animate</param>
- /// <param name="property">The target property to animate</param>
- /// <param name="relativeValue">The property value will change by this amount</param>
- /// <param name="startTime">Start time of animation</param>
- /// <param name="endTime">End time of animation</param>
- /// <param name="alphaFunction">The alpha function to apply</param>
+ /// <param name="target">The target object to animate.</param>
+ /// <param name="property">The target property to animate.</param>
+ /// <param name="relativeValue">The property value will change by this amount.</param>
+ /// <param name="startTime">The start time of the animation.</param>
+ /// <param name="endTime">The end time of the animation.</param>
+ /// <param name="alphaFunction">The alpha function to apply.</param>
public void AnimateBy(View target, string property, object relativeValue, int startTime, int endTime, AlphaFunction alphaFunction = null)
{
- string _str1 = property.Substring(0, 1);
- string _str2 = property.Substring(1);
- string _str = _str1.ToLower() + _str2;
-
- Property _prop = new Property(target, _str);
- if (_prop.propertyIndex == Property.INVALID_INDEX)
- {
- throw new System.ArgumentException("second argument string property is invalid parameter!");
- }
+ Property _prop = PropertyHelper.GetPropertyFromString(target, property);
PropertyType propertyType = target.GetPropertyType(_prop.propertyIndex);
if(propertyType.Equals(PropertyType.Float))
/// <summary>
/// Animates a property to a destination value.<br>
/// </summary>
- /// <param name="target">The target object to animate</param>
- /// <param name="property">The target property to animate</param>
- /// <param name="destinationValue">The destination value</param>
- /// <param name="alphaFunction">The alpha function to apply</param>
+ /// <param name="target">The target object to animate.</param>
+ /// <param name="property">The target property to animate.</param>
+ /// <param name="destinationValue">The destination value.</param>
+ /// <param name="alphaFunction">The alpha function to apply.</param>
public void AnimateTo(View target, string property, object destinationValue, AlphaFunction alphaFunction = null)
{
- string _str1 = property.Substring(0, 1);
- string _str2 = property.Substring(1);
- string _str = _str1.ToLower() + _str2;
-
- Property _prop = new Property(target, _str);
- if (_prop.propertyIndex == Property.INVALID_INDEX)
- {
- throw new System.ArgumentException("second argument string property is invalid parameter!");
- }
+ Property _prop = PropertyHelper.GetPropertyFromString(target, property);
PropertyType propertyType = target.GetPropertyType(_prop.propertyIndex);
if(propertyType.Equals(PropertyType.Float))
/// <summary>
/// Animates a property to a destination value.<br>
/// </summary>
- /// <param name="target">The target object to animate</param>
- /// <param name="property">The target property to animate</param>
- /// <param name="destinationValue">The destination value</param>
- /// <param name="alphaFunction">The alpha function to apply</param>
- /// <param name="startTime">Start time of animation</param>
- /// <param name="endTime">End time of animation</param>
- /// <param name="alphaFunction">The alpha function to apply</param>
+ /// <param name="target">The target object to animate.</param>
+ /// <param name="property">The target property to animate.</param>
+ /// <param name="destinationValue">The destination value.</param>
+ /// <param name="alphaFunction">The alpha function to apply.</param>
+ /// <param name="startTime">The start time of the animation.</param>
+ /// <param name="endTime">The end time of the animation.</param>
+ /// <param name="alphaFunction">The alpha function to apply.</param>
public void AnimateTo(View target, string property, object destinationValue, int startTime, int endTime, AlphaFunction alphaFunction = null)
{
- string _str1 = property.Substring(0, 1);
- string _str2 = property.Substring(1);
- string _str = _str1.ToLower() + _str2;
-
- Property _prop = new Property(target, _str);
- if (_prop.propertyIndex == Property.INVALID_INDEX)
- {
- throw new System.ArgumentException("second argument string property is invalid parameter!");
- }
+ Property _prop = PropertyHelper.GetPropertyFromString(target, property);
PropertyType propertyType = target.GetPropertyType(_prop.propertyIndex);
if(propertyType.Equals(PropertyType.Float))
/// <summary>
/// Animates a property between keyframes.
/// </summary>
- /// <param name="target">The target object to animate</param>
- /// <param name="property">The target property to animate</param>
- /// <param name="keyFrames">The set of time/value pairs between which to animate</param>
- /// <param name="interpolation">The method used to interpolate between values</param>
- /// <param name="alphaFunction">The alpha function to apply</param>
+ /// <param name="target">The target object to animate.</param>
+ /// <param name="property">The target property to animate.</param>
+ /// <param name="keyFrames">The set of time or value pairs between which to animate.</param>
+ /// <param name="interpolation">The method used to interpolate between values.</param>
+ /// <param name="alphaFunction">The alpha function to apply.</param>
public void AnimateBetween(View target, string property, KeyFrames keyFrames, Interpolation interpolation = Interpolation.Linear, AlphaFunction alphaFunction = null)
{
- string _str1 = property.Substring(0, 1);
- string _str2 = property.Substring(1);
- string _str = _str1.ToLower() + _str2;
+ Property _prop = PropertyHelper.GetPropertyFromString(target, property);
- Property _prop = new Property(target, _str);
if (_prop.propertyIndex == Property.INVALID_INDEX)
{
throw new System.ArgumentException("second argument string property is invalid parameter!");
/// <param name="target">The target object to animate</param>
/// <param name="property">The target property to animate</param>
/// <param name="keyFrames">The set of time/value pairs between which to animate</param>
- /// <param name="startTime">Start time of animation in milli seconds</param>
- /// <param name="endTime">End time of animation in milli seconds</param>
- /// <param name="interpolation">The method used to interpolate between values</param>
- /// <param name="alphaFunction">The alpha function to apply</param>
+ /// <param name="startTime">The start time of animation in milliseconds.</param>
+ /// <param name="endTime">The end time of animation in milliseconds.</param>
+ /// <param name="interpolation">The method used to interpolate between values.</param>
+ /// <param name="alphaFunction">The alpha function to apply.</param>
public void AnimateBetween(View target, string property, KeyFrames keyFrames, int startTime, int endTime, Interpolation interpolation = Interpolation.Linear, AlphaFunction alphaFunction = null)
{
- string _str1 = property.Substring(0, 1);
- string _str2 = property.Substring(1);
- string _str = _str1.ToLower() + _str2;
-
- Property _prop = new Property(target, _str);
- if (_prop.propertyIndex == Property.INVALID_INDEX)
- {
- throw new System.ArgumentException("second argument string property is invalid parameter!");
- }
+ Property _prop = PropertyHelper.GetPropertyFromString(target, property);
Tizen.NUI.TimePeriod time = new Tizen.NUI.TimePeriod(MilliSecondsToSeconds(startTime), MilliSecondsToSeconds(endTime - startTime));
if (alphaFunction != null)
}
/// <summary>
- /// Animates an view's position and orientation through a predefined path.<br>
+ /// Animates the view's position and orientation through a predefined path.<br>
/// The view will rotate to orient the supplied forward vector with the path's tangent.<br>
/// If forward is the zero vector then no rotation will happen.<br>
/// </summary>
- /// <param name="view">The view to animate</param>
- /// <param name="path">It defines position and orientation</param>
- /// <param name="forward">The vector (in local space coordinate system) that will be oriented with the path's tangent direction</param>
- /// <param name="alphaFunction">The alpha function to apply</param>
+ /// <param name="view">The view to animate.</param>
+ /// <param name="path">It defines position and orientation.</param>
+ /// <param name="forward">The vector (in local space coordinate system) will be oriented with the path's tangent direction.</param>
+ /// <param name="alphaFunction">The alpha function to apply.</param>
public void AnimatePath(View view, Path path, Vector3 forward, AlphaFunction alphaFunction = null)
{
if (alphaFunction == null)
}
/// <summary>
- /// Animates an view's position and orientation through a predefined path.<br>
+ /// Animates the view's position and orientation through a predefined path.<br>
/// The view will rotate to orient the supplied forward vector with the path's tangent.<br>
/// If forward is the zero vector then no rotation will happen.<br>
/// </summary>
- /// <param name="view">The view to animate</param>
- /// <param name="path">It defines position and orientation</param>
- /// <param name="forward">The vector (in local space coordinate system) that will be oriented with the path's tangent direction</param>
- /// <param name="startTime">Start time of animation</param>
- /// <param name="endTime">End time of animation</param>
- /// <param name="alphaFunction">The alpha function to apply</param>
+ /// <param name="view">The view to animate.</param>
+ /// <param name="path">It defines position and orientation.</param>
+ /// <param name="forward">The vector (in local space coordinate system) will be oriented with the path's tangent direction.</param>
+ /// <param name="startTime">The start time of the animation.</param>
+ /// <param name="endTime">The end time of the animation.</param>
+ /// <param name="alphaFunction">The alpha function to apply.</param>
public void AnimatePath(View view, Path path, Vector3 forward, int startTime, int endTime, AlphaFunction alphaFunction = null)
{
TimePeriod time = new TimePeriod(MilliSecondsToSeconds(startTime), MilliSecondsToSeconds(endTime - startTime));
}
/// <summary>
- /// Creates an initialized Animation.<br>
+ /// Creates an initialized animation.<br>
/// The animation will not loop.<br>
/// The default end action is "Cancel".<br>
/// The default alpha function is linear.<br>
}
/// <summary>
- /// Downcasts a handle to Animation handle.<br>
- /// If handle points to an Animation object, the downcast produces valid handle.<br>
+ /// Downcasts a handle to animation handle.<br>
+ /// If handle points to an animation object, the downcast produces a valid handle.<br>
/// If not, the returned handle is left uninitialized.<br>
/// </summary>
- /// <param name="handle">Handle to an object</param>
- /// <returns>Handle to an Animation object or an uninitialized handle</returns>
+ /// <param name="handle">Handle to an object.</param>
+ /// <returns>Handle to an animation object or an uninitialized handle.</returns>
public static Animation DownCast(BaseHandle handle)
{
Animation ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as Animation;
/// The progress must be in the 0-1 interval or in the play range interval if defined,
/// otherwise, it will be ignored.<br>
/// </summary>
- /// <param name="progress">A value between [0,1], or between the play range if specified, from where the animation should start playing</param>
+ /// <param name="progress">A value between [0,1], or between the play range if specified, from where the animation should start playing.</param>
public void PlayFrom(float progress)
{
NDalicPINVOKE.Animation_PlayFrom(swigCPtr, progress);
}
/// <summary>
- /// Play the animation after a given delay time.<br/>
+ /// Plays the animation after a given delay time.<br/>
/// The delay time is not included in the looping time.<br/>
- /// When the delay time is negative value, it would treat as play immediately.<br/>
+ /// When the delay time is a negative value, it would treat as play immediately.<br/>
/// </summary>
- /// <param name="delayMilliseconds">The delay time</param>
+ /// <param name="delayMilliseconds">The delay time.</param>
public void PlayAfter(int delayMilliseconds)
{
NDalicPINVOKE.Animation_PlayAfter(swigCPtr, MilliSecondsToSeconds(delayMilliseconds));
}
/// <summary>
- /// Enumeration for what to do when the animation ends, is stopped, or is destroyed.
+ /// Enumeration for what to do when the animation ends, stopped, or destroyed.
/// </summary>
public enum EndActions
{
/// </summary>
Discard,
/// <summary>
- /// If the animation is stopped, the animated property values are saved as if the animation had run to completion, otherwise behaves like Cancel.
+ /// If the animation is stopped, the animated property values are saved as if the animation had run to completion, otherwise behaves like cancel.
/// </summary>
StopFinal
}
/// <summary>
/// Enumeration for what state the animation is in.
/// </summary>
- /// <remarks>Calling Reset() on this class will NOT reset the animation. It will call BaseHandle.Reset() which drops the object handle.</remarks>
+ /// <remarks>Calling Reset() on this class will not reset the animation. It will call the BaseHandle.Reset() which drops the object handle.</remarks>
public enum States
{
/// <summary>
- /// Animation has stopped
+ /// The animation has stopped.
/// </summary>
Stopped,
/// <summary>
- /// The animation is playing
+ /// The animation is playing.
/// </summary>
Playing,
/// <summary>
- /// The animation is paused
+ /// The animation is paused.
/// </summary>
Paused
}