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

A specialization of CGUIAnimatedImage that shows zooming and fading effects for image transitions. More...

#include <GUIImageStack.h>

Inheritance diagram for CGUIImageStack:

Public Member Functions

 CGUIImageStack (CGUICompositeObject *const pParent, const eC_Value &vX, const eC_Value &vY, const eC_Value &vWidth, const eC_Value &vHeight, eC_UInt uiFrameDelay, const ObjectHandle_t &eID=NO_HANDLE)
 
 CGUIImageStack ()
 Default constructor for factories.
 
virtual ~CGUIImageStack ()
 Destructor.
 
virtual void DoAnimate (const eC_Value &vTimes=eC_FromInt(1))
 
eC_Bool DoButtonDown (const eC_Value &vAbsX, const eC_Value &vAbsY)
 
eC_Bool DoDrag (const eC_Value &vDeltaX, const eC_Value &vDeltaY, const eC_Value &vAbsX, const eC_Value &vAbsY)
 
virtual eC_Bool DoDraw ()
 
eC_Bool DoKeyDown (const GUIKeyIdentifier_t &eKeyID, const eC_UInt &uiModifiers)
 
eC_UInt GetFrameDelay () const
 
ImageResource_t GetImage (const eC_UInt &uiIndex) const
 
eC_UInt GetIndexOfVisibleImage () const
 
eC_Value GetMaximumZoomFactor () const
 
eC_Value GetMinimumZoomFactor () const
 
eC_UInt GetNumberOfImages () const
 
eC_Value GetStaticZoomFactor () const
 
virtual void ReadFromStream ()
 
void SetAnimationIndex (const eC_UInt &uiIndex)
 
void SetFrameDelay (const eC_UInt &uiMs)
 
void SetImages (eC_TArray< ImageResource_t > &aImages)
 
void SetMaximumZoomFactor (eC_Value vMaxFactor)
 
void SetMinimumZoomFactor (eC_Value vMinFactor)
 
void SetStaticZoomFactor (eC_Value vStaticFactor)
 
virtual eC_Bool SetValue (const CGUIValue &rkValue)
 
void ShowNext ()
 
void ShowPrevious ()
 
void StartAnimation ()
 Starts the animation.
 
void StopAnimation ()
 Immediately stops the animation.
 
virtual void WriteToStream (const eC_Bool bWriteClassID=false)
 
- Public Member Functions inherited from CGUIImage
 CGUIImage (CGUICompositeObject *const pParent, const eC_Value &vX, const eC_Value &vY, const eC_Value &vWidth, const eC_Value &vHeight, const ImageResource_t &eImageID, const eC_Bool &bStretchBlit=true, const ObjectHandle_t &eID=NO_HANDLE)
 
 CGUIImage (CGUICompositeObject *const pParent, const CGUIRect &kRect, const ImageResource_t &eImageID, const eC_Bool &bStretchBlit=true, const ObjectHandle_t &eID=NO_HANDLE)
 
 CGUIImage (CGUICompositeObject *const pParent, const eC_Value &vX, const eC_Value &vY, const ImageResource_t &eImageID, const ObjectHandle_t &eID=NO_HANDLE)
 
 CGUIImage (const CGUIImage &kSource)
 
 CGUIImage ()
 
BlitType_t GetBlitType () const
 
ImageResource_t GetImageID () const
 
CGUINinePatchGetNinePatch ()
 
eC_Bool GetStretchBlit () const
 
virtual eC_Bool IsHighlightable () const
 
CGUIImageoperator= (const CGUIImage &kSource)
 
void SetBlitType (const BlitType_t &eBlitType)
 
void SetImage (const ImageResource_t &eImage, const eC_Bool &bFitToImage=false)
 
void SetStretchBlit (eC_Bool bStretchBlit)
 
- Public Member Functions inherited from CGUIObject
 CGUIObject (CGUICompositeObject *const pParent, const eC_Value &vX, const eC_Value &vY, const eC_Value &vWidth, const eC_Value &vHeight, const ObjectHandle_t &eID=NO_HANDLE)
 
 CGUIObject (CGUICompositeObject *const pParent, const CGUIRect &kRect, const ObjectHandle_t &eID=NO_HANDLE)
 
 CGUIObject ()
 
 CGUIObject (const CGUIObject &kSource)
 
virtual ~CGUIObject ()
 
void AddValueObserver (CGUIObserver *pObserver)
 
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 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
 
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
 
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 RefreshLayout (CGUILayouter::eMovedEdges_t eMovedEdges) const
 
void RemoveValueObserver (CGUIObserver *pObserver)
 
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 *pBehaviour)
 
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 pParent)
 
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)
 
virtual eC_Bool SetValue (CDataPoolEntry &rkValue)
 
virtual void SetWidth (const eC_Value &vX)
 
- Public Member Functions inherited from CGUIBehaviour
virtual eC_Bool DoUserEvent (CGUIEvent *const pEvent)
 
virtual void OnCreate ()
 
virtual void OnDelete ()
 
virtual void OnHide ()
 
virtual void OnShow ()
 
virtual eC_Bool DoClick (const eC_Value &vAbsX=eC_FromInt(-1), const eC_Value &vAbsY=eC_FromInt(-1))
 
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 DoButtonUp (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 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 DoScrollUp (const eC_Value &vAbsX, const eC_Value &vAbsY)
 
virtual eC_Bool DoScrollDown (const eC_Value &vAbsX, const eC_Value &vAbsY)
 
virtual eC_Bool DoScrollLeft (const eC_Value &vAbsX, const eC_Value &vAbsY)
 
virtual eC_Bool DoScrollRight (const eC_Value &vAbsX, const eC_Value &vAbsY)
 
- Public Member Functions inherited from CGUIStreamableObject
const eC_String & GetXMLTag () const
 
void SetXMLTag (const eC_String &kXMLTag)
 
- Public Member Functions inherited from CGUIAnimatable
virtual ~CGUIAnimatable ()
 Destructor. Removes all existing animation callbacks.
 
virtual eC_Bool IsAnimating () const
 

Protected Types

enum  AnimationDirection { AD_NONE, AD_IN, AD_OUT }
 Internal animation direction types. More...
 

Protected Member Functions

void BlitScaledImage (ImageResource_t eID, eC_Value vScale, eC_Value vYOffset, eC_UByte ubAlpha)
 
- 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_TArray< ImageResource_tm_aImageIDs
 Array of image ids within animation.
 
AnimationDirection m_eDirection
 Current animation direction.
 
eC_UInt m_uiFrameDelay
 Time in milliseconds how long a single image of the animation will be displayed.
 
eC_UInt m_uiVisibleImageIndex
 Index of currently displayed image in array of images.
 
eC_Value m_vAnimationPercentage
 Animation progress in percent.
 
eC_Value m_vDragStartY
 Starting position of last drag event in absolute coordinates.
 
eC_Value m_vMaxScale
 
eC_Value m_vMinScale
 
eC_Value m_vStaticScale
 

Additional Inherited Members

- Public Types inherited from CGUIImage
enum  BlitType_t { IBT_CENTER, IBT_STRETCH, IBT_TILED }
 enum for blitting-type More...
 
- Public Types inherited from CGUIObject
enum  FourWayFocus_t { FOCUS_LEFT, FOCUS_RIGHT, FOCUS_UP, FOCUS_DOWN }
 
- Static Public Attributes inherited from CGUIObject
static const eC_Char XMLTAG_ALPHA [] = "Alpha"
 XML tag to be used writing alpha-value into a stream.
 
static const eC_Char XMLTAG_CLICKTHROUGH [] = "ClickThrough"
 XML tag to be used writing clickthrough-state into a stream.
 
static const eC_Char XMLTAG_CONTROLCLASSID [] = "ControlClassID"
 XML tag to be used when writing a control class ID into a stream.
 
static const eC_Char XMLTAG_DISABLED [] = "Disabled"
 XML tag to be used writing disabled-state into a stream.
 
static const eC_Char XMLTAG_FOCUSSABLE [] = "Focussable"
 XML tag to be used writing focussable-state into a stream.
 
static const eC_Char XMLTAG_GRAYEDOUT [] = "GrayedOut"
 XML tag to be used writing grayedout-state into a stream.
 
static const eC_Char XMLTAG_HEIGHT [] = "Height"
 XML tag to be used writing height into a stream.
 
static const eC_Char XMLTAG_INVISIBLE [] = "Invisible"
 XML tag to be used writing invisible-state into a stream.
 
static const eC_Char XMLTAG_OBJECTID [] = "ObjectID"
 XML tag to be used writing object id into a stream.
 
static const eC_Char XMLTAG_OVERRIDDENNEIGHBORS [] = "OverriddenNeighbors"
 XML tag to be used writing overridden neighbors into a stream.
 
static const eC_Char XMLTAG_WIDTH [] = "Width"
 XML tag to be used writing width into a stream.
 
static const eC_Char XMLTAG_XPOS [] = "XPos"
 XML tag to be used writing x-position into a stream.
 
static const eC_Char XMLTAG_YPOS [] = "YPos"
 XML tag to be used writing y-position into a stream.
 
- Static Public Attributes inherited from CGUIBehaviour
static const eC_Char XMLTAG_BEHAVIOURCLASSID [] = "BehaviourClassID"
 XML tag to be used when writing a behaviour class ID into a stream.
 
- Static Public Attributes inherited from CGUIStreamableObject
static const eC_Char XMLTAG_CLASSVERSION [] = "ClassVersion"
 

Detailed Description

A specialization of CGUIAnimatedImage that shows zooming and fading effects for image transitions.

image_stack.png
The "image stack" control is a specialized animated image that shows zooming and fading effects for image transitions (Class: CGUIImageStack).

The base class' list of image IDs is used here for showing pseudo 3D transitions: one image fades out into the background while getting smaller, another one comes in from the front, getting smaller and fading in. The opposite direction works similarly: the images appear to come from the back to the front while fading. These animations can be started by calling ShowNext() and ShowPrevious().

If this control is focusable, it reacts to GK_PAGEUP and GK_PAGEDOWN presses by calling ShowNext() and ShowPrevious(), respectively.

Alternatively you may operate it via mouse/touch, by dragging in vertical direction.

The minimum and maximum scale factors for the animation can be freely modified, as well as the scale factor for the static image that is displayed when no animation is running. A scale factor is a multiplier that is applied to the displayed image with this control's size as the base. A factor of 1.0 means the exact size of this control, 0.5 means half the size and so on. The aspect ratio of the original images are ignored, the images are always stretched with the scale factors applied to width and height. During animations, the front image's size changes from the maximum scale to the static scale (or vice versa), and the back image's size changes from the static scale to the minimum scale (or vice versa).

The frame delay (CGUIAnimatedImage::SetFrameDelay()) is re-used as the time between static images.

Example:

// Create an ImageStack
CGUIImageStack* pImageStack = new CGUIImageStack(this, eC_FromInt(100), eC_FromInt(100), eC_FromInt(200), eC_FromInt(200), 500);
// Add some images to it
eC_TArray<ImageResource_t> kImages;
kImages.AddElement(IMG_STDCTRL_IMGBTN_STANDARD);
kImages.AddElement(GUILIANI_LOGO);
kImages.AddElement(IMG_STDCTRL_IMGBTN_FOCUSED);
pImageStack->SetImages(kImages);
// Show the image at index 1
pImageStack->SetAnimationIndex(1);
// Set target size of image when fading out
pImageStack->SetMinimumZoomFactor(eC_FromFloat(0.1));
// Set size of visible image while there is no animation ongoing
pImageStack->SetStaticZoomFactor(eC_FromFloat(0.5));
// Set target size of image when fading in
pImageStack->SetMaximumZoomFactor(eC_FromFloat(1.0));
// Return the index of the image which is currently visible
pImageStack->GetIndexOfVisibleImage();

Member Enumeration Documentation

◆ AnimationDirection

Internal animation direction types.

Enumerator
AD_NONE 

No current animation.

AD_IN 

Animating "into the screen" (front to back).

AD_OUT 

Animating "out of the screen" (back to front).

Constructor & Destructor Documentation

◆ CGUIImageStack()

CGUIImageStack::CGUIImageStack ( CGUICompositeObject *const  pParent,
const eC_Value &  vX,
const eC_Value &  vY,
const eC_Value &  vWidth,
const eC_Value &  vHeight,
eC_UInt  uiFrameDelay,
const ObjectHandle_t eID = NO_HANDLE 
)

Constructs an empty image stack.

Parameters
pParentPointer to the parent object of this image.
vXThe x coordinate of the upper left corner of this image stack.
vYThe y coordinate of the upper left corner of this image stack.
vWidthThe width of this image stack.
vHeightThe height of this image stack.
uiFrameDelayTime in milliseconds between static images.
eIDObject Identifier of this object.

Member Function Documentation

◆ BlitScaledImage()

void CGUIImageStack::BlitScaledImage ( ImageResource_t  eID,
eC_Value  vScale,
eC_Value  vYOffset,
eC_UByte  ubAlpha 
)
protected

Helper for DoDraw().

Parameters
eIDID of the image to be drawn.
vScaleScale factor to be used (relative to control dimensions).
vYOffsetY offset for the image.
ubAlphaAlpha value to be used for blitting.

◆ DoAnimate()

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

Animation implementation which cycles through all images within this instance of CGUIAnaimatedImage.

Parameters
vTimesnumber of cycles since last execution

Reimplemented from CGUIAnimatable.

◆ DoButtonDown()

eC_Bool CGUIImageStack::DoButtonDown ( const eC_Value &  vAbsX,
const eC_Value &  vAbsY 
)
virtual

Called when the mouse button or finger is pressed down over an object.

Note
DoButtonDown() should work on the absolute positions of this object, that were set at the time of the passed redraw, as the user expects to click on what he sees and not to click on the object in a newer and probably intermediate state that he currently does not see in this state. Thus, to calculate the relative position (where the object was pressed relative to the origin of this object) from the vAbsY argument you must do it like this: vMyRelYPos = vAbsY - GetAbsYPos().
Parameters
vAbsXX-position in screen coordinates where the click occurred
vAbsYY-position in screen coordinates where the click occurred
Returns
True The event has been handled.
False The event has not been handled. In this base implementation always returns False.

Reimplemented from CGUIBehaviour.

◆ DoDrag()

eC_Bool CGUIImageStack::DoDrag ( const eC_Value &  vDeltaX,
const eC_Value &  vDeltaY,
const eC_Value &  vAbsX,
const eC_Value &  vAbsY 
)
virtual

Enables control via mouse/touch. Dragging in Y-direction by more than half of the object's height will show the next/previous image within the stack.

Parameters
vDeltaXMouse movement in X since last frame
vDeltaYMouse movement in Y since last frame
vAbsXMouse position in X where event occurred
vAbsYMouse position in Y where event occurred
Returns
Always False

Reimplemented from CGUIBehaviour.

◆ DoDraw()

eC_Bool CGUIImageStack::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 CGUIImage.

◆ DoKeyDown()

eC_Bool CGUIImageStack::DoKeyDown ( const GUIKeyIdentifier_t eKeyID,
const eC_UInt &  uiModifiers 
)
virtual

Reacts to GK_PAGEUP and GK_PAGEDOWN presses. Calls ShowNext() or ShowPrevious() respectively.

Parameters
eKeyIDThe Guiliani key identifier.
uiModifiersThe key modifiers bitfield.
Returns
True if GK_PAGEUP or GK_PAGEDOWN have been handled, otherwise False.

Reimplemented from CGUIBehaviour.

◆ GetFrameDelay()

eC_UInt CGUIImageStack::GetFrameDelay ( ) const

Returns the current frame delay.

Returns
The time in milliseconds between individual images.
See also
SetFrameDelay

◆ GetImage()

ImageResource_t CGUIImageStack::GetImage ( const eC_UInt &  uiIndex) const

Returns the image stored at the given index of the array or DUMMY_IMAGE if index is out of range.

Parameters
uiIndexImage at position to return.
Returns
image stored at the given index of the array or DUMMY_IMAGE if index is out of range.

◆ GetIndexOfVisibleImage()

eC_UInt CGUIImageStack::GetIndexOfVisibleImage ( ) const

Returns the index of the currently visible image within the array of images. See SetImages().

Returns
Index of the currently visible image

◆ GetMaximumZoomFactor()

eC_Value CGUIImageStack::GetMaximumZoomFactor ( ) const
inline
Returns
The scale multiplier for the maximum zoom level.
See also
SetMaximumZoomFactor()

◆ GetMinimumZoomFactor()

eC_Value CGUIImageStack::GetMinimumZoomFactor ( ) const
inline
Returns
The scale multiplier for the minimum zoom level.
See also
SetMinimumZoomFactor()

◆ GetNumberOfImages()

eC_UInt CGUIImageStack::GetNumberOfImages ( ) const

Returns the number of images currently loaded to determine the framedelay when having a constant cycle-time.

Returns
Number of currently used images

◆ GetStaticZoomFactor()

eC_Value CGUIImageStack::GetStaticZoomFactor ( ) const
inline
Returns
The scale multiplier for the static zoom level.
See also
SetStaticZoomFactor()

◆ ReadFromStream()

void CGUIImageStack::ReadFromStream ( )
virtual

Reads all object attributes from streaming file. This method is called by CGUIFactoryManager after one of the registered factories has created an instance of this class.

Reimplemented from CGUIImage.

◆ SetAnimationIndex()

void CGUIImageStack::SetAnimationIndex ( const eC_UInt &  uiIndex)

Forces the animation to continue with the image at the given index. The index refers to the position of the image in the array which was handed over during the call to SetImages(). Illegal index values will be clipped by a modulo operation to the range of the array.

Parameters
uiIndexIndex of image within the array of images for animation

◆ SetFrameDelay()

void CGUIImageStack::SetFrameDelay ( const eC_UInt &  uiMs)

Sets the time in milliseconds before displaying the next image of the animation, thus defining the animation speed.

Parameters
uiMsTime in milliseconds before displaying the next image. (Supplying 0 will halt the animation)

◆ SetImages()

void CGUIImageStack::SetImages ( eC_TArray< ImageResource_t > &  aImages)

Sets the images which will be displayed while animating this control. You can supply any number of images, which will then be shown in a flip-book manner at a configurable speed (

See also
SetFrameDelay). The images will be displayed in the order in which they are present within the array that is being handed over to SetImages. Any formerly set images will be overwritten.
Parameters
aImagesArray of ImageResource identifiers of images.

◆ SetMaximumZoomFactor()

void CGUIImageStack::SetMaximumZoomFactor ( eC_Value  vMaxFactor)
inline

Sets the scale multiplier for the maximum zoom level. This factor is used for the image that is displayed at the 'front' during animations. It is relative to this controls size, i.e,. a factor of 1.0 means that the fully-zoomed image has the same size as this control.

Parameters
vMaxFactorMaximum scale factor.

◆ SetMinimumZoomFactor()

void CGUIImageStack::SetMinimumZoomFactor ( eC_Value  vMinFactor)
inline

Sets the scale multiplier for the minimum zoom level. This factor is used for the image that is displayed in the 'back' during animations. It is relative to this controls size, i.e., a factor of 1.0 means that the fully-zoomed image has the same size as this control.

Parameters
vMinFactorMinimum scale factor.

◆ SetStaticZoomFactor()

void CGUIImageStack::SetStaticZoomFactor ( eC_Value  vStaticFactor)
inline

Sets the scale multiplier for the static zoom level. This factor is used for the image that is displayed when no animation is running. It is relative to this controls size, i.e., a factor of 1.0 means that the fully-zoomed image has the same size as this control.

Parameters
vStaticFactorStatic scale factor.

◆ SetValue()

virtual eC_Bool CGUIImageStack::SetValue ( const CGUIValue rkValue)
inlinevirtual

Sets the animation index to the given value.

See also
SetAnimationIndex()
Parameters
rkValueThe CGUIValue containing the new value
Returns
Always True.

Reimplemented from CGUIObject.

◆ ShowNext()

void CGUIImageStack::ShowNext ( )

Starts an animation to show the next image. If there are less than two images in the list, this method does nothing.

◆ ShowPrevious()

void CGUIImageStack::ShowPrevious ( )

Starts an animation to show the previous image. If there are less than two images in the list, this method does nothing.

◆ WriteToStream()

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

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

Parameters
bWriteClassIDThis flag is used to select if writing of ControlID, leading and trailing tags is performed.

Reimplemented from CGUIImage.

Member Data Documentation

◆ m_vMaxScale

eC_Value CGUIImageStack::m_vMaxScale
protected

The scale multiplier for the maximum zoom level (relative to this control's size).

◆ m_vMinScale

eC_Value CGUIImageStack::m_vMinScale
protected

The scale multiplier for the minimum zoom level (relative to this control's size).

◆ m_vStaticScale

eC_Value CGUIImageStack::m_vStaticScale
protected

The scale multiplier for the 'static' zoom level (relative to this control's size).


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