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

Displays a wheel in the GUI. More...

#include <GUIWheel.h>

Inheritance diagram for CGUIWheel:

Classes

struct  NodeInfo
 Contains information about one node. More...
 

Public Types

typedef eC_TListDoubleLinked< NodeInfoNodeList
 Type used for the nodes.
 
- Public Types inherited from CGUIObject
enum  FourWayFocus_t { FOCUS_LEFT, FOCUS_RIGHT, FOCUS_UP, FOCUS_DOWN }
 

Public Member Functions

 CGUIWheel (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)
 
 CGUIWheel ()
 Default constructor.
 
 CGUIWheel (const CGUIWheel &kToBeCopied)
 
virtual void AdaptWheel ()
 
virtual void AddEntry (const eC_String &kEntry, eC_Bool bSort=false)
 
void DeInit ()
 
virtual void DeleteAllEntries ()
 
virtual void DeleteEntry (const eC_String &kEntry)
 
virtual void DoAnimate (const eC_Value &vTimes=eC_FromInt(1))
 
virtual eC_Bool DoButtonDown (const eC_Value &vAbsX, const eC_Value &vAbsY)
 
virtual eC_Bool DoClick (const eC_Value &vAbsX, const eC_Value &vAbsY)
 
virtual eC_Bool DoDrag (const eC_Value &vDeltaX, const eC_Value &vDeltaY, const eC_Value &vAbsX, const eC_Value &vAbsY)
 
virtual eC_Bool DoDragEnd (const eC_Value &vAbsX, const eC_Value &vAbsY)
 
virtual eC_Bool DoDraw ()
 
eC_Bool GetAnimatedUpdate () const
 
virtual eC_UInt GetCurrentIndex ()
 
virtual const eC_String & GetCurrentValue ()
 
CGUICommonEnums::Orientation_t GetDirection () const
 
eC_UInt GetEntriesColor () const
 
FontResource_t GetEntriesFont () const
 
eC_UInt GetFocussedEntryColor () const
 
FontResource_t GetFocussedEntryFont () const
 
eC_Int GetMaxValue ()
 
eC_Int GetMinValue ()
 
CGUINinePatchGetNinePatch ()
 
eC_UInt GetNumberOfEntries ()
 
eC_Int GetStepSize () const
 
void Init ()
 
eC_Bool IsCyclic () const
 
virtual eC_Bool IsHighlightable () const
 
eC_Bool IsUsingRange () const
 
virtual void NormalizeEntry (eC_String &kEntry)
 
virtual void OnColorPropertyChange ()
 
CGUIWheeloperator= (const CGUIWheel &kSource)
 
virtual void ReadFromStream ()
 
virtual void ScrollTo (eC_UInt uiNodeIndex)
 
virtual void ScrollTo (const eC_String &kNodeText)
 
virtual void ScrollToAnimated (eC_UInt uiNodeIndex)
 
virtual void ScrollToAnimated (const eC_String &kNodeText)
 
virtual eC_Int SearchEntry (const eC_String &kNodeText)
 
void SetAnimatedUpdate (const eC_Bool &bAnimatedUpdate)
 
void SetCyclic (eC_Bool bCyclic)
 
void SetDirection (CGUICommonEnums::Orientation_t eDirection)
 
void SetEntriesColor (const eC_UInt &uiEntriesColor)
 
void SetEntriesColor (const GlobalProperty_t &eEntriesColor)
 
void SetEntriesFont (const FontResource_t &eFontID)
 
void SetFocussedEntryColor (const eC_UInt &uiFocussedEntryColor)
 
void SetFocussedEntryColor (const GlobalProperty_t &eFocussedEntryColor)
 
void SetFocussedEntryFont (const FontResource_t &eFontID)
 
virtual void SetHeight (const eC_Value &vHeight)
 
void SetMaxValue (eC_Int iMaxValue)
 
void SetMinValue (eC_Int iMinValue)
 
void SetPostfixString (const eC_String &kPostfixString)
 
void SetStepSize (eC_Int iStepSize)
 
void SetUseRange (eC_Bool bUseRange)
 
virtual eC_Bool SetValue (const CGUIValue &rkValue)
 
virtual void SetWidth (const eC_Value &vWidth)
 
virtual void WriteToStream (const eC_Bool bWriteClassID=false)
 
- 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)
 
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)
 
- 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 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 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 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
 
virtual void StartAnimation ()
 
virtual void StopAnimation ()
 
- Public Member Functions inherited from CGUIColorPropertyObserver
 CGUIColorPropertyObserver ()
 default-constructor
 
 ~CGUIColorPropertyObserver ()
 destructor
 
eC_UInt AddColorProperty (const eC_Bool &bColorIsProperty, const eC_UInt &uiColorValue, const GlobalProperty_t &eColorProperty)
 
void AddColorProperty (const eC_UInt &uiIndex, const eC_Bool &bColorIsProperty, const eC_UInt &uiColorValue, const GlobalProperty_t &eColorProperty)
 
ColorValue_t GetColorProperty (const eC_UInt &uiIndex) const
 
eC_UInt GetColorValue (const eC_UInt &uiIndex) const
 
virtual void OnNotification ()
 Called by CGUISubject whenever an observed object triggers an update.
 
void RemoveColorProperty (const eC_UInt &uiIndex)
 
void SetColorProperty (const eC_UInt &uiIndex, const eC_UInt &uiColorValue)
 
void SetColorProperty (const eC_UInt &uiIndex, const GlobalProperty_t &eColorProperty)
 
void SetColorProperty (const eC_UInt &uiIndex, const ColorValue_t &kColorValue)
 
- Public Member Functions inherited from CGUIObserver
 CGUIObserver ()
 Default constructor.
 
virtual ~CGUIObserver ()
 Default destructor. Notifies all subjects of destruction.
 
const eC_TListDoubleLinked< CGUISubject * > & GetSubjectList () const
 
virtual void OnNotification (const eC_String &kMessage)
 
virtual void OnNotification (const CGUIObject *const pkUpdatedObject)
 
virtual void OnNotification (const CGUIValue &kObservedValue, const CGUIObject *const pkUpdatedObject, const eC_UInt uiX=0, const eC_UInt uiY=0)
 
void SetAutoDelete (const eC_Bool bAutoDelete)
 

Protected Member Functions

virtual void AdjustCurrentScrollPosAndNode (eC_Value vDragDelta)
 
virtual void AdjustNodesRelativePositions ()
 
virtual void AdjustNodesRelativePositionsCyclic ()
 
virtual void AdjustNodesRelativePositionsNotCyclic ()
 
virtual void AdjustSize ()
 
virtual void CreateNodesFromRange ()
 
virtual eC_UInt GetCurrentNode ()
 
virtual NodeList::SafeIterator GetCurrentNodeSafeIter ()
 
virtual eC_Value GetCurrentScrollPosForCurrentDirection ()
 
virtual eC_Value GetDefaultNodeSizeCurrentDirection ()
 
virtual NodeList::Iterator GetNextNodeCyclic (NodeList::Iterator kIter)
 
virtual eC_UInt GetNodeIndexFromIter (const NodeList::Iterator &kNodeIter)
 
virtual void GetNodeIndexInRelPos (eC_Value vOffset, eC_Int &iIndex, eC_Int &iCycle, eC_Value &vScrollPos)
 
NodeListGetNodes ()
 
virtual NodeList::Iterator GetPreviousNodeCyclic (NodeList::Iterator kIter)
 
virtual eC_Value IndexCycleOffsetToPixel (eC_Int iIndex, eC_Int iCycle, eC_Value vOffset)
 Calculates the position in pixels out of entry index, cycle and offset (scrolling position). More...
 
virtual void PixelToIndexCycleOffset (eC_Value vPixel, eC_Int &iIndex, eC_Int &iCycle, eC_Value &vOffset)
 Calculates the index, cycle and offset (scrolling position) out of a pixel position. More...
 
virtual void SetCurrentNode (eC_UInt uiNodeIndex)
 
virtual void SetCurrentNodeSafeIter (const NodeList::SafeIterator &kNodeSafeIter)
 
virtual void SetCurrentScrollPosForCurrentDirection (eC_Value vCurrentScrollPos)
 
virtual void SetDefaultNodeSize (eC_Value vWidth, eC_Value vHeight)
 
virtual void StartScrollingAnimation ()
 
virtual void StopScrollingAnimation ()
 
- 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 Member Functions inherited from CGUIObserver
virtual void AddSubject (CGUISubject *pSubjectToAdd)
 
virtual void RemoveSubject (CGUISubject *pSubjectToRemove)
 

Protected Attributes

eC_Bool m_bAnimatedUpdate
 if updates should animate to value, rather than jump
 
eC_Bool m_bCyclic
 True if wheel is cyclic. False if non-cyclic. The wheel then stops at begin/end of entries.
 
eC_Bool m_bFillFromBegin
 If true entries will be filled in front of entry, if false at end.
 
eC_Bool m_bUseRange
 If true entries will be automatically generated with the use of below values.
 
eC_UInt m_CurrentNodeIndex
 Index of current node.
 
NodeList::SafeIterator m_CurrentNodeSafeIter
 Iterator pointing to the current node/entry.
 
ImageResource_t m_eBGImage
 Used background image.
 
CGUICommonEnums::Orientation_t m_eDirection
 Direction of the wheel. Either horizontal or vertical.
 
CGUIEasing::EasingType_t m_eEasingTypeBack
 Easing for non-cyclic wheel if dragged further then wheel size.
 
CGUIEasing::EasingType_t m_eEasingTypeCurrent
 EasingType used for kinetic animation. More...
 
CGUIEasing::EasingType_t m_eEasingTypeNormal
 Easing used for all animations which will not go further then the wheel end.
 
FontResource_t m_eEntriesFont
 Font of all non focused entries.
 
FontResource_t m_eFocussedEntryFont
 Font of the focused entry.
 
eC_Int m_iAniStartNodeCycle
 Animation start node cycle.
 
eC_Int m_iAniStartNodeIndex
 Animation start node index.
 
eC_Int m_iAniTargetNodeCycle
 Animation target node cycle.
 
eC_Int m_iAniTargetNodeIndex
 Animation target node.
 
eC_Int m_iMaxValue
 Biggest generated entry.
 
eC_Int m_iMinDigitNumber
 Minimal number of digits.
 
eC_Int m_iMinValue
 Smallest generated entry.
 
eC_Int m_iStepSize
 Step size used for entry generation.
 
CGUIPoint m_kDragStart
 Holds the start point of a drag.
 
eC_String m_kFillupString
 String will be used to fill up missing digits.
 
eC_String m_kFocussedValue
 Current focused value.
 
CGUINinePatch m_kNinePatch
 used ninepatch
 
NodeList m_kNodes
 List containing all nodes/entries.
 
eC_String m_kPostfixString
 String will be place behind of entry. Can be used for example for units etc.
 
eC_String m_kPrefixString
 String will be place in front of entry.
 
eC_UInt m_uiDragStarted
 Holds the time when the last drag was started. Used to calculate the drag speed.
 
eC_UInt m_uiDragTimeStamp
 Time at start of animation and Timestamp of last received DoDrag()-Event.
 
eC_UInt m_uiNumOfVisibleNodes
 Number of visible nodes of the wheel.
 
eC_Value m_vAdditionalSpace
 Used for positioning in DoDraw.
 
eC_Value m_vAniStartScrollPos
 Animation start scrolling position.
 
eC_Value m_vAniTargetScrollPos
 Animation target scrolling position.
 
eC_Value m_vCurrentScrollPosX
 Scrolling position of current node (offset in pixels (0-m_vNodeDefaultWidth)).
 
eC_Value m_vCurrentScrollPosY
 Scrolling position of current node (offset in pixels (0-m_vNodeDefaultHeight)).
 
eC_Value m_vEasingDurationBack
 Easing duration for non-cyclic wheel if dragged further then wheel size.
 
eC_Value m_vEasingDurationCurrent
 Duration of easing animation for kinetic scrolling. More...
 
eC_Value m_vEasingDurationNormal
 Easing duration used for all animations which will not go further then the wheel end.
 
eC_Value m_vNodeDefaultHeight
 Entry height in pixels. Has to be > 0.
 
eC_Value m_vNodeDefaultWidth
 Entry width in pixels. Has to be > 0.
 
eC_Value m_vNodeX
 Node horizontal feed rate for the gui text positions.
 
eC_Value m_vNodeY
 Node vertical feed rate for the gui text positions.
 
eC_Value m_vRemainingSpaceX
 If the nodes are not fitting exactly this is the rest space.
 
eC_Value m_vRemainingSpaceY
 If the nodes are not fitting exactly this is the rest space.
 
eC_Value m_vTargetPos
 Target position in pixels for animation.
 

Static Protected Attributes

static const eC_UInt INDEX_COLOR_ENTRY = 0
 index for entry-color
 
static const eC_UInt INDEX_COLOR_FOCUSSEDENTRY = 1
 index for focussed entry color
 

Additional Inherited Members

- 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

Displays a wheel in the GUI.

wheel.png
The "wheel" control is used to display a wheel. The position and dimension of the image can be set freely. The scaling of the background image is arbitrary in x and y dimension - so the aspect ratio can be changed. The "wheel" control is typically used to select a value out of a small number of elements e.g., temperatures. The "wheel" can by endless (means: cyclic).

This control displays a wheel containing a range of values.

Example:

// Create a wheel.
CGUIWheel* pkWheel = new CGUIWheel(this,
eC_FromInt(0), eC_FromInt(0),
eC_FromInt(30), eC_FromInt(30),
OBJ_WHEEL_ID,
);
pkWheel->AddEntry("aaaa");

Constructor & Destructor Documentation

◆ CGUIWheel() [1/2]

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

Constructor

Parameters
pParentPointer to the parent object of this image.
vXThe x coordinate of the upper left corner of this image.
vYThe y coordinate of the upper left corner of this image.
vWidthThe width of this image.
vHeightThe height of this image.
eIDThis wheel's object ID.

◆ CGUIWheel() [2/2]

CGUIWheel::CGUIWheel ( const CGUIWheel kToBeCopied)

Copy constructor

Parameters
kToBeCopied

Member Function Documentation

◆ AdaptWheel()

void CGUIWheel::AdaptWheel ( )
virtual

Adapt the wheel to its current parameters. Call this after updating the range of values.

◆ AddEntry()

void CGUIWheel::AddEntry ( const eC_String &  kEntry,
eC_Bool  bSort = false 
)
virtual

Adds a new entry to the wheel.

Parameters
kEntryValue of new entry.
bSortTrue if wheel should be sorted after adding entry.

◆ AdjustCurrentScrollPosAndNode()

void CGUIWheel::AdjustCurrentScrollPosAndNode ( eC_Value  vDragDelta)
protectedvirtual

Adjusts all the current node and scrolling position dependent of the DragDelta.

Parameters
vDragDeltaThe offset to which the text positions should be adjusted.

◆ AdjustNodesRelativePositions()

void CGUIWheel::AdjustNodesRelativePositions ( )
protectedvirtual

Adjusts all nodes GUIText to reflect the current position

◆ AdjustNodesRelativePositionsCyclic()

void CGUIWheel::AdjustNodesRelativePositionsCyclic ( )
protectedvirtual

Adjusts all nodes GUIText to reflect the current position. Used for cyclic wheels.

◆ AdjustNodesRelativePositionsNotCyclic()

void CGUIWheel::AdjustNodesRelativePositionsNotCyclic ( )
protectedvirtual

Adjusts all nodes GUIText to reflect the current position. Used for non-cyclic wheels.

◆ AdjustSize()

void CGUIWheel::AdjustSize ( )
protectedvirtual

Adjusts the sizes of remaining space, number of visible nodes and default height.

◆ CreateNodesFromRange()

void CGUIWheel::CreateNodesFromRange ( )
protectedvirtual

If m_bUseRange is true this method creates nodes between m_iMinValue and m_iMaxValue using m_iStepSize as step size.

◆ DeInit()

void CGUIWheel::DeInit ( )

De initializes members.

◆ DeleteAllEntries()

void CGUIWheel::DeleteAllEntries ( )
virtual

Deletes all entries from the wheel.

◆ DeleteEntry()

void CGUIWheel::DeleteEntry ( const eC_String &  kEntry)
virtual

Deletes an entry from the wheel.

Parameters
kEntryValue of entry which will be deleted.

◆ DoAnimate()

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

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.

◆ DoButtonDown()

eC_Bool CGUIWheel::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.

◆ DoClick()

eC_Bool CGUIWheel::DoClick ( const eC_Value &  vAbsX,
const eC_Value &  vAbsY 
)
virtual

Called when the object receives a click event. A click can e.g., be the result of a mouse click, a finger press/release sequence on touchscreens, or be triggered by a GK_ACTION keyboard event.

Note
DoClick() 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 an object in a newer and probably intermediate state that he currently does not see. Thus, to calculate the relative position (where the mouse button was pressed and released at the same position for in a certain time span, 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 it always returns False.

Reimplemented from CGUIBehaviour.

◆ DoDrag()

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

Called when the object receives a Drag event. Drags are typically created if the mouse is being used while a mouse-button is being pressed, or if the user moves his finger over a touchscreen.

Parameters
vDeltaXrelative movement in x-direction since the last call of DoDrag/ButtonDown
vDeltaYrelative movement in y-direction since the last call of DoDrag/ButtonDown
vAbsXcurrent X-position in screen coordinates of the mouse
vAbsYcurrent Y-position in screen coordinates of the mouse
Returns
True If the event has been handled.
false Else.

Store time stamp of received event

Reimplemented from CGUIBehaviour.

◆ DoDragEnd()

eC_Bool CGUIWheel::DoDragEnd ( const eC_Value &  vAbsX,
const eC_Value &  vAbsY 
)
virtual

Called on the dragged object (=the object on which the initial ButtonDown-event occurred) when the mouse button is released after a drag event.

Parameters
vAbsXcurrent X-position in screen coordinates of the mouse
vAbsYcurrent Y-position in screen coordinates of the mouse
Returns
True If the event has been handled.
false Else.

Reimplemented from CGUIBehaviour.

◆ DoDraw()

eC_Bool CGUIWheel::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 CGUIObject.

◆ GetAnimatedUpdate()

eC_Bool CGUIWheel::GetAnimatedUpdate ( ) const

get if updates will trigger animations

Returns
true if so

◆ GetCurrentIndex()

eC_UInt CGUIWheel::GetCurrentIndex ( )
virtual

GetCurrentIndex returns the current focused entry value.

Returns
eC_UInt containing the current focused index.

◆ GetCurrentNode()

eC_UInt CGUIWheel::GetCurrentNode ( )
protectedvirtual

Retrieves the current node index.

Returns
The current node index.

◆ GetCurrentNodeSafeIter()

CGUIWheel::NodeList::SafeIterator CGUIWheel::GetCurrentNodeSafeIter ( )
protectedvirtual

Retrieves an iterator pointing to the current node.

Returns
The iterator to the current position

◆ GetCurrentScrollPosForCurrentDirection()

eC_Value CGUIWheel::GetCurrentScrollPosForCurrentDirection ( )
protectedvirtual

Gets the current scrolling position dependent of direction.

Returns
Value of the scrolling position.

◆ GetCurrentValue()

const eC_String & CGUIWheel::GetCurrentValue ( )
virtual

GetCurrentValue returns the current focused entry value.

Returns
eC_String containing the current value.

◆ GetDefaultNodeSizeCurrentDirection()

eC_Value CGUIWheel::GetDefaultNodeSizeCurrentDirection ( )
protectedvirtual

Retrieves the node size dependent to the direction of the wheel.

Returns
Value of the node size for the current direction.

◆ GetDirection()

CGUICommonEnums::Orientation_t CGUIWheel::GetDirection ( ) const

Get currently set direction of wheel

Returns
direction

◆ GetEntriesColor()

eC_UInt CGUIWheel::GetEntriesColor ( ) const

returns the curently used color for entries

Returns
color

◆ GetEntriesFont()

FontResource_t CGUIWheel::GetEntriesFont ( ) const

Get the font-id for entries

Returns
font-id

◆ GetFocussedEntryColor()

eC_UInt CGUIWheel::GetFocussedEntryColor ( ) const

returns the curently used color for the foccused entry

Returns
color

◆ GetFocussedEntryFont()

FontResource_t CGUIWheel::GetFocussedEntryFont ( ) const

Get the font-id for focussed entries

Returns
font-id

◆ GetMaxValue()

eC_Int CGUIWheel::GetMaxValue ( )

Get the maximum allowed value of the wheel

Returns
Maximum value

◆ GetMinValue()

eC_Int CGUIWheel::GetMinValue ( )

Get the minimum allowed value of the wheel

Returns
Minimum value

◆ GetNextNodeCyclic()

CGUIWheel::NodeList::Iterator CGUIWheel::GetNextNodeCyclic ( NodeList::Iterator  kIter)
protectedvirtual

Retrieves an iterator pointing to the next node.

Parameters
kIterIterator pointing to double linked list.
Returns
An iterator to the next node.

◆ GetNinePatch()

CGUINinePatch& CGUIWheel::GetNinePatch ( )
inline

Get the nine-patch which is used to draw the background of the wheel

Returns
nine-patch

◆ GetNodeIndexFromIter()

eC_UInt CGUIWheel::GetNodeIndexFromIter ( const NodeList::Iterator kNodeIter)
protectedvirtual

Retrieves the index pointing to the current node.

Parameters
kNodeIterIterator pointing to the position to which the index should be returned.
Returns
The iterator to the current position

◆ GetNodeIndexInRelPos()

void CGUIWheel::GetNodeIndexInRelPos ( eC_Value  vOffset,
eC_Int &  iIndex,
eC_Int &  iCycle,
eC_Value &  vScrollPos 
)
protectedvirtual

Retrieves the node index specified via an offset in pixels.

Parameters
vOffsetOffset in pixels to the current position.
iIndexResulting index.
iCycleResulting cycle.
vScrollPosResulting scrolling position.

◆ GetNodes()

CGUIWheel::NodeList & CGUIWheel::GetNodes ( )
protected

Returns a reference to the internal list of nodes.

Returns
List of nodes

◆ GetNumberOfEntries()

eC_UInt CGUIWheel::GetNumberOfEntries ( )

Returns the total number of entries in the wheel.

Returns
The total number of entries in the wheel

◆ GetPreviousNodeCyclic()

CGUIWheel::NodeList::Iterator CGUIWheel::GetPreviousNodeCyclic ( NodeList::Iterator  kIter)
protectedvirtual

Retrieves an iterator pointing to the previous node.

Parameters
kIterIterator pointing to double linked list.
Returns
An iterator to the previous node.

◆ GetStepSize()

eC_Int CGUIWheel::GetStepSize ( ) const

Get the stepsize between two values within the wheel.

Returns
stepsize/distance of values in the wheel

◆ IndexCycleOffsetToPixel()

eC_Value CGUIWheel::IndexCycleOffsetToPixel ( eC_Int  iIndex,
eC_Int  iCycle,
eC_Value  vOffset 
)
protectedvirtual

Calculates the position in pixels out of entry index, cycle and offset (scrolling position).

Calculates the position in pixels out of entry index, cycle and offset (scrolling position).

Parameters
iIndexindex
iCyclecycle
vOffset
Returns
pixel-offset

◆ Init()

void CGUIWheel::Init ( )

initializes members.

◆ IsCyclic()

eC_Bool CGUIWheel::IsCyclic ( ) const

Returns whether the wheel is in Cyclic mode (Nodes continue from the beginning, when scrolling past the end).

Returns
True if wheel is cyclic, False otherwise.

◆ IsHighlightable()

virtual eC_Bool CGUIWheel::IsHighlightable ( ) const
inlinevirtual

This method checks if an object is highlightable. This refers to whether it can be highlighted via the event handler. If true the event handler may mark this object as the currently highlighted one. Thus, there is no special flag in CGUIObject that determines if an object is highlightable. The default determination is that the control is in none of the following states:

  • invisible
  • grayed-out
  • disabled if so the return value will be true. NOTE: when an object is not highlightable, it will never receive DoMouseEnter and DoMouseLeave-events
    Returns
    True if highlightable, False otherwise

Reimplemented from CGUIObject.

◆ IsUsingRange()

eC_Bool CGUIWheel::IsUsingRange ( ) const

Returns whether the wheel is using the given min/max/stepsize values to automatically generate its entries.

Returns
True if range values are used to automatically generate content, False otherwise.

◆ NormalizeEntry()

void CGUIWheel::NormalizeEntry ( eC_String &  kEntry)
virtual

Prefixes the given entry with the contents of the FillupString until it reaches the defined minimum length. This also prefixes the entry with m_kPrefixString and appends m_kPostfixString

Parameters
kEntryText which will be extended to the minimum length and get pre-/postfixed

◆ OnColorPropertyChange()

void CGUIWheel::OnColorPropertyChange ( )
virtual

called when a color-property was changed

Reimplemented from CGUIColorPropertyObserver.

◆ operator=()

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

Assignment constructor

Parameters
kSource
Returns
copy

◆ PixelToIndexCycleOffset()

void CGUIWheel::PixelToIndexCycleOffset ( eC_Value  vPixel,
eC_Int &  iIndex,
eC_Int &  iCycle,
eC_Value &  vOffset 
)
protectedvirtual

Calculates the index, cycle and offset (scrolling position) out of a pixel position.

Calculates the index, cycle and offset (scrolling position) out of a pixel position.

Parameters
vPixelpixel-position
iIndexcalculated index
iCyclecalculated cycle
vOffsetpixel-offset

◆ ReadFromStream()

void CGUIWheel::ReadFromStream ( )
virtual

Reads all 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 CGUIObject.

◆ ScrollTo() [1/2]

void CGUIWheel::ScrollTo ( eC_UInt  uiNodeIndex)
virtual

Scrolls to the given entry/node index.

Parameters
uiNodeIndexIndex of entry/node.

◆ ScrollTo() [2/2]

void CGUIWheel::ScrollTo ( const eC_String &  kNodeText)
virtual

Scrolls to the given entry/node value.

Parameters
kNodeTextValue of entry/node.

◆ ScrollToAnimated() [1/2]

void CGUIWheel::ScrollToAnimated ( eC_UInt  uiNodeIndex)
virtual

Scrolls using animations to the given entry/node value.

Parameters
uiNodeIndexIndex of entry/node.

◆ ScrollToAnimated() [2/2]

void CGUIWheel::ScrollToAnimated ( const eC_String &  kNodeText)
virtual

Scrolls using animations to the given entry/node value.

Parameters
kNodeTextValue of entry/node.

◆ SearchEntry()

eC_Int CGUIWheel::SearchEntry ( const eC_String &  kNodeText)
virtual

SearchEntry returns the index of an existing entry value. If the given value is not part of the list -1 is returned.

Note
kNodeText will automatically be adapted if a Minimum length and FillUp-string for the wheel were given!
Parameters
kNodeTextValue of entry/node which is searched for.
Returns
-1 if not found else the index containing the searched value.

◆ SetAnimatedUpdate()

void CGUIWheel::SetAnimatedUpdate ( const eC_Bool &  bAnimatedUpdate)

sets if updates will trigger animations

Parameters
bAnimatedUpdatetrue or false

◆ SetCurrentNode()

void CGUIWheel::SetCurrentNode ( eC_UInt  uiNodeIndex)
protectedvirtual

Sets the current node index via index.

Parameters
uiNodeIndexThe current node index to set.

◆ SetCurrentNodeSafeIter()

void CGUIWheel::SetCurrentNodeSafeIter ( const NodeList::SafeIterator kNodeSafeIter)
protectedvirtual

Set the current wheel position via Iterator.

Parameters
kNodeSafeIterIterator pointing to the new position.

◆ SetCurrentScrollPosForCurrentDirection()

void CGUIWheel::SetCurrentScrollPosForCurrentDirection ( eC_Value  vCurrentScrollPos)
protectedvirtual

Sets the scrolling position dependent to the direction of the wheel.

Parameters
vCurrentScrollPosNew scrolling position horizontal or vertical.

◆ SetCyclic()

void CGUIWheel::SetCyclic ( eC_Bool  bCyclic)

Specifies whether the wheel is in Cyclic mode (Nodes continue from the beginning, when scrolling past the end).

Parameters
bCyclicTrue if wheel shall be cyclic, False otherwise.

◆ SetDefaultNodeSize()

void CGUIWheel::SetDefaultNodeSize ( eC_Value  vWidth,
eC_Value  vHeight 
)
protectedvirtual

Sets the node/entry size.

Parameters
vWidthValue of new node/entry width.
vHeightValue of new node/entry height.

◆ SetDirection()

void CGUIWheel::SetDirection ( CGUICommonEnums::Orientation_t  eDirection)

Sets direction of wheel

Parameters
eDirection

◆ SetEntriesColor() [1/2]

void CGUIWheel::SetEntriesColor ( const eC_UInt &  uiEntriesColor)

Sets the color which is used for non-focussed entries

Parameters
uiEntriesColorcolor

◆ SetEntriesColor() [2/2]

void CGUIWheel::SetEntriesColor ( const GlobalProperty_t eEntriesColor)

Sets the color which is used for non-focussed entries

Parameters
eEntriesColorcolor-property

◆ SetEntriesFont()

void CGUIWheel::SetEntriesFont ( const FontResource_t eFontID)

Set font-id for entries

Parameters
eFontIDfont-id

◆ SetFocussedEntryColor() [1/2]

void CGUIWheel::SetFocussedEntryColor ( const eC_UInt &  uiFocussedEntryColor)

Sets the color which is used for the focussed entry

Parameters
uiFocussedEntryColorcolor

◆ SetFocussedEntryColor() [2/2]

void CGUIWheel::SetFocussedEntryColor ( const GlobalProperty_t eFocussedEntryColor)

Sets the color which is used for the focussed entry

Parameters
eFocussedEntryColorcolor-property

◆ SetFocussedEntryFont()

void CGUIWheel::SetFocussedEntryFont ( const FontResource_t eFontID)

Set font-id for focussed entry

Parameters
eFontIDfont-id

◆ SetHeight()

void CGUIWheel::SetHeight ( const eC_Value &  vY)
virtual

Sets this object's height to a new value.

Parameters
vYthe new height

Reimplemented from CGUIObject.

◆ SetMaxValue()

void CGUIWheel::SetMaxValue ( eC_Int  iMaxValue)

Set the maximum allowed value of the wheel

Parameters
iMaxValuenew maximum value

◆ SetMinValue()

void CGUIWheel::SetMinValue ( eC_Int  iMinValue)

Set the minimum allowed value of the wheel

Parameters
iMinValuenew minimum value

◆ SetPostfixString()

void CGUIWheel::SetPostfixString ( const eC_String &  kPostfixString)

Set the string which will be appended as a postfix to each entry in the wheel-

Parameters
kPostfixStringPostfix which will be appended to each item in the wheel.

◆ SetStepSize()

void CGUIWheel::SetStepSize ( eC_Int  iStepSize)

Set the stepsize between two values within the wheel.

Parameters
iStepSizestepsize/distance of values in the wheel

◆ SetUseRange()

void CGUIWheel::SetUseRange ( eC_Bool  bUseRange)

Specifies whether the wheel is using the given min/max/stepsize values to automatically generate its entries. Instead of automatically generating entries from the given range, you can manually add entries via the AddEntry() method.

Parameters
bUseRangeTrue if range values are used to automatically generate content, False otherwise.

◆ SetValue()

eC_Bool CGUIWheel::SetValue ( const CGUIValue rkValue)
virtual

Generic interface for setting object values. The SetValue() API enables you to forward any data of type CGUIValue to any object. How this value finally gets interpreted is up to the receiving object's implementation.

This concept is particularly useful for linking GUI-objects to an external data source. You can for instance forward an integer value as a CGUIValue object to a GUIObject without the need to know whether it is a CGUITextField, or a CGUIProgressBar, or something completely different. The receiving object will interpret the value in the most sensible way. In the given example the integer will be displayed as a string in the Textfield, while it will cause the ProgressBar to fill up to the respective value.

Parameters
rkValueDataPoolEntry containing the value to be handed over to the object on which SetValue was called.
Returns
Always False in base class, normally True if value was applied and False in case of error.

Reimplemented from CGUIObject.

◆ SetWidth()

void CGUIWheel::SetWidth ( const eC_Value &  vX)
virtual

Sets this object's width to a new value.

Parameters
vXthe new width

Reimplemented from CGUIObject.

◆ StartScrollingAnimation()

void CGUIWheel::StartScrollingAnimation ( )
protectedvirtual

Start animation.

◆ StopScrollingAnimation()

void CGUIWheel::StopScrollingAnimation ( )
protectedvirtual

Stop animation.

◆ WriteToStream()

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

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

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

Reimplemented from CGUIObject.

Member Data Documentation

◆ m_eEasingTypeCurrent

CGUIEasing::EasingType_t CGUIWheel::m_eEasingTypeCurrent
protected

EasingType used for kinetic animation.

Current active easing.

◆ m_vEasingDurationCurrent

eC_Value CGUIWheel::m_vEasingDurationCurrent
protected

Duration of easing animation for kinetic scrolling.

Current active easing duration.


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