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

Button specialization that softly blends between the button's different states. More...

#include <GUIBlendButton.h>

Inheritance diagram for CGUIBlendButton:

Public Member Functions

 CGUIBlendButton (CGUICompositeObject *const pkParent, const eC_Value &vX, const eC_Value &vY, const eC_Value &vWidth, const eC_Value &vHeight, const eC_String &rkText, CGUICommandPtr pkCommandObject, const ObjectHandle_t &eID=NO_HANDLE)
 
 CGUIBlendButton (CGUICompositeObject *const pkParent, const eC_Value &vX, const eC_Value &vY, const eC_Value &vWidth, const eC_Value &vHeight, const TextResource_t &eTextID, CGUICommandPtr pkCommandObject, const ObjectHandle_t &eID=NO_HANDLE)
 
 CGUIBlendButton (const CGUIBlendButton &kSource)
 
virtual eC_Bool DoDraw ()
 
eC_UInt GetBlendDuration () const
 
eC_Bool GetCrossFade () const
 
CGUIBlendButtonoperator= (const CGUIBlendButton &kSource)
 
virtual void ReadFromStream ()
 
void SetBlendDuration (const eC_UInt &uiBlendDuration)
 
void SetCrossFade (const eC_Bool &bCrossFade)
 
virtual void WriteToStream (const eC_Bool bWriteClassID=false)
 
- Public Member Functions inherited from CGUIButton
 CGUIButton ()
 
 CGUIButton (CGUICompositeObject *const pkParent, const CGUIRect &kRect, const eC_String &rkText, CGUICommandPtr pkCommandObject, const ObjectHandle_t &eID=NO_HANDLE)
 
 CGUIButton (CGUICompositeObject *const pkParent, const CGUIRect &kRect, const TextResource_t &eTextID, CGUICommandPtr pkCommandObject, const ObjectHandle_t &eID=NO_HANDLE)
 
 CGUIButton (CGUICompositeObject *const pkParent, const eC_Value &vX, const eC_Value &vY, CGUICommandPtr pkCommandObject, const ImageResource_t &eBtnStandard, const ImageResource_t &eBtnPressed=DUMMY_IMAGE, const ImageResource_t &eBtnHighlighted=DUMMY_IMAGE, const ImageResource_t &eBtnGrayedOut=DUMMY_IMAGE, const ImageResource_t &eBtnFocused=DUMMY_IMAGE, const ObjectHandle_t &eID=NO_HANDLE)
 
 CGUIButton (CGUICompositeObject *const pkParent, const eC_Value &vX, const eC_Value &vY, const eC_Value &vWidth, const eC_Value &vHeight, const eC_String &rkText, CGUICommandPtr pkCommandObject, const ObjectHandle_t &eID=NO_HANDLE)
 
 CGUIButton (CGUICompositeObject *const pkParent, const eC_Value &vX, const eC_Value &vY, const eC_Value &vWidth, const eC_Value &vHeight, const TextResource_t &eTextID, CGUICommandPtr pkCommandObject, const ObjectHandle_t &eID=NO_HANDLE)
 
 CGUIButton (const CGUIButton &kSource)
 
virtual ~CGUIButton ()
 
eC_Bool DoDraw ()
 
CGUIRect GetBlitRect () const
 
BlitType_t GetBlitType () const
 
void GetImages (ImageResource_t &eBtnStandard, ImageResource_t &eBtnPressed, ImageResource_t &eBtnHighlighted, ImageResource_t &eBtnGrayedOut, ImageResource_t &eBtnFocused)
 
CGUINinePatchGetNinePatch ()
 
CGUIButtonoperator= (const CGUIButton &kSource)
 
virtual void ReadFromStream ()
 
void SetBlitRect (const CGUIRect &kBlitRect)
 
void SetBlitType (const BlitType_t &eBlitType)
 
void SetImages (const ImageResource_t &eBtnStandard, const ImageResource_t &eBtnPressed, const ImageResource_t &eBtnHighlighted, const ImageResource_t &eBtnGrayedOut, const ImageResource_t &eBtnFocused)
 
void SetStandardImages ()
 
virtual void WriteToStream (const eC_Bool bWriteClassID=false)
 
- Public Member Functions inherited from CGUIBaseButton
 CGUIBaseButton ()
 
 CGUIBaseButton (CGUICompositeObject *const pkParent, const CGUIRect &kRect, const eC_String &kText, CGUICommandPtr pkCommandObject, const ObjectHandle_t &eID=NO_HANDLE)
 
 CGUIBaseButton (CGUICompositeObject *const pkParent, const CGUIRect &kRect, const TextResource_t &eTextID, CGUICommandPtr pkCommandObject, const ObjectHandle_t &eID=NO_HANDLE)
 
 CGUIBaseButton (CGUICompositeObject *const pkParent, const eC_Value &vX, const eC_Value &vY, const eC_Value &vWidth, const eC_Value &vHeight, const eC_String &kText, CGUICommandPtr pkCommandObject, const ObjectHandle_t &eID=NO_HANDLE)
 
 CGUIBaseButton (CGUICompositeObject *const pkParent, const eC_Value &vX, const eC_Value &vY, const eC_Value &vWidth, const eC_Value &vHeight, const TextResource_t &eTextID, CGUICommandPtr pkCommandObject, const ObjectHandle_t &eID=NO_HANDLE)
 
 CGUIBaseButton (const CGUIBaseButton &kSource)
 
virtual ~CGUIBaseButton (void)
 
virtual eC_Bool DoButtonDown (const eC_Value &vAbsX=eC_FromInt(-1), const eC_Value &vAbsY=eC_FromInt(-1))
 
virtual eC_Bool DoButtonUp (const eC_Value &vAbsX=eC_FromInt(-1), const eC_Value &vAbsY=eC_FromInt(-1))
 
virtual eC_Bool DoClick (const eC_Value &vAbsX=eC_FromInt(-1), const eC_Value &vAbsY=eC_FromInt(-1))
 
virtual eC_Bool DoDraw ()
 
CGUICommandPtr GetCommand () const
 
CGUITextGetLabel () const
 
CGUIBaseButtonoperator= (const CGUIBaseButton &kSource)
 
virtual void ReadFromStream ()
 
void SetCommand (CGUICommandPtr pkCommand)
 
virtual void SetHeight (const eC_Value &vNewHeight)
 
void SetLabel (const eC_String &kString)
 
void SetLabel (const TextResource_t &eTextID)
 
void SetText (CGUIText *pkText)
 
virtual eC_Bool SetValue (const CGUIValue &rkValue)
 
virtual void SetWidth (const eC_Value &vNewWidth)
 
virtual void WriteToStream (const eC_Bool bWriteClassID=false)
 
- Public Member Functions inherited from CGUIObject
 CGUIObject ()
 
 CGUIObject (CGUICompositeObject *const pkParent, const CGUIRect &kRect, const ObjectHandle_t &eID=NO_HANDLE)
 
 CGUIObject (CGUICompositeObject *const pkParent, const eC_Value &vX, const eC_Value &vY, const eC_Value &vWidth, const eC_Value &vHeight, const ObjectHandle_t &eID=NO_HANDLE)
 
 CGUIObject (const CGUIObject &kSource)
 
virtual ~CGUIObject ()
 
void AddValueObserver (CGUIObserver *pkObserver)
 
eC_Bool CalculateInvalidatedRect (CGUIRect &rRect) const
 
virtual eC_Bool ClaimFocus ()
 
virtual void CreateSnapshot (eC_UInt uiBackColor=0x00)
 
eC_Bool DataPoolConnectorExists () const
 
void DeleteSnapshot ()
 
virtual void DisableSnapshotDrawing (eC_Bool bDeleteSnapshot=true)
 
virtual eC_Bool DoDraw ()
 
virtual eC_Bool DoDrawSnapshot ()
 
virtual void EnableSnapshotDrawing ()
 
virtual CGUIObjectFindObject (const eC_Value &vAbsX, const eC_Value &vAbsY)
 
virtual eC_Bool FocusAny ()
 
virtual eC_Bool FocusNext (CGUIObject *const pRefObj=NULL, const eC_Bool &bSubTreeOfRefObjDone=false)
 
virtual eC_Bool FocusPrevious (CGUIObject *const pRefObj=NULL, const eC_Bool &bSubTreeOfRefObjDone=false)
 
CGUIRect GetAbsRect () const
 
eC_Value GetAbsXPos () const
 
eC_Value GetAbsXPosCenter () const
 
eC_Value GetAbsXPosREdge () const
 
eC_Value GetAbsYPos () const
 
eC_Value GetAbsYPosBEdge () const
 
eC_Value GetAbsYPosCenter () const
 
eC_UByte GetAlpha () const
 
CGUIBehaviourDecoratorGetBehaviour ()
 
const CGUIBehaviourDecoratorGetBehaviour () const
 
GUIBitmapPlaneID_t GetBitmapID () const
 
CGUIBitmapPlaneGetBitmapPlane () const
 
CGUIRect GetCurrentAbsRect () const
 
eC_Value GetCurrentAbsXPos () const
 
eC_Value GetCurrentAbsXPosCenter () const
 
eC_Value GetCurrentAbsXPosREdge () const
 
eC_Value GetCurrentAbsYPos () const
 
eC_Value GetCurrentAbsYPosBEdge () const
 
eC_Value GetCurrentAbsYPosCenter () const
 
CDataPoolConnectorGetDataPoolConnector ()
 
eC_Value GetDistanceBottom () const
 
eC_Value GetDistanceRight () const
 
eC_Value GetHalfHeight () const
 
eC_Value GetHalfWidth () const
 
eC_Value GetHeight () const
 
ObjectHandle_t GetID () const
 
CGUILayouterGetLayouter ()
 
const CGUILayouterGetLayouter () const
 
ObjectHandle_t GetNeighborBottomID () const
 
ObjectHandle_t GetNeighborLeftID () const
 
ObjectHandle_t GetNeighborRightID () const
 
ObjectHandle_t GetNeighborTopID () const
 
CGUIObjectGetObjectByID (const ObjectHandle_t &eID, const eC_Bool &bOnlyVisible=false)
 
const CGUIObjectGetObjectByID (const ObjectHandle_t &eID, const eC_Bool &bOnlyVisible=false) const
 
CGUIRect GetOriginRect () const
 
CGUICompositeObjectGetParent ()
 
const CGUICompositeObjectGetParent () const
 
CGUIRect GetRelRect () const
 
eC_Value GetRelXPos () const
 
eC_Value GetRelXPosCenter () const
 
eC_Value GetRelXPosREdge () const
 
eC_Value GetRelYPos () const
 
eC_Value GetRelYPosBEdge () const
 
eC_Value GetRelYPosCenter () const
 
UUID_t GetUUID () const
 
eC_Value GetWidth () const
 
void InvalidateArea ()
 
eC_Bool IsClickable () const
 
eC_Bool IsClickThrough () const
 
virtual eC_Bool IsCompositeObject () const
 
eC_Bool IsDescendantOf (const CGUIObject *const pAncestor) const
 
eC_Bool IsDisabled () const
 
eC_Bool IsDragable () const
 
eC_Bool IsDragged () const
 
eC_Bool IsDrawingSnapshot () const
 
eC_Bool IsFocussable () const
 
eC_Bool IsFocussed () const
 
eC_Bool IsGrayedOut () const
 
virtual eC_Bool IsHighlightable () const
 
eC_Bool IsHighlighted () const
 
eC_Bool IsInvisible () const
 
eC_Bool IsPressed () const
 
eC_Bool IsStopFocus () const
 
void NotifyValueObservers (const CGUIValue &kValue, const eC_UInt uiX=0, const eC_UInt uiY=0)
 
CGUIObjectoperator= (const CGUIObject &kSource)
 
virtual void ReadFromStream ()
 
virtual void RefreshLayout (CGUILayouter::eMovedEdges_t eMovedEdges) const
 
void RemoveValueObserver (CGUIObserver *pkObserver)
 
void RenderToBitmap (eC_UInt uiBitmapID, eC_Value vXOffset=eC_FromInt(0), eC_Value vYOffset=eC_FromInt(0))
 
eC_Bool RequestFocus ()
 
void SetAlpha (eC_UByte ubAlpha)
 
void SetBehaviour (CGUIBehaviourDecorator *pkBehaviour)
 
void SetClickThrough (const eC_Bool &bClickThrough)
 
virtual void SetDisabled (const eC_Bool &bDisabled)
 
virtual void SetFocussable (const eC_Bool &bFocussable)
 
virtual void SetGrayedOut (const eC_Bool &bGrayOut)
 
virtual void SetHeight (const eC_Value &vY)
 
void SetID (const ObjectHandle_t &eID)
 
virtual void SetInvisible (const eC_Bool &bInvisible)
 
void SetLayouter (CGUILayouter *pLayouter)
 
void SetNeighborBottomID (const ObjectHandle_t eNewNeighborBottomID)
 
void SetNeighborIDs (const ObjectHandle_t eNewNeighborLeftID, const ObjectHandle_t eNewNeighborRightID, const ObjectHandle_t eNewNeighborTopID, const ObjectHandle_t eNewNeighborBottomID)
 
void SetNeighborLeftID (const ObjectHandle_t eNewNeighborLeftID)
 
void SetNeighborRightID (const ObjectHandle_t eNewNeighborRightID)
 
void SetNeighborTopID (const ObjectHandle_t eNewNeighborTopID)
 
virtual void SetParent (CGUICompositeObject *const pkParent)
 
void SetRelRect (const CGUIRect &kNewRect)
 
virtual void SetRelXPos (const eC_Value &vX)
 
void SetRelXPosCenter (const eC_Value &vXCenter)
 
void SetRelXPosREdge (const eC_Value &vX)
 
virtual void SetRelYPos (const eC_Value &vY)
 
void SetRelYPosBEdge (const eC_Value &vY)
 
void SetRelYPosCenter (const eC_Value &vYCenter)
 
void SetStopFocus (const eC_Bool &bDontFocusToParent)
 
void SetUUID (const UUID_t &kUUID)
 
virtual eC_Bool SetValue (CDataPoolEntry &rkValue)
 
virtual eC_Bool SetValue (const CGUIValue &rkValue)
 
virtual void SetWidth (const eC_Value &vX)
 
virtual void WriteToStream (const eC_Bool bWriteClassID=false)
 
- Public Member Functions inherited from CGUIBehaviour
virtual eC_Bool DoScale (const eC_Value &vDelta)
 
virtual eC_Bool DoUserEvent (CGUIEvent *const pEvent)
 
virtual void OnCreate ()
 
virtual void OnDataPool (const DataPoolResource_t &eID)
 
virtual void OnDelete ()
 
virtual void OnHide ()
 
virtual void OnShow ()
 
virtual eC_Bool DoLongClick (const eC_Value &vAbsX=eC_FromInt(-1), const eC_Value &vAbsY=eC_FromInt(-1))
 
virtual eC_Bool DoDoubleClick (const eC_Value &vAbsX=eC_FromInt(-1), const eC_Value &vAbsY=eC_FromInt(-1))
 
virtual eC_Bool DoDrag (const eC_Value &vDeltaX=eC_FromInt(-1), const eC_Value &vDeltaY=eC_FromInt(-1), const eC_Value &vAbsX=eC_FromInt(-1), const eC_Value &vAbsY=eC_FromInt(-1))
 
virtual eC_Bool DoDragEnd (const eC_Value &vAbsX=eC_FromInt(-1), const eC_Value &vAbsY=eC_FromInt(-1))
 
virtual eC_Bool DoMouseEnter (const eC_Value &vAbsX=eC_FromInt(-1), const eC_Value &vAbsY=eC_FromInt(-1))
 
virtual eC_Bool DoMouseLeave (const eC_Value &vAbsX=eC_FromInt(-1), const eC_Value &vAbsY=eC_FromInt(-1))
 
virtual eC_Bool DoMouseMove (const eC_Value &vAbsX=eC_FromInt(-1), const eC_Value &vAbsY=eC_FromInt(-1))
 
virtual void GetFocus ()
 
virtual void LoseFocus ()
 
virtual eC_Bool Decrease ()
 
virtual eC_Bool Increase ()
 
virtual eC_Bool DoKeyDown (const GUIKeyIdentifier_t &eKeyIdentifier, const eC_UInt &uiModifiers)
 
virtual eC_Bool DoKeyUp (const GUIKeyIdentifier_t &eKeyIdentifier, const eC_UInt &uiModifiers)
 
virtual eC_Bool DoChar (const eC_UInt &uiKey, const GUIKeyIdentifier_t &eKeyIdentifier, const eC_UInt &uiModifiers)
 
virtual eC_Bool DoScroll (const eC_Value &vAbsX, const eC_Value &vAbsY, const eC_Value &vDelta, const eC_Bool &bModifierActive)
 
- 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)
 
- 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 ()
 

Protected Member Functions

virtual void DoAnimate (const eC_Value &vTimes=eC_FromInt(1))
 
void Init ()
 Helper for initialization.
 
- Protected Member Functions inherited from CGUIObject
virtual eC_Bool CreateBitmapPlane ()
 
virtual eC_Bool FourWayNext (FourWayFocus_t eFocusDirection)
 
- 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

eC_Bool m_bCrossFade
 When crossfading the old and new image will be simultaneously blended. Otherwise the new old image is drown fully opaque.
 
ImageResource_t m_eLastFrameImage
 Image which was shown during last frame (used to detect state changes)
 
ImageResource_t m_ePreviousImage
 ImageResource FROM which to blend.
 
eC_UInt m_uiBlendDuration
 Duration of blend transition in milliseconds.
 
eC_Value m_vBlendFactor
 Progress of blending transition (0 to m_uiBlendDuration)
 
- Protected Attributes inherited from CGUIButton
BlitType_t m_eBlitType
 used blitting-type
 
ImageResource_t m_eBtnFocused
 the focused image
 
ImageResource_t m_eBtnGrayedOut
 the grayed out image
 
ImageResource_t m_eBtnHighlighted
 the highlighted image
 
ImageResource_t m_eBtnNormal
 the standard image
 
ImageResource_t m_eBtnPressed
 the pressed image
 
CGUIRect m_kBlitRect
 used blitting-rect for manual-layout
 
CGUINinePatch m_kNinePatch
 the nine patch
 
- Protected Attributes inherited from CGUIBaseButton
CGUICommandPtr m_pkCommandObject
 Holds the attached command.
 
CGUITextm_pkLabel
 Holds the label.
 
- Protected Attributes inherited from CGUIObject
UUID_t m_kUUID
 UUID of object.
 

Additional Inherited Members

- Public Types inherited from CGUIButton
enum  BlitType_t { BBT_CENTER , BBT_MANUAL_LAYOUT , BBT_STRETCH , BBT_TILED }
 enum for blitting-type More...
 
- Public Types inherited from CGUIObject
enum  FourWayFocus_t { FOCUS_LEFT , FOCUS_RIGHT , FOCUS_UP , FOCUS_DOWN }
 
- Static Public Member Functions inherited from CGUIStreamableObject
static UUID_t GenerateUUID ()
 
- Static Public Attributes inherited from CGUIObject
static const eC_Char XMLTAG_ALPHA []
 XML tag to be used writing alpha-value into a stream.
 
static const eC_Char XMLTAG_CLICKTHROUGH []
 XML tag to be used writing clickthrough-state into a stream.
 
static const eC_Char XMLTAG_CONTROLCLASSID []
 XML tag to be used when writing a control class ID into a stream.
 
static const eC_Char XMLTAG_DISABLED []
 XML tag to be used writing disabled-state into a stream.
 
static const eC_Char XMLTAG_FOCUSSABLE []
 XML tag to be used writing focussable-state into a stream.
 
static const eC_Char XMLTAG_GRAYEDOUT []
 XML tag to be used writing grayedout-state into a stream.
 
static const eC_Char XMLTAG_HEIGHT []
 XML tag to be used writing height into a stream.
 
static const eC_Char XMLTAG_INVISIBLE []
 XML tag to be used writing invisible-state into a stream.
 
static const eC_Char XMLTAG_OBJECTID []
 XML tag to be used writing object id into a stream.
 
static const eC_Char XMLTAG_OVERRIDDENNEIGHBORS []
 XML tag to be used writing overridden neighbors into a stream.
 
static const eC_Char XMLTAG_UUID []
 XML tag to be used when writing a UUID into a stream.
 
static const eC_Char XMLTAG_WIDTH []
 XML tag to be used writing width into a stream.
 
static const eC_Char XMLTAG_XPOS []
 XML tag to be used writing x-position into a stream.
 
static const eC_Char XMLTAG_YPOS []
 XML tag to be used writing y-position into a stream.
 
- Static Public Attributes inherited from CGUIBehaviour
static const eC_Char XMLTAG_BEHAVIOURCLASSID []
 XML tag to be used when writing a behaviour class ID into a stream.
 
static const eC_Char XMLTAG_BEHAVIOURCOUNT []
 XML tag for count.
 
- Static Public Attributes inherited from CGUIStreamableObject
static const eC_Char XMLTAG_CLASSVERSION []
 

Detailed Description

Button specialization that softly blends between the button's different states.

The "Blend Button" is a specialized version of the standard CGUIButton, which softly blends between the different button bitmaps if the button's state changes.

The "blend button" is a specialization of the standard CGUIButton class, which softly blends between the various state images instead of simply switching them. Be aware that alpha-blending can be time-consuming on low end platforms, in particular if blending is done using a software-renderer (Class: CGUIBlendButton). Please refer to the base class (CGUIButton) for a general explanation of the button object. The "blend button" supports nine patch images (CGUINinePatch).

Example:

// Create a Blend button.
CGUIBlendButton* pkButton = new CGUIBlendButton(this,
eC_FromInt(0), eC_FromInt(0),
eC_FromInt(15), eC_FromInt(15),
"OK",
NULL, // Replace the NULL with your command.
OBJ_BUTTON);
// Set the images of the button.
// Before calling this method, please add image IDs to UserImageResource.h.
// After that call GETRESMANAGER.RegisterImageResource() method to register images for the IDs.
pkButton->SetImages(
IMG_BT_STANDARD,
IMG_BT_PRESSED,
IMG_BT_HIGHLIGHTED,
IMG_BT_GRAYEDOUT,
IMG_BT_FOCUSED);
// Set Duration of blending transition to 500ms
pkButton->SetBlendDuration(500);
Button specialization that softly blends between the button's different states.
Definition: GUIBlendButton.h:64
void SetBlendDuration(const eC_UInt &uiBlendDuration)
void SetImages(const ImageResource_t &eBtnStandard, const ImageResource_t &eBtnPressed, const ImageResource_t &eBtnHighlighted, const ImageResource_t &eBtnGrayedOut, const ImageResource_t &eBtnFocused)

Constructor & Destructor Documentation

◆ CGUIBlendButton() [1/3]

CGUIBlendButton::CGUIBlendButton ( CGUICompositeObject *const  pkParent,
const eC_Value &  vX,
const eC_Value &  vY,
const eC_Value &  vWidth,
const eC_Value &  vHeight,
const eC_String &  rkText,
CGUICommandPtr  pkCommandObject,
const ObjectHandle_t eID = NO_HANDLE 
)

CGUIBlendButton constructor.

Parameters
pkParentPointer to the designated parent object
vXX-position relative to its parent object
vYY-position relative to its parent object
vWidthWidth of the button
vHeightHeight of the button
rkTextText string that will be displayed on the Button
pkCommandObjectPointer to command object which will be executed in reaction to a click
eIDObject Identifier of this button

◆ CGUIBlendButton() [2/3]

CGUIBlendButton::CGUIBlendButton ( CGUICompositeObject *const  pkParent,
const eC_Value &  vX,
const eC_Value &  vY,
const eC_Value &  vWidth,
const eC_Value &  vHeight,
const TextResource_t eTextID,
CGUICommandPtr  pkCommandObject,
const ObjectHandle_t eID = NO_HANDLE 
)

CGUIBlendButton constructor.

Parameters
pkParentPointer to the designated parent object
vXX-position relative to its parent object
vYY-position relative to its parent object
vWidthWidth of the button
vHeightHeight of the button
eTextIDID of text string to be displayed on the Button
pkCommandObjectPointer to command object which will be executed in reaction to a click
eIDObject Identifier of this button (choose NO_HANDLE if none is required)

◆ CGUIBlendButton() [3/3]

CGUIBlendButton::CGUIBlendButton ( const CGUIBlendButton kSource)

copy-constructor.

Parameters
kSourceSource object to be copied

Member Function Documentation

◆ DoAnimate()

virtual void CGUIBlendButton::DoAnimate ( const eC_Value &  vTimes = eC_FromInt(1))
protectedvirtual

Called when the timer of an animation callback belonging to this animatable has expired.

Parameters
vTimesThe factor of the registered callback time in relation to the actually elapsed time. For example, the elapsed time is 80ms, and the standard time is 50ms, then vTimes is 1.6. If the given time in GETTIMER.AddAnimationCallback is 0, It will be set to -1.

Reimplemented from CGUIAnimatable.

◆ DoDraw()

virtual eC_Bool CGUIBlendButton::DoDraw ( )
virtual

Visualizes the object. It is forbidden to call SetRelXPos, SetRelYPos, SetWidth or SetHeight in DoDraw, i.e., it is not allowed to change the layout.

Returns
True if anything was drawn, False otherwise

Reimplemented from CGUIBaseButton.

◆ GetBlendDuration()

eC_UInt CGUIBlendButton::GetBlendDuration ( ) const

Return the blend-duration

Returns
blend-duration

◆ GetCrossFade()

eC_Bool CGUIBlendButton::GetCrossFade ( ) const

Return the time for cross-fading

Returns
time for cross-fading in milliseconds

◆ operator=()

CGUIBlendButton & CGUIBlendButton::operator= ( const CGUIBlendButton kSource)

CGUIBlendButton operator= to copy the whole CGUIBlendButton.

Parameters
kSourceSource object to be copied
Returns
Copied object

◆ ReadFromStream()

virtual void CGUIBlendButton::ReadFromStream ( )
virtual

Reads all object attributes from streaming file. Only for use with GUIFactory. GUIStreamingFileReader has to be set in CGUI::Init().

See also
CGUIFactory

Reimplemented from CGUIButton.

◆ SetBlendDuration()

void CGUIBlendButton::SetBlendDuration ( const eC_UInt &  uiBlendDuration)

Sets the duration of blending from one state image to the next

Parameters
uiBlendDurationDuration of blending in milliseconds

◆ SetCrossFade()

void CGUIBlendButton::SetCrossFade ( const eC_Bool &  bCrossFade)

Sets the blending mode. If cross-fading is enabled the "old" image will be fading out while the "new" image is fading in. With cross-fading disabled, the "old" image is drawn fully opaque until the "new" image has been blended in entirely.

Parameters
bCrossFadeTrue if cross-fading shall be enabled, false otherwise.

◆ WriteToStream()

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

Writes all object attributes to the streaming file. StreamWriter has to be initialized. Only for use with GUIStreamWriter.

Parameters
bWriteClassIDThis flag is used to select if writing of ControlID, leading and trailing tags is performed. Only GUIStreamWriter and GUICompositeObject have to set this flag true.
See also
CGUIStreamWriter

Reimplemented from CGUIButton.


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