Guiliani  Version 2.6 revision 7293 (documentation build 12)
CGUIAnimationAttribute Class Reference

This animation controls an attribute. More...

#include <GUIAnimationAttribute.h>

Inheritance diagram for CGUIAnimationAttribute:

Public Member Functions

 CGUIAnimationAttribute ()
 
 CGUIAnimationAttribute (CGUIObject *pkAnimatedObject, const eC_UInt &uiDuration, const CGUIAnimatedAttribute::AnimatedAttribute_t &eTargetAttribute, const CGUIEasing::EasingType_t &eEasingType, const eC_Value &vStartValue, const eC_Value &vTargetValue)
 
void ApplyAnimation (eC_UInt uiElapsedTime)
 
void OnStatusChanged (AnimationStatus_t eStatus)
 
void ReadFromStream ()
 
void WriteToStream (const eC_Bool bWriteClassID=false)
 
- Public Member Functions inherited from CGUIAnimation
virtual ~CGUIAnimation ()
 
void AddAnimationObserver (CGUIAnimationObserver *pkObserver)
 
virtual void ApplyAnimation (eC_UInt uiElapsedTime)=0
 
void ContinueAnimation ()
 
virtual void DoAnimate (const eC_Value &vTimes=eC_FromInt(1))
 
eC_TListDoubleLinked< CGUIAnimatedAttribute > * GetAnimatedAttributes ()
 
CGUIObjectGetAnimatedObject () const
 
ObjectHandle_t GetAnimatedObjectID () const
 
eC_UInt GetDuration () const
 
eC_UInt GetID () const
 
eC_UInt GetStepTime () const
 
virtual void InitAttributes ()
 
eC_Bool IsDeletedAfterFinish () const
 
eC_Bool IsPaused () const
 
void PauseAnimation ()
 
void ReadFromStream ()
 
void RemoveAnimationObserver (CGUIAnimationObserver *pkObserver)
 
void SetAnimatedObject (CGUIObject *pkObject)
 
void SetAnimatedObjectID (const ObjectHandle_t &eObject)
 
void SetAnimationObserver (CGUIAnimationObserver *pkObserver)
 
void SetDeletedAfterFinish (const eC_Bool bDeletedAfterFinish)
 
void SetDuration (eC_UInt uiDuration)
 
void StartAnimation ()
 
void StopAnimation ()
 
void UpdateAnimatedObjectPointer ()
 
void WriteToStream (const eC_Bool bWriteClassID=false)
 
- Public Member Functions inherited from CGUIAnimatable
virtual ~CGUIAnimatable ()
 Destructor. Removes all existing animation callbacks.
 
virtual void DoAnimate (const eC_Value &vTimes=eC_FromInt(1))
 
virtual eC_Bool IsAnimating () const
 
virtual void StartAnimation ()
 
virtual void StopAnimation ()
 
- Public Member Functions inherited from CGUIStreamableObject
const eC_String & GetXMLTag () const
 
virtual void ReadFromStream ()
 
void SetXMLTag (const eC_String &kXMLTag)
 
virtual void WriteToStream (const eC_Bool bWriteClassID=false)
 

Static Public Attributes

static const eC_UInt ANIMATION_ATTRIBUTE_CLASS_VERSION
 The class version of the implementation.
 
- Static Public Attributes inherited from CGUIAnimation
static const eC_Char XMLTAG_ANIMATIONCLASSID []
 XML tag to be used when writing a animation class ID into a stream.
 
static const eC_Char XMLTAG_ANIMATIONENDTAG []
 XML tag to be used when finish writing CGUIAnimation information into the stream.
 
static const eC_Char XMLTAG_ANIMATIONID []
 XML tag to be used when writing a animation ID into a stream.
 
static const eC_Char XMLTAG_ANIMATIONSTARTTAG []
 XML tag to be used when start writing CGUIAnimation information into the stream.
 
- Static Public Attributes inherited from CGUIStreamableObject
static const eC_Char XMLTAG_CLASSVERSION []
 

Additional Inherited Members

- Public Types inherited from CGUIAnimation
enum  AnimationStatus_t {
  ANIMATION_RUNNING , ANIMATION_PAUSED , ANIMATION_STOPPED , ANIMATION_FINISHED ,
  ANIMATION_DELETED
}
 
- Static Public Member Functions inherited from CGUIStreamableObject
static UUID_t GenerateUUID ()
 
- Protected Member Functions inherited from CGUIAnimation
 CGUIAnimation ()
 
 CGUIAnimation (CGUIObject *pkAnimatedObject, eC_UInt uiDuration, eC_UInt uiStepTime=25, eC_Bool bDeletedAfterFinish=false)
 
void AddAnimatedAttribute (CGUIAnimatedAttribute kAnimatedAttribute)
 
CGUIAnimatedAttributeGetAnimatedAttribute (const eC_UInt &uiAttributeIndex) const
 
virtual void OnStatusChanged (AnimationStatus_t eStatus)
 
void RemoveAnimatedAttributes ()
 
- Protected Member Functions inherited from CGUIStreamableObject
eC_UInt ReadStreamingHeader (const eC_UInt &uiClassVersion, const eC_UInt &uiClassMinVersion=0) const
 
void WriteStreamingFooter (const eC_Bool &bWriteClassID) const
 
void WriteStreamingHeader (const eC_Bool &bWriteClassID, const eC_Char *const pkClassIDTag, const eC_Int &iClassID, const eC_UInt &uiClassVersion) const
 
- Protected Attributes inherited from CGUIAnimation
eC_TListDoubleLinked< CGUIAnimatedAttribute > * m_pkAnimatedAttributes
 available animated attributes
 

Detailed Description

This animation controls an attribute.

Example:

eC_UInt uiDuration = 0; // The animation shall run infinitely.
eC_Value vStartValue = eC_FromInt(500); // Start at 500
eC_UInt uiOffTime = 300; // Off time is 300 ms.
// Create the instance of the animation.
CGUIAnimationAttribute* pkAnimation = new CGUIAnimationAttribute(pkAnimatedObject, uiDuration, CGUIAnimatedAttribute::ATTR_XPOS, vStartValue, vEndValue);
// To start the animation call the StartAnimation() method of the animation.
pAnimation->StartAnimation();
@ ATTR_XPOS
x-position
Definition: GUIAnimatedAttribute.h:28
This animation controls an attribute.
Definition: GUIAnimationAttribute.h:38

Constructor & Destructor Documentation

◆ CGUIAnimationAttribute() [1/2]

CGUIAnimationAttribute::CGUIAnimationAttribute ( CGUIObject pkAnimatedObject,
const eC_UInt &  uiDuration,
const CGUIAnimatedAttribute::AnimatedAttribute_t eTargetAttribute,
const CGUIEasing::EasingType_t eEasingType,
const eC_Value &  vStartValue,
const eC_Value &  vTargetValue 
)

Constructor

Parameters
pkAnimatedObjectThe Object that shall be animated.
uiDurationThe duration defines how long the animation will be running. Use 0 for endless animation.
eTargetAttributeThe attribute which will be modified
eEasingTypeThe easing-type for the animation
vStartValueThe start-value
vTargetValueThe target-value

◆ CGUIAnimationAttribute() [2/2]

CGUIAnimationAttribute::CGUIAnimationAttribute ( )

Default constructor for streaming.

Member Function Documentation

◆ ApplyAnimation()

void CGUIAnimationAttribute::ApplyAnimation ( eC_UInt  uiElapsedTime)
virtual

This function contains the animation logic. It typically accesses the animation's CGUIEasing functions to get the current values and sets these values in the animated object. This function is called by DoAnimate()

Parameters
uiElapsedTimeTime elapsed (in ms) since start of animation.

Implements CGUIAnimation.

◆ OnStatusChanged()

void CGUIAnimationAttribute::OnStatusChanged ( AnimationStatus_t  eStatus)
virtual

Makes sure that the object is visible when the animation is stopped or deleted.

Parameters
eStatusThe new status of the animation.

Reimplemented from CGUIAnimation.

◆ ReadFromStream()

void CGUIAnimationAttribute::ReadFromStream ( )
virtual

Reads attributes from the streaming file. Only for use with GUIFactoryManager.

See also
CGUIObject::ReadFromStream()

Reimplemented from CGUIAnimation.

◆ WriteToStream()

void CGUIAnimationAttribute::WriteToStream ( const eC_Bool  bWriteClassID = false)
virtual

Writes attributes to the streaming file. A CGUIStreamWriter has to be initialized.

Parameters
bWriteClassIDThis flag is used to switch writing of the class ID, leading and trailing tags. When implementing a new streamable object, check this flag. If it is true, first write the class ID, then continue with this object's attributes, and finally call the base class implementation with this flag set to false (this is the default).

Reimplemented from CGUIAnimation.


The documentation for this class was generated from the following file: