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

Generic animation of a standard object. More...

#include <GUIAnimationStdGUIObject.h>

Inheritance diagram for CGUIAnimationStdGUIObject:

Public Member Functions

 CGUIAnimationStdGUIObject (CGUIObject *pAnimatedObject, const CGUIEasing::EasingType_t &eEasingX, const CGUIEasing::EasingType_t &eEasingY, const CGUIEasing::EasingType_t &eEasingWidth, const CGUIEasing::EasingType_t &eEasingHeight, const CGUIEasing::EasingType_t &eEasingAlpha, const eC_UInt &uiDuration=1000, const eC_UInt &uiStepTime=25)
 
 CGUIAnimationStdGUIObject (CGUIObject *pkAnimatedObject, const CGUIEasing::EasingType_t &eEasing, const eC_UInt &uiDuration=1000, const eC_UInt &uiStepTime=25)
 
virtual void ApplyAnimation (eC_UInt uiElapsedTime)
 
eC_Value GetAnimatedObjectNthAttribute (const eC_UInt &uiN) const
 
CGUIEasing::EasingType_t GetEasingForNthAttribute (const eC_UInt &uiN) const
 
eC_Bool GetEnabledNthAttribute (const eC_UInt &uiN) const
 
eC_Value GetStartValueForNthAttribute (const eC_UInt &uiN) const
 
eC_Value GetTargetValueForNthAttribute (const eC_UInt &uiN) const
 
virtual void ReadFromStream ()
 
void SetAnimatedObjectNthAttribute (const eC_UInt &uiN, const eC_Value &vValue)
 
void SetEasingForNthAttribute (const eC_UInt &uiN, const CGUIEasing::EasingType_t &eEasingType)
 
void SetEnabledNthAttribute (const eC_UInt &uiN, const eC_Bool &bEnabled)
 
void SetStartValueForNthAttribute (const eC_UInt &uiN, const eC_Value &vStart)
 
void SetStartValues (const CGUIObject *pObj)
 
void SetTargetValueForNthAttribute (const eC_UInt &uiN, const eC_Value &vTarget)
 
void SetTargetValues (const CGUIObject *pObj)
 
virtual 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 STDGUIOBJECT_ANIMATION_CLASS_VERSION
 class-version string
 
static const eC_String XMLTAG_ATTRIBUTES []
 attributes-string
 
- 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

Generic animation of a standard object.

This animation animates a standard CGUIObject object through giving access to all important object attributes which are x position, y position, width, height and alpha value. For all of these attributes a separate CGUIEasing functions is used.

This example moves and changes the size of an object using CGUIEasing functions.

// The animation shall be done in 5 seconds.
const eC_UInt cuiDuration = 5000;
// Now create the instance of the animation.
CGUIAnimationStdGUIObject* pAnimation = new CGUIAnimationStdGUIObject(pkAnimatedObject,
CGUIEasing::EASE_LINEAR, CGUIEasing::EASE_LINEAR,
CGUIEasing::EASE_LINEAR, CGUIEasing::EASE_LINEAR,
CGUIEasing::EASE_LINEAR,
cuiDuration);
// To start the animation call the StartAnimation() method of the animation.
pAnimation->StartAnimation();
//If the instance of the animation is not available directly use the AnimationHandler.
eC_UInt uiMyAnimationID = pAnimation->GetID();
GETANIMATIONHDL.GetAnimation(uiMyAnimationID);
void StartAnimation()
eC_UInt GetID() const
Definition: GUIAnimation.h:184
Generic animation of a standard object.
Definition: GUIAnimationStdGUIObject.h:47

Constructor & Destructor Documentation

◆ CGUIAnimationStdGUIObject() [1/2]

CGUIAnimationStdGUIObject::CGUIAnimationStdGUIObject ( CGUIObject pAnimatedObject,
const CGUIEasing::EasingType_t eEasingX,
const CGUIEasing::EasingType_t eEasingY,
const CGUIEasing::EasingType_t eEasingWidth,
const CGUIEasing::EasingType_t eEasingHeight,
const CGUIEasing::EasingType_t eEasingAlpha,
const eC_UInt &  uiDuration = 1000,
const eC_UInt &  uiStepTime = 25 
)

Constructor

Parameters
pAnimatedObjectThe GUIObject that will be moved.
eEasingXThe easing type that is used for the XPos of the object.
eEasingYThe easing type that is used for the YPos of the object.
eEasingWidthThe easing type that is used for the width of the object.
eEasingHeightThe easing type that is used for the height of the object.
eEasingAlphaThe easing type that is used for the alpha of the object.
uiDurationThe total duration of the animation in milliseconds. Based on the distance the duration determines the animation speed.
uiStepTimeThe time between two animation steps in milliseconds.

◆ CGUIAnimationStdGUIObject() [2/2]

CGUIAnimationStdGUIObject::CGUIAnimationStdGUIObject ( CGUIObject pkAnimatedObject,
const CGUIEasing::EasingType_t eEasing,
const eC_UInt &  uiDuration = 1000,
const eC_UInt &  uiStepTime = 25 
)

Constructor

Parameters
pkAnimatedObjectThe GUIObject that will be moved.
eEasingThe easing type that is used for all attributes.
uiDurationThe total duration of the animation in milliseconds. Based on the distance the duration determines the animation speed.
uiStepTimeThe time between two animation steps in milliseconds.

Member Function Documentation

◆ ApplyAnimation()

virtual void CGUIAnimationStdGUIObject::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.

◆ GetAnimatedObjectNthAttribute()

eC_Value CGUIAnimationStdGUIObject::GetAnimatedObjectNthAttribute ( const eC_UInt &  uiN) const

Get the nth attribute

Parameters
uiNindex
Returns
attribute

◆ GetEasingForNthAttribute()

CGUIEasing::EasingType_t CGUIAnimationStdGUIObject::GetEasingForNthAttribute ( const eC_UInt &  uiN) const

Get the easing type for the nth attribute

Parameters
uiNindex
Returns
easing type

◆ GetEnabledNthAttribute()

eC_Bool CGUIAnimationStdGUIObject::GetEnabledNthAttribute ( const eC_UInt &  uiN) const

Get the nth attribute enabled

Parameters
uiNindex
Returns
enabled

◆ GetStartValueForNthAttribute()

eC_Value CGUIAnimationStdGUIObject::GetStartValueForNthAttribute ( const eC_UInt &  uiN) const

Get the start value type for the nth attribute

Parameters
uiNindex
Returns
start value

◆ GetTargetValueForNthAttribute()

eC_Value CGUIAnimationStdGUIObject::GetTargetValueForNthAttribute ( const eC_UInt &  uiN) const

Get the target value type for the nth attribute

Parameters
uiNindex
Returns
target value

◆ ReadFromStream()

virtual void CGUIAnimationStdGUIObject::ReadFromStream ( )
virtual

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

See also
CGUIObject::ReadFromStream()

Reimplemented from CGUIAnimation.

◆ SetAnimatedObjectNthAttribute()

void CGUIAnimationStdGUIObject::SetAnimatedObjectNthAttribute ( const eC_UInt &  uiN,
const eC_Value &  vValue 
)

Set the nth attribute

Parameters
uiNindex
vValueattribute

◆ SetEasingForNthAttribute()

void CGUIAnimationStdGUIObject::SetEasingForNthAttribute ( const eC_UInt &  uiN,
const CGUIEasing::EasingType_t eEasingType 
)

Set the easing type type for the nth attribute

Parameters
uiNindex
eEasingTypeeasing type

◆ SetEnabledNthAttribute()

void CGUIAnimationStdGUIObject::SetEnabledNthAttribute ( const eC_UInt &  uiN,
const eC_Bool &  bEnabled 
)

Set the nth attribute to enabled

Parameters
uiNindex
bEnabled

◆ SetStartValueForNthAttribute()

void CGUIAnimationStdGUIObject::SetStartValueForNthAttribute ( const eC_UInt &  uiN,
const eC_Value &  vStart 
)

Set the start value type for the nth attribute

Parameters
uiNindex
vStartstart value

◆ SetStartValues()

void CGUIAnimationStdGUIObject::SetStartValues ( const CGUIObject pObj)

Retrieves the start values for this animation from the current status of the supplied GUIObject.

Parameters
pObjObject whose current attributes will serve as the start values for this animation

◆ SetTargetValueForNthAttribute()

void CGUIAnimationStdGUIObject::SetTargetValueForNthAttribute ( const eC_UInt &  uiN,
const eC_Value &  vTarget 
)

Set the start value type for the nth attribute

Parameters
uiNindex
vTargettarget value

◆ SetTargetValues()

void CGUIAnimationStdGUIObject::SetTargetValues ( const CGUIObject pObj)

Retrieves the target values for this animation from the current status of the supplied GUIObject.

Parameters
pObjObject whose current attributes will serve as the new target values for this animation

◆ WriteToStream()

virtual void CGUIAnimationStdGUIObject::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: