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

Transits from a source dialog to a destination dialog. More...

#include <GUITransitionCmd.h>

Inheritance diagram for CGUITransitionCmd:

Public Types

enum  TransitionType_t {
  BLEND_ONLY, BLEND_FADE, BLEND_AND_SHRINK, BLEND_AND_ZOOM,
  PUSH_FROM_LEFT, PUSH_FROM_RIGHT, PUSH_FROM_TOP, PUSH_FROM_BOTTOM,
  ROTATE_X_AXIS_CW, ROTATE_X_AXIS_CCW, ROTATE_Y_AXIS_CW, ROTATE_Y_AXIS_CCW,
  DISSOLVE
}
 Transition types.
 

Public Member Functions

 CGUITransitionCmd (CGUITransitionBase *pTransition, ObjectHandle_t eSource, const eC_String &rkDestFileName)
 
 CGUITransitionCmd (TransitionType_t eTransType, ObjectHandle_t eSource, const eC_String &rkDestFileName)
 
 CGUITransitionCmd (TransitionType_t eTransType, ObjectHandle_t eSource, const eC_String &rkDestFileName, eC_UInt uiTransitionTime)
 
 CGUITransitionCmd (TransitionType_t eTransType, ObjectHandle_t eSource, ObjectHandle_t eDest)
 
 CGUITransitionCmd (TransitionType_t eTransType, ObjectHandle_t eSource, ObjectHandle_t eDest, eC_UInt uiTransitionTime)
 
 CGUITransitionCmd ()
 Constructor for factory. Do not use this constructor in user code.
 
const eC_String & GetDestinationFileName () const
 
ObjectHandle_t GetDestinationObjectID () const
 
ObjectHandle_t GetSourceObjectID () const
 
eC_UInt GetTransitionTime () const
 
CGUITransitionCmd::TransitionType_t GetTransitionType () const
 
virtual void ReadFromStream ()
 
void SetDestinationFileName (eC_String &kDestFileName)
 
void SetDestinationObjectID (ObjectHandle_t eDest)
 
void SetSourceObjectID (ObjectHandle_t eSource)
 
void SetTransitionTime (eC_UInt uiTransitionTime)
 
void SetTransitionType (CGUITransitionCmd::TransitionType_t eTransitionType)
 
virtual void WriteToStream (const eC_Bool bWriteClassID=false)
 
- Public Member Functions inherited from CGUICommand
void AddAdditionalCmd (CGUICommandPtr pkCmd, eC_Bool bOneTime=false)
 
CGUICommandPtr GetAdditionalCmd (const eC_UInt &uiIndex) const
 
eC_UInt GetNumberOfAdditionalCmds () const
 
eC_UInt GetPriority () const
 
eC_UInt GetTimeUntilNextExecution () const
 
eC_Bool IsFinished () const
 
void RemoveAdditionalCmd (CGUICommandPtr pkCmd)
 
void RemoveAllAdditionalCmds ()
 Removes all additional commands from this command's list.
 
void SetPriority (eC_UInt uiPriority)
 
void SetTimeUntilNextExecution (eC_UInt uiTime)
 
- Public Member Functions inherited from CGUIStreamableObject
const eC_String & GetXMLTag () const
 
void SetXMLTag (const eC_String &kXMLTag)
 
- Public Member Functions inherited from NSmartPtr::RefCounted
 RefCounted ()
 Create RefCounted object. The reference count is initialized to 0.
 
virtual ~RefCounted ()
 Destroy reference counted object.
 
void AddRef ()
 Increase reference count.
 
eC_Int RefCount () const
 
void Release ()
 
bool Unique () const
 

Static Public Attributes

static const eC_Char XMLTAG_DESTDIALOGFILENAME [] = "DestDialogFileName"
 
- Static Public Attributes inherited from CGUICommand
static const eC_Char XMLTAG_ADDITIONALCMDCOUNT [] = "AdditionalCmdCount"
 XML tag to be used when writing the additional command count into a stream.
 
static const eC_Char XMLTAG_COMMANDCLASSID [] = "CommandClassID"
 XML tag to be used when writing the command class ID into a stream.
 
static const eC_Char XMLTAG_REMOVE_AFTER_EXECUTION [] = "RemoveAfterExecution"
 XML tag to be used when writing the remove after execution flag.
 
- Static Public Attributes inherited from CGUIStreamableObject
static const eC_Char XMLTAG_CLASSVERSION [] = "ClassVersion"
 

Protected Member Functions

void Do ()
 
void Init ()
 Helper for initialization.
 
- Protected Member Functions inherited from CGUICommand
 CGUICommand (const eC_UInt uiPriority=0, const eC_UInt uiTimeUntilFirstExecution=0, const eC_Bool bFinished=true)
 
virtual ~CGUICommand ()
 Destructor.
 
void SetToBeFinished (eC_Bool bIsFinished)
 
- 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

ObjectHandle_t m_eDest
 ID of object to be deleted.
 
CGUIEasing::EasingType_t m_eEasingType
 Easing Type to be used for dialog change.
 
ObjectHandle_t m_eSource
 ID of object to be deleted.
 
TransitionType_t m_eTransitionType
 Transition Type to be used for dialog change.
 
eC_String m_kDestFileName
 File name of the dialog to be loaded.
 
CGUITransitionBasem_pTransition
 Transition to be used for dialog change.
 
eC_UInt m_uiTransitionTime
 Total duration of transition in ms.
 

Detailed Description

Transits from a source dialog to a destination dialog.

This command loads a GUI definition which results in a new CGUIObject. The new object will be added to the parent of the source object. A transition is computed from source CGUIObject to the new one. The source object will be deleted when the transition has finished.

If something goes wrong while streaming (loading the GUI definition), this command does not delete any GUI objects.

Constructor & Destructor Documentation

◆ CGUITransitionCmd() [1/5]

CGUITransitionCmd::CGUITransitionCmd ( CGUITransitionBase pTransition,
ObjectHandle_t  eSource,
const eC_String &  rkDestFileName 
)

Constructs a TransitionCmd.

Parameters
pTransitionTransition to be used for dialog change
eSourceID of an object to transit from. To be deleted when this transition is finished.
rkDestFileNameFile name of the dialog to be loaded.

◆ CGUITransitionCmd() [2/5]

CGUITransitionCmd::CGUITransitionCmd ( CGUITransitionCmd::TransitionType_t  eTransType,
ObjectHandle_t  eSource,
const eC_String &  rkDestFileName 
)

Constructs a TransitionCmd.

Parameters
eTransTypeTransition type to be used for dialog change
eSourceID of an object to transit from. To be deleted when this transition is finished.
rkDestFileNameFile name of the dialog to be loaded.

◆ CGUITransitionCmd() [3/5]

CGUITransitionCmd::CGUITransitionCmd ( CGUITransitionCmd::TransitionType_t  eTransType,
ObjectHandle_t  eSource,
const eC_String &  rkDestFileName,
eC_UInt  uiTransitionTime 
)

Constructs a TransitionCmd.

Parameters
eTransTypeTransition type to be used for dialog change
eSourceID of an object to transit from. To be deleted when this transition is finished.
rkDestFileNameFile name of the dialog to be loaded.
uiTransitionTimeThe transition time

◆ CGUITransitionCmd() [4/5]

CGUITransitionCmd::CGUITransitionCmd ( CGUITransitionCmd::TransitionType_t  eTransType,
ObjectHandle_t  eSource,
ObjectHandle_t  eDest 
)

Constructs a TransitionCmd.

Parameters
eTransTypeTransition type to be used for dialog change
eSourceID of an object to transit from. To be deleted when this transition is finished.
eDestDialog to be transitioned to.

◆ CGUITransitionCmd() [5/5]

CGUITransitionCmd::CGUITransitionCmd ( CGUITransitionCmd::TransitionType_t  eTransType,
ObjectHandle_t  eSource,
ObjectHandle_t  eDest,
eC_UInt  uiTransitionTime 
)

Constructs a TransitionCmd.

Parameters
eTransTypeTransition type to be used for dialog change
eSourceID of an object to transit from. To be deleted when this transition is finished.
eDestDialog to be transitioned to.
uiTransitionTimeThe transition time

Member Function Documentation

◆ Do()

void CGUITransitionCmd::Do ( )
protectedvirtual

Action of the command object. Must be implemented in the derived class.

Implements CGUICommand.

◆ GetDestinationFileName()

const eC_String & CGUITransitionCmd::GetDestinationFileName ( ) const

Gets tthe destination filename.

Returns
type of transition.

◆ GetDestinationObjectID()

ObjectHandle_t CGUITransitionCmd::GetDestinationObjectID ( ) const

Gets the ObjectID of the transition destination.

Returns
ObjectID of transition destination.

◆ GetSourceObjectID()

ObjectHandle_t CGUITransitionCmd::GetSourceObjectID ( ) const

Gets the ObjectID of the transition source.

Returns
ObjectID of transition source.

◆ GetTransitionTime()

eC_UInt CGUITransitionCmd::GetTransitionTime ( ) const

Gets the time a transition takes.

Returns
the transition time.

◆ GetTransitionType()

CGUITransitionCmd::TransitionType_t CGUITransitionCmd::GetTransitionType ( ) const

Gets the transition type of the transition.

Returns
type of transition.

◆ ReadFromStream()

void CGUITransitionCmd::ReadFromStream ( )
virtual

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

See also
CGUIObject::ReadFromStream()

Reimplemented from CGUICommand.

◆ SetDestinationFileName()

void CGUITransitionCmd::SetDestinationFileName ( eC_String &  kDestFileName)

Sets the destination filename.

Parameters
kDestFileNameThe path to the file containing the destination dialog.

◆ SetDestinationObjectID()

void CGUITransitionCmd::SetDestinationObjectID ( ObjectHandle_t  eDest)

Sets the ObjectID of the transition destination.

Parameters
eDestObjectID of transition destination.

◆ SetSourceObjectID()

void CGUITransitionCmd::SetSourceObjectID ( ObjectHandle_t  eSource)

Sets the ObjectID of the transition source.

Parameters
eSourceObjectID of transition source.

◆ SetTransitionTime()

void CGUITransitionCmd::SetTransitionTime ( eC_UInt  uiTransitionTime)

Sets the Time a transition takes.

Parameters
uiTransitionTimeTime transition will need to switch from source to destination.

◆ SetTransitionType()

void CGUITransitionCmd::SetTransitionType ( CGUITransitionCmd::TransitionType_t  eTransitionType)

Sets the transition type of the transition.

Parameters
eTransitionTypetype of transition.

◆ WriteToStream()

void CGUITransitionCmd::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 CGUICommand.

Member Data Documentation

◆ XMLTAG_DESTDIALOGFILENAME

const eC_Char CGUITransitionCmd::XMLTAG_DESTDIALOGFILENAME = "DestDialogFileName"
static

XML tag used to indicate a target dialog filename to load.


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