Guiliani  Version 2.4 revision 5970 (build 3)
CGUIAnimationBlinking Class Reference

This animation implements a blinking effect. More...

#include <GUIAnimationBlinking.h>

Inheritance diagram for CGUIAnimationBlinking:

Public Member Functions

 CGUIAnimationBlinking (CGUIObject *pAnimatedObject, eC_UInt uiDuration, eC_UInt uiOnTime, eC_UInt uiOffTime=0)
 CGUIAnimationBlinking ()
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)
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 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 ()
- Public Member Functions inherited from CGUIAnimatable
virtual ~CGUIAnimatable ()
 Destructor. Removes all existing animation callbacks.
virtual eC_Bool IsAnimating () const
- Public Member Functions inherited from CGUIStreamableObject
const eC_String & GetXMLTag () const
void SetXMLTag (const eC_String &kXMLTag)

Static Public Attributes

 The class version of the implementation.
- Static Public Attributes inherited from CGUIAnimation
static const eC_Char XMLTAG_ANIMATIONCLASSID [] = "AnimationClassID"
 XML tag to be used when writing a animation class ID into a stream.
static const eC_Char XMLTAG_ANIMATIONENDTAG [] = "/GUIAnimation"
 XML tag to be used when finish writing CGUIAnimation information into the stream.
static const eC_Char XMLTAG_ANIMATIONID [] = "AnimationID"
 XML tag to be used when writing a animation ID into a stream.
static const eC_Char XMLTAG_ANIMATIONSTARTTAG [] = "GUIAnimation"
 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 [] = "ClassVersion"

Protected Attributes

eC_UInt m_uiOffTime
 The time for which the object shall be invisible in milliseconds.
eC_UInt m_uiOnTime
 The time for which the object shall be visible in milliseconds.
- Protected Attributes inherited from CGUIAnimation
eC_TListDoubleLinked< CGUIAnimatedAttribute > * m_pkAnimatedAttributes
 available animated attributes

Additional Inherited Members

- Public Types inherited from CGUIAnimation
enum  AnimationStatus_t {
- 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
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

Detailed Description

This animation implements a blinking effect.

It makes the object invisible after a specified "On-time" and visible again after a specified "Off-time".

This animation does not use CGUIEasing functions.


eC_UInt uiDuration = 0; // The animation shall run infinitely.
eC_UInt uiOnTime = 500; // On time is 500 ms.
eC_UInt uiOffTime = 300; // Off time is 300 ms.
// Create the instance of the animation.
CGUIAnimationBlinking* pAnimation = new CGUIAnimationBlinking(pkAnimatedObject, uiDuration, uiOnTime, uiOffTime);
// To start the animation call the StartAnimation() method of the animation.

Constructor & Destructor Documentation

◆ CGUIAnimationBlinking() [1/2]

CGUIAnimationBlinking::CGUIAnimationBlinking ( CGUIObject pAnimatedObject,
eC_UInt  uiDuration,
eC_UInt  uiOnTime,
eC_UInt  uiOffTime = 0 


pAnimatedObjectThe Object that shall be animated.
uiDurationThe duration defines how long the animation will be running. Use 0 for endless animation.
uiOnTimeThe time interval in which the object shall be visible in milliseconds.
uiOffTimeThe time interval in which the object shall be invisible in milliseconds. When no time or 0 is passed, OnTime will be used.

◆ CGUIAnimationBlinking() [2/2]

CGUIAnimationBlinking::CGUIAnimationBlinking ( )

Default constructor for streaming.

Member Function Documentation

◆ ApplyAnimation()

void CGUIAnimationBlinking::ApplyAnimation ( eC_UInt  uiElapsedTime)

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()

uiElapsedTimeTime elapsed (in ms) since start of animation.

Implements CGUIAnimation.

◆ OnStatusChanged()

void CGUIAnimationBlinking::OnStatusChanged ( AnimationStatus_t  eStatus)

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

eStatusThe new status of the animation.

Reimplemented from CGUIAnimation.

◆ ReadFromStream()

void CGUIAnimationBlinking::ReadFromStream ( )

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

See also

Reimplemented from CGUIAnimation.

◆ WriteToStream()

void CGUIAnimationBlinking::WriteToStream ( const eC_Bool  bWriteClassID = false)

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

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 files: