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

This is the Guiliani base class all controls are derived from. More...

#include <GUIObject.h>

Inheritance diagram for CGUIObject:

Public Types

enum  FourWayFocus_t { FOCUS_LEFT, FOCUS_RIGHT, FOCUS_UP, FOCUS_DOWN }
 

Public Member Functions

 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 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
 
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 *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 (const CGUIValue &rkValue)
 
virtual eC_Bool SetValue (CDataPoolEntry &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 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 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 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 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 void DoAnimate (const eC_Value &vTimes=eC_FromInt(1))
 
virtual eC_Bool IsAnimating () const
 
virtual void StartAnimation ()
 
virtual void StopAnimation ()
 

Static Public Attributes

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"
 

Protected Member Functions

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
 

Friends

class CGUI
 
class CGUICompositeObject
 

Detailed Description

This is the Guiliani base class all controls are derived from.

Additional behavior of specific controls (e.g. the observer feature) can be added by means of multiple inheritance. The position setter methods like SetRelXPos(), and the status setter methods such as SetGrayedOut() are virtual so that there is a possibility for user to overwrite these methods and build special functionalities. An example is that if the user the control changes width of a control and he wants to inform other controls about this change, or if the user wants to prevent the change of the width in the control.

Example:

// Create an object.
CGUIObject* pkObject = new CGUIObject(this,
eC_FromInt(0), eC_FromInt(0),
eC_FromInt(100), eC_FromInt(100),
OBJ_OBJECT1);
// Sets this object's current relative X-position.
pkObject->SetRelXPos(eC_FromInt(10));
// Sets this object's current width.
pkObject->SetWidth(eC_FromInt(1000));
// Set the object's status to invisible.
pkObject->SetInvisible(true);

Member Enumeration Documentation

◆ FourWayFocus_t

Used by the four-way focusing functions to specify the direction.

See also
CGUI::FourWayFocusNext

Constructor & Destructor Documentation

◆ CGUIObject() [1/4]

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 constructor.

Parameters
pParentPointer to the designated parent object.
vXX-position relative to its parent object, i.e. the x-offset from the left border of the parent object
vYY-position relative to its parent object, i.e. the y-offset from the upper border of the parent object
vWidthWidth of the object
vHeightHeight of the object
eIDObject identifier of this object (choose NO_HANDLE if none is required).

◆ CGUIObject() [2/4]

CGUIObject::CGUIObject ( CGUICompositeObject *const  pParent,
const CGUIRect kRect,
const ObjectHandle_t eID = NO_HANDLE 
)

CGUIObject constructor.

Parameters
pParentPointer to the designated parent object.
kRectBounding rectangle of the object, relative to parent.
eIDObject identifier of this object (choose NO_HANDLE if none is required).

◆ CGUIObject() [3/4]

CGUIObject::CGUIObject ( )

CGUIObject constructor. The only non-derived class that should call this constructor is GUIStandardFactory. CGUIObject has to read attributes from streaming file by using ReadFromStream() afterwards. Attention: Please DO NOT use this to create a concrete object outside the GUIStandardFactory.

◆ CGUIObject() [4/4]

CGUIObject::CGUIObject ( const CGUIObject kSource)

CGUIObject copy-constructor. Behaviour and Layout are set to NULL, because they cannot be copied.

Parameters
kSourceSource object to be copied

◆ ~CGUIObject()

CGUIObject::~CGUIObject ( )
virtual

CGUIObject destructor. Any behaviour object, which belongs to this CUGIObject will be DELETED during destruction. This destructor is virtual as we want to delete derived objects by using a base class pointer. Destructors of derived classes will automatically be declared virtual, there is no need to declare such destructor "virtual" explicitly.

Member Function Documentation

◆ CalculateInvalidatedRect()

eC_Bool CGUIObject::CalculateInvalidatedRect ( CGUIRect rRect) const

Intersects the given rect with the rects of all parent objects in the object hierarchy. The invisibility of all parents will be checked as well and returned.

Invalidation only makes sense if all parents are visible, as well as this object!

If the given rect is not the absolute rect of this object, the given rect should be intersected with the absolute rect of this object before this call.

Parameters
[in,out]rRectrect that should be used for calculation; returned will be the calculated invalidation rect
Returns
Whether this object is invisible and it would therefore not make sense to invalidate its area. This means that the return value is True if the object itself is invisible or any parent is invisible, or if the object is not a child of the GUI (not within the object tree).

◆ ClaimFocus()

eC_Bool CGUIObject::ClaimFocus ( )
virtual

Called if the object is requested to lose the focus. It must return False if the object is willing to lose the focus and True otherwise. Please notice that the focus may get moved to another control even if the focused object claims the focus, as the event handler may for example force the focus into a modal dialog.

Returns
True if the focus was received, False otherwise.
See also
RequestFocus

Reimplemented in CGUIBaseMessageBox.

◆ CreateBitmapPlane()

eC_Bool CGUIObject::CreateBitmapPlane ( )
protectedvirtual

Creates a BitmapPlane for this control. The ID of this BitmapPlane can be accessed via GetBitmapID(). The BitmapPlane can be accessed with GetBitmapPlane(). If SnapshotDrawing is enabled (EnableSnapshotDrawing()), this BitmapPlane is drawn during DoDrawSnapshot(). The method CreateSnapshot() also renders to this BitmapPlane.

Returns
True if a BitmapPlane has been created, otherwise False. This happens if a BitmapPlane for this control already exists.

◆ CreateSnapshot()

void CGUIObject::CreateSnapshot ( eC_UInt  uiBackColor = 0x00)
virtual

Creates a Snapshot of this control. That means this control will be rendered to its own BitmapPlane. If this Control does not have a BitmapPlane so far, one will be created.

Parameters
uiBackColorColor, which will be used as background for the snapshot. By default, it's set to 0x00, but for GfxWrapers which do not support alpha BitmapPlanes another back color maybe needed.

◆ DataPoolConnectorExists()

eC_Bool CGUIObject::DataPoolConnectorExists ( ) const
inline

Indicates whether this object has a DataPoolConnector. This will NOT automatically create one.

See also
GetDataPoolConnector()
Returns
true if a DataPoolConnector exists, false otherwise.

◆ DeleteSnapshot()

void CGUIObject::DeleteSnapshot ( )

Deletes the BitmapPlane of this GUIObject. This BitmapPlane has been created due to EnableSnapshotDrawing() or by CreateSnapshot.

◆ DisableSnapshotDrawing()

void CGUIObject::DisableSnapshotDrawing ( eC_Bool  bDeleteSnapshot = true)
virtual

Disables SnapshotDrawing. If Snapshotdrawing is disabled, this control will be drawn as usual. By default, the existing BitmapPlane will be deleted.

Parameters
bDeleteSnapshotIf true the BitmapPlane of this control will be deleted

◆ DoDraw()

◆ DoDrawSnapshot()

eC_Bool CGUIObject::DoDrawSnapshot ( )
virtual

Visualizes the object by drawing its rendered texture.

Returns
True if anything was drawn, False otherwise

◆ EnableSnapshotDrawing()

void CGUIObject::EnableSnapshotDrawing ( )
virtual

Enables SnapshotDrawing. If Snapshotdrawing is enabled, the BitmapPlane of this control will be drawn. Instead of DoDraw(), DoDrawSnapshot() will be called.

◆ FindObject()

CGUIObject * CGUIObject::FindObject ( const eC_Value &  vAbsX,
const eC_Value &  vAbsY 
)
virtual

Retrieves a pointer to the object, which has the top most position at the given coordinates. This will be called recursively along the object tree. This method is virtual, so that users are free to implement controls, which have a sensitive area that differs from the actual object's rectangular shape. The standard implementation will check if the given coordinates lie inside of the object's absolute rectangle and return the object's 'this' pointer if yes, and NULL otherwise. Objects that are invisible or that have the 'ClickThrough' attribute set, will not be found and therefore return NULL.

Parameters
vAbsXAbsolute X coordinate for which the topmost object shall be returned
vAbsYAbsolute Y coordinate for which the topmost object shall be returned
Returns
pointer to the topmost object at the given position

Reimplemented in CGUICompositeObject.

◆ FocusAny()

virtual eC_Bool CGUIObject::FocusAny ( )
inlinevirtual

Set focus to any focusable child object in the subtree of this object, including the object itself

Returns
eC_Bool True if focus was obtained, False otherwise

Reimplemented in CGUIListBox, CGUIComboBox, CGUICompositeObject, CGUI, and CGUIMenuBase.

◆ FocusNext()

eC_Bool CGUIObject::FocusNext ( CGUIObject *const  pRefObj = NULL,
const eC_Bool &  bSubTreeOfRefObjDone = false 
)
virtual

Set focus to the next focusable child object after the currently focused one. The user should call this function on the currently focused object with no arguments.

See also
CGUICompositeObject::FocusNext()
Parameters
pRefObjIs usually a child of this object which indicates the current position in the child list.
bSubTreeOfRefObjDoneindicates if the subtree that is under pRefObj has already been asked to take focus, or if not.
Returns
eC_Bool True if focus was obtained, False otherwise

Reimplemented from CGUIBehaviour.

Reimplemented in CGUICompositeObject.

◆ FocusPrevious()

eC_Bool CGUIObject::FocusPrevious ( CGUIObject *const  pRefObj = NULL,
const eC_Bool &  bSubTreeOfRefObjDone = false 
)
virtual

Set focus to the previous focusable child object before the currently focused one. The user should call this function on the currently focused object with no arguments.

See also
CGUICompositeObject::FocusPrevious()
Parameters
pRefObjIs usually a child of this object which indicates the current position in the child list.
bSubTreeOfRefObjDoneindicates if the subtree that is under pRefObj has already been asked to take focus, or if not.
Returns
eC_Bool True if focus was obtained, False otherwise

Reimplemented from CGUIBehaviour.

Reimplemented in CGUICompositeObject.

◆ FourWayNext()

eC_Bool CGUIObject::FourWayNext ( FourWayFocus_t  eFocusDirection)
protectedvirtual

Called when the focus should be set to the next control that is in the given direction of the currently focused object.

Parameters
eFocusDirectionThe focus direction.
Returns
If True, then the algorithm breaks immediately and will have no effect. Thus, custom controls may override this function slot in order to set the focus to a specific control and afterwards force the 4-way navigation algorithm to stop. The automatism will always return False.
See also
CGUI::FourWayFocusNext()

Reimplemented in CGUICompositeObject, CGUIMenuBar, and CGUIMenu.

◆ GetAbsRect()

CGUIRect CGUIObject::GetAbsRect ( ) const
inline

Returns the bounding rectangle of the object in absolute coordinates. Note that the rectangle will be one pixel higher and wider than the actual object. This is because Guiliani's drawing functions exclude the rightmost and lowermost edge of rectangles. For an CGUIObject on Pos(0;0) with a width of 9 pixels and a height of 9 pixesls this will return a CGUIRect(0,0,9,9);

See also
GetAbsXPosREdge()
GetAbsYPosBEdge()
CGfxWrap::Rect()
Returns
The bounding rectangle of the object in absolute coordinates

◆ GetAbsXPos()

eC_Value CGUIObject::GetAbsXPos ( ) const
inline

Returns this object's absolute X-position at the time of the last redraw. Custom controls should tend to call this function in DoDraw() only. The result reflects the visible origin of this object on screen, thus it will not change between redraws.

This function is for example used by the 4-way navigation, which uses the geometric layout of all objects at the time of the last redraw to determine the next object to focus.

Note
In custom controls you should prefer to calculate with relative positions, that is, you should not rely on where any of your parents are positioned. Thus, custom controls should always consider their left/upper corner to be at a logical position of (0,0). Only at the very end of drawing, layouting or event handling relative coordinates need to be converted to absolute coordinates by the framework.

If you need to calculate the distance between objects on the screen or similar operations that need absolute coordinates (outside of DoDraw), you may have to use this function but keep in mind, that these reflect the state of this object at the time of the passed redraw.

m_vXPosAbsParent is the sum of all relative positions of all parents at the time of the last redraw and m_vXPosRelVisible is the relative X-coordinate at the time of the last redraw.

See also
GetAbsYPos(), GetCurrentAbsXPos(), GetRelXPos()
Returns
The X position

◆ GetAbsXPosCenter()

eC_Value CGUIObject::GetAbsXPosCenter ( ) const
inline

Calculates the horizontal center of the object at the time of the last redraw.

Returns
The X position

◆ GetAbsXPosREdge()

eC_Value CGUIObject::GetAbsXPosREdge ( ) const
inline

Returns the X-position of the object's lower right corner + 1 in screen coordinates (absolute position) at the time of the last redraw. If the function is called in DoDraw() the result will reflect the state of the upcoming redraw. Why + 1 ? Because Guiliani's drawing functions do not draw the last pixel. e.g. FilledRect(0, 0, 10, 10); the rect is drawn from (0,0) to (9,9) (both included) But if you draw a rectangle with (FilledRect(GetAbsXPos(),GetAbsYPos(), GetAbsXPosREdge(), GetAbsYPosBEdge()) then the lower right corner of the object will be drawn, because GetAbsXPosREdge() returns the last pixel +1

Returns
eC_Value The X position

◆ GetAbsYPos()

eC_Value CGUIObject::GetAbsYPos ( ) const
inline

Returns this object's absolute Y-position at the time of the last redraw.

See also
GetAbsXPos, GetCurrentAbsYPos(),GetRelYPos
Returns
The Y position

◆ GetAbsYPosBEdge()

eC_Value CGUIObject::GetAbsYPosBEdge ( ) const
inline

Returns the Y-position of the object's lower right corner + 1 in screen coordinates (absolute position) at the time of the last redraw. If the function is called in DoDraw() the result will reflect the state of the upcoming redraw. Why + 1 ? Because Guiliani's drawing functions do not draw the last pixel. e.g. FilledRect(0, 0, 10, 10); the rect is drawn from (0,0) to (9,9) (both included) But if you draw a rectangle with (FilledRect(GetAbsXPos(),GetAbsYPos(), GetAbsXPosREdge(), GetAbsYPosBEdge()) then the lower right corner of the object will be drawn, because GetAbsYPosBEdge() returns the last pixel +1

Returns
eC_Value The Y position

◆ GetAbsYPosCenter()

eC_Value CGUIObject::GetAbsYPosCenter ( ) const
inline

Calculates the vertical center of the object at the time of the last redraw.

Returns
The Y position

◆ GetAlpha()

eC_UByte CGUIObject::GetAlpha ( ) const
inline

Accessor for the alpha (transparency) value of the object

Returns
value in the range of 0 (transparent) to 255 (opaque)

◆ GetBehaviour() [1/2]

CGUIBehaviourDecorator* CGUIObject::GetBehaviour ( )
inline

Returns the pointer to the current behaviour.

Returns
Pointer to this object's behaviour.

◆ GetBehaviour() [2/2]

const CGUIBehaviourDecorator* CGUIObject::GetBehaviour ( ) const
inline

Returns the pointer to the current behaviour.

Returns
Pointer to this object's behaviour.

◆ GetBitmapID()

GUIBitmapPlaneID_t CGUIObject::GetBitmapID ( ) const
inline

Accessor for the ID of the BitmapPlane of this GUIObject

Returns
ID of the BitmapPlane of this GUIObject

◆ GetBitmapPlane()

CGUIBitmapPlane & CGUIObject::GetBitmapPlane ( ) const

Accessor for the BitmapPlane of this GUIObject

Returns
BitmapPlane of the GUIObject

◆ GetCurrentAbsRect()

CGUIRect CGUIObject::GetCurrentAbsRect ( ) const

Get the current absolute bounding rectangle of this object, recalculated from the current relative positions of all its parents.

Returns
The absolute bounding rectangle of the given object. Be aware: If relative coordinates of any parents of the reference object change then the position returned by this function will most likely also change, because it is based on the sum of the current relative positions of all its parents.

◆ GetCurrentAbsXPos()

eC_Value CGUIObject::GetCurrentAbsXPos ( ) const

Get the current absolute X position of this object, recalculated from the relative positions of all parents. Be aware: If relative X coordinates of any parents of the reference object change then the position returned by this function will most likely also change, because it is the sum of the current relative X positions of all its parents.

Returns
The current absolute X position of the given object.
See also
GetAbsXPos(), GetCurrentAbsYPos(), GetRelXPos()

◆ GetCurrentAbsXPosCenter()

eC_Value CGUIObject::GetCurrentAbsXPosCenter ( ) const
inline

Calculates the current horizontal center of the object. Be aware: If relative X coordinates of any parents of the reference object change then the position returned by this function will most likely also change, because it is based on the sum of the current relative X positions of all its parents.

Returns
The current absolute X position

◆ GetCurrentAbsXPosREdge()

eC_Value CGUIObject::GetCurrentAbsXPosREdge ( ) const
inline

Get the current absolute X position of the right edge of this object, recalculated from the current relative positions of all its parents. Be aware: If relative X coordinates of any parents of the reference object change then the position returned by this function will most likely also change, because it is based on the sum of the current relative X positions of all its parents.

Returns
The current absolute Y position of the given object.

◆ GetCurrentAbsYPos()

eC_Value CGUIObject::GetCurrentAbsYPos ( ) const

Get the current absolute Y position of this object, recalculated from the relative positions of all parents. Be aware: If relative Y coordinates of any parents of the reference object change then the position returned by this function will most likely also change, because it is the sum of the current relative Y positions of all its parents.

Returns
The current absolute Y position of the given object.
See also
GetAbsYPos(), GetCurrentAbsXPos(), GetRelYPos()

◆ GetCurrentAbsYPosBEdge()

eC_Value CGUIObject::GetCurrentAbsYPosBEdge ( ) const
inline

Get the current absolute Y position of the bottom edge of this object, recalculated from the current relative positions of all its parents. Be aware: If relative Y coordinates of any parents of the reference object change then the position returned by this function will most likely also change, because it is based on the sum of the current relative Y positions of all its parents.

Returns
The current absolute Y position of the given object.

◆ GetCurrentAbsYPosCenter()

eC_Value CGUIObject::GetCurrentAbsYPosCenter ( ) const
inline

Calculates the current vertical center of the object. Be aware: If relative Y coordinates of any parents of the reference object change then the position returned by this function will most likely also change, because it is based on the sum of the current relative Y positions of all its parents.

Returns
The current absolute Y position

◆ GetDataPoolConnector()

CDataPoolConnector & CGUIObject::GetDataPoolConnector ( )

Returns this object's DataPoolConnector and creates it, if it did not previously exist.

Returns
Reference to this object's DataPoolConnector

◆ GetDistanceBottom()

eC_Value CGUIObject::GetDistanceBottom ( ) const

Returns the distance from this object's bottom edge to the parent's bottom edge. If the parent pointer is NULL it will just return 0 in the release build and in the debug build an assertion is violated additionally.

Returns
The distance in pixel

◆ GetDistanceRight()

eC_Value CGUIObject::GetDistanceRight ( ) const

Returns the distance from this object's right edge to the parent's right edge. If the parent pointer is NULL it will just return 0 in the release build and in the debug build an assertion is violated additionally.

Returns
The distance in pixel

◆ GetHalfHeight()

eC_Value CGUIObject::GetHalfHeight ( ) const
inline

Calculates the current vertical center of the object relative to itself.

Returns
The half height

◆ GetHalfWidth()

eC_Value CGUIObject::GetHalfWidth ( ) const
inline

Calculates the current horizontal center of the object relative to itself.

Returns
The half width

◆ GetHeight()

eC_Value CGUIObject::GetHeight ( ) const
inline

Returns this object's current height.

Note
This is not necessarily the height of this object on screen.
Returns
The height

◆ GetID()

ObjectHandle_t CGUIObject::GetID ( ) const
inline

Gets the ID of the object.

Returns
ID of the object

◆ GetLayouter() [1/2]

CGUILayouter* CGUIObject::GetLayouter ( )
inline

Returns the pointer to the current layouter.

Returns
Pointer to this object's layouter.

◆ GetLayouter() [2/2]

const CGUILayouter* CGUIObject::GetLayouter ( ) const
inline

Returns a const pointer to the current layouter.

Returns
const Pointer to this object's layouter.

◆ GetNeighborBottomID()

ObjectHandle_t CGUIObject::GetNeighborBottomID ( ) const
inline

Used by the 4-way focusing algorithm.

Returns
The ID of the object below ('south') of this object.

◆ GetNeighborLeftID()

ObjectHandle_t CGUIObject::GetNeighborLeftID ( ) const
inline

Used by the 4-way focusing algorithm.

Returns
The ID of the object to the left of this object.

◆ GetNeighborRightID()

ObjectHandle_t CGUIObject::GetNeighborRightID ( ) const
inline

Used by the 4-way focusing algorithm.

Returns
The ID of the object to the right of this object.

◆ GetNeighborTopID()

ObjectHandle_t CGUIObject::GetNeighborTopID ( ) const
inline

Used by the 4-way focusing algorithm.

Returns
The ID of the object above ('north') of this object.

◆ GetObjectByID() [1/2]

CGUIObject* CGUIObject::GetObjectByID ( const ObjectHandle_t eID,
const eC_Bool &  bOnlyVisible = false 
)
inline

Searches for an object by its ID.

There is another implementation of the same method with a slightly different signature, GetObjectByID(const ObjectHandle_t&) const. The compiler will choose the appropriate method depending on what return type the caller expects.

Parameters
eIDID of the object for which to search.
bOnlyVisibleignore elements which are not currently visible
Returns
Returns this-pointer if this object's ID equals the given eID, otherwise NULL

◆ GetObjectByID() [2/2]

const CGUIObject * CGUIObject::GetObjectByID ( const ObjectHandle_t eID,
const eC_Bool &  bOnlyVisible = false 
) const

Searches for an object by its ID.

There is another implementation of the same method with a slightly different signature, GetObjectByID(). The compiler will choose the appropriate method depending on what return type the caller expects.

Parameters
eIDID of the object for which to search.
bOnlyVisibleignore elements which are not currently visible
Returns
Returns this-pointer if this object's ID equals the given eID, otherwise NULL

◆ GetOriginRect()

CGUIRect CGUIObject::GetOriginRect ( ) const
inline

Returns a copy of the bounding rectangle of this object as if it would be placed at the origin.

Returns
The bounding rectangle of the object as if in origin

◆ GetParent() [1/2]

CGUICompositeObject* CGUIObject::GetParent ( )
inline

Returns a pointer to this object's parent object.

There is another implementation of the same method with a slightly different signature, GetParent() const. The compiler will choose the appropriate method depending on what return type the caller expects.

Returns
this object's parent.

◆ GetParent() [2/2]

const CGUICompositeObject* CGUIObject::GetParent ( ) const
inline

Returns a pointer to this object's parent object.

There is another implementation of the same method with a slightly different signature, GetParent(). The compiler will choose the appropriate method depending on what return type the caller expects.

Returns
this object's parent.

◆ GetRelRect()

CGUIRect CGUIObject::GetRelRect ( ) const
inline

Returns a copy of the bounding rectangle of this object in coordinates that are relative to the parent object.

Returns
The bounding rectangle of the object in relative coordinates

◆ GetRelXPos()

eC_Value CGUIObject::GetRelXPos ( ) const
inline

Returns this object's current relative X-position.

Note
This is not necessarily the relative X-position of this object on screen.
Returns
The x-position

◆ GetRelXPosCenter()

eC_Value CGUIObject::GetRelXPosCenter ( ) const
inline

Calculates the current horizontal center of the object relative to the parent.

Returns
The X position

◆ GetRelXPosREdge()

eC_Value CGUIObject::GetRelXPosREdge ( ) const
inline

Returns this object's current relative X-position of the object's lower right corner + 1. This position is relative to parent's origin.

Note
This is not necessarily the relative X-position on screen.
Returns
The X position

◆ GetRelYPos()

eC_Value CGUIObject::GetRelYPos ( ) const
inline

Returns this object's current relative Y-position.

Note
This is not necessarily the relative Y-position of this object on screen.
Returns
The Y position

◆ GetRelYPosBEdge()

eC_Value CGUIObject::GetRelYPosBEdge ( ) const
inline

Returns this object's current relative Y-position of the object's lower right corner + 1. This position is relative to parent's origin.

Note
This is not necessarily the relative X-position on screen.
Returns
eC_Value The Y position

◆ GetRelYPosCenter()

eC_Value CGUIObject::GetRelYPosCenter ( ) const
inline

Calculates the current vertical center of the object relative to the parent.

Returns
The Y position

◆ GetWidth()

eC_Value CGUIObject::GetWidth ( ) const
inline

Returns this object's current width.

Note
This is not necessarily the width of this object on screen.
Returns
The width

◆ InvalidateArea()

void CGUIObject::InvalidateArea ( )

Invalidates the area covered by this object, thus causing DoDraw() to be called during the GUI's next redraw. If the object is invisible, this method does not invalidate anything.

◆ IsClickable()

eC_Bool CGUIObject::IsClickable ( ) const

This method checks if an object is able to be clicked. This refers to whether it can be clicked with the mouse/keyboard via the event handler. If true the event handler may call DoClick or DoDoubleClick of this object.

Returns
True if clickable, False otherwise

◆ IsClickThrough()

eC_Bool CGUIObject::IsClickThrough ( ) const
inline
See also
SetClickThrough()
Returns
True if click-through, False otherwise

◆ IsCompositeObject()

virtual eC_Bool CGUIObject::IsCompositeObject ( ) const
inlinevirtual

Checks if a control is derived from CGUICompositeObject or if it is just derived from CGUIObject. Thus, this function should not be overridden by any other class than CGUICompositeObject but may be called by user code.

Returns
True if composite

Reimplemented in CGUICompositeObject.

◆ IsDescendantOf()

eC_Bool CGUIObject::IsDescendantOf ( const CGUIObject *const  pAncestor) const

This method checks if a given object is an ancestor of this object

Parameters
pAncestorPointer to object of which this might be a descendant
Returns
True if this is a descendant of pAncestor, otherwise False. Also, False if pAncestor is NULL.

◆ IsDisabled()

eC_Bool CGUIObject::IsDisabled ( ) const
inline

Checks if the disabled object state is set. By default, if an object is disabled then it will never get the focus and is not clickable. DoClick() and RequestFocus() will not be called on disabled objects.

Returns
True if disabled, False otherwise

◆ IsDragable()

eC_Bool CGUIObject::IsDragable ( ) const

This method checks if an object is able to be dragged. This refers to whether it can be dragged with the mouse/keyboard via the event handler. If true, the event handler may call DoDrag of this object.

Returns
True if draggable, False otherwise

◆ IsDragged()

eC_Bool CGUIObject::IsDragged ( ) const

Checks if the object is currently being dragged.

Returns
True if the object is dragged, False otherwise

◆ IsDrawingSnapshot()

eC_Bool CGUIObject::IsDrawingSnapshot ( ) const
inline

Accessor for the Snapshot-Draw-Status.

Returns
True if snapshot drawing is enabled, otherwise False

◆ IsFocussable()

eC_Bool CGUIObject::IsFocussable ( ) const

This method checks if an object is focusable. This refers to whether it can be focused with the mouse/keyboard via functions like FocusNext().

Returns
True if focusable, False otherwise

◆ IsFocussed()

eC_Bool CGUIObject::IsFocussed ( ) const

Checks if the object is the one which is in focus.

Returns
True if the object is in focus, False otherwise

◆ IsGrayedOut()

eC_Bool CGUIObject::IsGrayedOut ( ) const
inline

Checks if the grayed out object state is set. By default, if an object is grayed out it will be displayed with a different visual shape than usual in order to give the user a hint that it will never be clickable or highlighted but may be dragged if it supports dragging.

Returns
True if highlightable, False otherwise

◆ IsHighlightable()

eC_Bool CGUIObject::IsHighlightable ( ) const
virtual

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 in CGUIGraph, CGUIPlot, CGUIGauge, CGUIProgressBar, CGUIWheel, CGUISegmentBar, CGUIClock, CGUIChart, CGUIImage, CGUICarousel, CGUIVideo, CGUIEdit, CGUIRangeSlider, CGUIGeometryObject, CGUIRadialProgressBar, CGUIKnob, and CGUICalendar.

◆ IsHighlighted()

eC_Bool CGUIObject::IsHighlighted ( ) const

Checks if the object is being highlighted.

Returns
True if the object is highlighted, False otherwise

◆ IsInvisible()

eC_Bool CGUIObject::IsInvisible ( ) const
inline

Checks if the invisible object state is set. If an object is invisible it will not be drawn, i.e., its DoDraw() will not be called.

Returns
True if invisible, False otherwise

◆ IsPressed()

eC_Bool CGUIObject::IsPressed ( ) const

Checks if the object is currently being pressed.

Returns
True if the object is pressed, False otherwise

◆ IsStopFocus()

eC_Bool CGUIObject::IsStopFocus ( ) const
inline

Checks if the parent object may be asked to get focus via FocusNext() and FocusPrevious(). The flag that is returned alters the algorithm used to search in the creation tree.

Returns
True if parent supports it

◆ NotifyValueObservers()

void CGUIObject::NotifyValueObservers ( const CGUIValue kValue,
const eC_UInt  uiX = 0,
const eC_UInt  uiY = 0 
)
inline

Notifies all observing DataPoolEntries of this object's DataPoolConnector that it's value has changed

Parameters
kValueThe new value
uiXX-Index within the DataPoolEntries at which to set the new Value
uiYY-Index within the DataPoolEntries at which to set the new Value

◆ operator=()

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

CGUIObject operator= to copy the whole CGUIObject. Behaviour and Layout are set to NULL, because they cannot be copied.

Parameters
kSourceSource object to be copied
Returns
Copied object

◆ ReadFromStream()

◆ RefreshLayout()

void CGUIObject::RefreshLayout ( CGUILayouter::eMovedEdges_t  eMovedEdges) const
virtual

Recalculates the object's layout.

Parameters
eMovedEdgesThis indicates in which direction the distance to the parent object's borders has changed (Only relevant for layouters, which depend on their parent object's size, such as CGUILayouterAnchor)

Reimplemented in CGUICompositeObject.

◆ RemoveValueObserver()

void CGUIObject::RemoveValueObserver ( CGUIObserver pObserver)
inline

Unsubscribe an observer that subscribed as value observer.

Parameters
pObserverThe Observer that wants to unsubscribe.

◆ RenderToBitmap()

void CGUIObject::RenderToBitmap ( eC_UInt  uiBitmapID,
eC_Value  vXOffset = eC_FromInt(0),
eC_Value  vYOffset = eC_FromInt(0) 
)

Renders this GUIObject into the bitmapPlane with given ID and the given X and Y Offset.

Parameters
uiBitmapIDID of the BitmapPlane in which this control should be drawn.
vXOffsetDraw offset in x direction. Drawing of this control starts at position vXOffset
vYOffsetDraw offset in y direction. Drawing of this control starts at position vYOffset

◆ RequestFocus()

eC_Bool CGUIObject::RequestFocus ( )

This method requests the focus for the current object. It will only receive the focus, if the currently focused object is willing to release it.

Returns
True if the focus was received, False otherwise.
See also
ClaimFocus

◆ SetAlpha()

void CGUIObject::SetAlpha ( eC_UByte  ubAlpha)

Sets the alpha (transparency) value of the object

Parameters
ubAlphaValue in the range of 0 (transparent) to 255 (opaque)

◆ SetBehaviour()

void CGUIObject::SetBehaviour ( CGUIBehaviourDecorator pBehaviour)

Attaches the supplied behaviour to this object.

Note
This will delete any former behaviour attached to this object.
Parameters
pBehaviourPointer to CGUIBehaviourDecorator object which is to be appended

◆ SetClickThrough()

void CGUIObject::SetClickThrough ( const eC_Bool &  bClickThrough)
inline

Set m_bClickThrough to a new value. This specifies whether this object can be clicked. Else clicks will go right through it and are thereby forwarded to an object lying under it (in z-order). The typical use case for this flag is to pass click events to a brother of this object when this and the brother object overlap and the overlapped part of the brother is below this object. Attention: This attribute is not streamed

Parameters
bClickThroughthe new value

◆ SetDisabled()

void CGUIObject::SetDisabled ( const eC_Bool &  bDisabled)
virtual

Set the object's status to disabled (true) or not disabled (false). Does not influence the appearance of the control. Therefore, the control will not be drawn again after changing this flag.

Parameters
bDisabledBoolean value indicating the new state.

Reimplemented in CGUIComboBox, and CGUICompositeObject.

◆ SetFocussable()

void CGUIObject::SetFocussable ( const eC_Bool &  bFocussable)
virtual

Set the object's state to focusable (true) or not focusable (false).

Parameters
bFocussableBoolean value indicating the new state.

Reimplemented in CGUICompositeObject.

◆ SetGrayedOut()

void CGUIObject::SetGrayedOut ( const eC_Bool &  bGrayOut)
virtual

Set the object's status to grayed out (true) or not grayed out (false).

Parameters
bGrayOutBoolean value indicating the new state.

Reimplemented in CGUIComboBox, CGUICompositeObject, and CGUIPrimitiveButton.

◆ SetHeight()

◆ SetID()

void CGUIObject::SetID ( const ObjectHandle_t eID)
inline

Sets the ID of the object.

Parameters
eIDObject ID to set

◆ SetInvisible()

void CGUIObject::SetInvisible ( const eC_Bool &  bInvisible)
virtual

Set the object's status to invisible (true) or not invisible (false).

Parameters
bInvisibleBoolean value indicating the new state.

Reimplemented in CGUICompositeObject, and CGUILayerContainer.

◆ SetLayouter()

void CGUIObject::SetLayouter ( CGUILayouter pLayouter)

Sets the layouter for this object. Attention: This will delete any other layouter which is currently attached to this object.

Parameters
pLayouterPointer to CGUILayouter instance, which will be attached to this object
See also
CGUILayouter::SetObject()

◆ SetNeighborBottomID()

void CGUIObject::SetNeighborBottomID ( const ObjectHandle_t  eNewNeighborBottomID)
inline

Sets the bottom neighbor, that is used by the 4-way focusing algorithm.

Parameters
eNewNeighborBottomIDThe ID of the object to the bottom ('south') of this object.

◆ SetNeighborIDs()

void CGUIObject::SetNeighborIDs ( const ObjectHandle_t  eNewNeighborLeftID,
const ObjectHandle_t  eNewNeighborRightID,
const ObjectHandle_t  eNewNeighborTopID,
const ObjectHandle_t  eNewNeighborBottomID 
)
inline

Sets all neighbors, that are used by the 4-way focusing algorithm.

Parameters
eNewNeighborLeftIDThe ID of the object to the left ('west') of this object.
eNewNeighborRightIDThe ID of the object to the right ('east') of this object.
eNewNeighborTopIDThe ID of the object to the top ('north') of this object.
eNewNeighborBottomIDThe ID of the object to the bottom ('south') of this object.

◆ SetNeighborLeftID()

void CGUIObject::SetNeighborLeftID ( const ObjectHandle_t  eNewNeighborLeftID)
inline

Sets the left neighbor, that is used by the 4-way focusing algorithm.

Parameters
eNewNeighborLeftIDThe ID of the object to the left ('west') of this object.

◆ SetNeighborRightID()

void CGUIObject::SetNeighborRightID ( const ObjectHandle_t  eNewNeighborRightID)
inline

Sets the right neighbor, that is used by the 4-way focusing algorithm.

Parameters
eNewNeighborRightIDThe ID of the object to the right ('east') of this object.

◆ SetNeighborTopID()

void CGUIObject::SetNeighborTopID ( const ObjectHandle_t  eNewNeighborTopID)
inline

Sets the top neighbor, that is used by the 4-way focusing algorithm.

Parameters
eNewNeighborTopIDThe ID of the object to the top ('north') of this object.

◆ SetParent()

void CGUIObject::SetParent ( CGUICompositeObject *const  pParent)
virtual

Assign this object to a different parent. This will automatically remove it from the current parent's childlist, and append it to the new parent.

Parameters
pParentPointer to new parent object

Reimplemented in CGUIListItem.

◆ SetRelRect()

void CGUIObject::SetRelRect ( const CGUIRect kNewRect)
inline

Sets the bounding rectangle of the object in coordinates that are relative to the parent object.

Parameters
kNewRectRectangle describing the new size and position of the object in relative coordinates

◆ SetRelXPos()

void CGUIObject::SetRelXPos ( const eC_Value &  vX)
virtual

Sets this object's current relative X-position.

Parameters
vXThe position

◆ SetRelXPosCenter()

void CGUIObject::SetRelXPosCenter ( const eC_Value &  vXCenter)
inline

Sets this object's current relative X-position of the object's center to the given X-position 'vXCenter' by modifying X-position of the object accordingly. These positions are relative to parent's origin.

Note
This is not necessarily the relative X-position on screen later on.
Parameters
vXCenterThe position

◆ SetRelXPosREdge()

void CGUIObject::SetRelXPosREdge ( const eC_Value &  vX)
inline

Sets this object's current relative X-position of the object's lower right corner + 1 to the given X-position 'vX' by modifying X-position of the object accordingly. These positions are relative to parent's origin.

Note
This is not necessarily the relative X-position on screen later on.
Parameters
vXThe position

◆ SetRelYPos()

void CGUIObject::SetRelYPos ( const eC_Value &  vY)
virtual

Sets this object's current relative Y-position.

Parameters
vYThe position

◆ SetRelYPosBEdge()

void CGUIObject::SetRelYPosBEdge ( const eC_Value &  vY)
inline

Sets this object's current relative Y-position of the object's lower right corner + 1 to the given Y-position 'vY' by modifying Y-position of the object accordingly. These positions are relative to parent's origin.

Note
This is not necessarily the relative Y-position on screen later on.
Parameters
vYThe position

◆ SetRelYPosCenter()

void CGUIObject::SetRelYPosCenter ( const eC_Value &  vYCenter)
inline

Sets this object's current relative Y-position of the object's center to the given Y-position 'vYCenter' by modifying Y-position of the object accordingly. These positions are relative to parent's origin.

Note
This is not necessarily the relative Y-position on screen later on.
Parameters
vYCenterThe position

◆ SetStopFocus()

void CGUIObject::SetStopFocus ( const eC_Bool &  bDontFocusToParent)
inline

Prevents the object from moving the focus upwards in the GUI Object tree. Setting the StopFocus flag for a CompositeObject will prevent the focus from moving out of this CompositeObject once it is inside.

Parameters
bDontFocusToParentTRUE if the focus is not allowed to leave this object.

◆ SetValue() [1/2]

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

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 in CGUIClock, CGUIKnob, CGUIWheel, CGUICircularSlider, CGUIBaseButton, CGUIBaseTextField, CGUIComboBox, CGUIBaseInputField, CGUIBaseCheckBox, CGUIImageStack, CGUICarousel, CGUIPageContainer, CGUIAnimatedImage, CGUIWheelContainer, CGUIRadialSlider, CGUIScrollBar, CGUIRangeSlider, CGUIRadioButtonGroup, and CGUIAbstractBar.

◆ SetValue() [2/2]

virtual eC_Bool CGUIObject::SetValue ( CDataPoolEntry rkValue)
inlinevirtual

Generic interface used by the DataPool for setting values in GUIObjects. By default, this maps directly onto the SetValue() API dealing with a single CGUIValue.

Parameters
rkValueReference to the DataPoolEntry used for retrieving the value(s)
Returns
The return value of the called API (Usually True if OK and False in case of error).

Reimplemented in CGUIChart, and CGUIComboBox.

◆ SetWidth()

◆ WriteToStream()

void CGUIObject::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 CGUIStreamableObject.

Reimplemented in CGUIChart, CGUIComboBox, CGUIClock, CGUIMultiLineEdit, CGUIListBox, CGUIBaseInputField, CGUIProgressBar, CGUIEdit, CGUIWheel, CGUITabContainer, CGUIGraph, CGUIScrollView, CGUIKeyboard, CGUITableView, CGUIPlot, CGUIAbstractBar, CGUICarousel, CGUIImageStack, CGUIKnob, CGUIIconButton, CGUIBaseTextField, CGUIMenuBar, CGUIGauge, CGUIPrimitiveButton, CGUIWheelContainer, CGUIAnimatedImage, CGUITouchScrollView, CGUICircularSlider, CGUITabItem, CGUIButton, CGUIExpandingComposite, CGUIMenuItem, CGUITextField, CGUIBaseCheckBox, CGUIScrollBar, CGUISegmentBar, CGUIListItem, CGUIScrollingTextField, CGUICenterFocusContainer, CGUIBaseMessageBox, CGUIGroupContainer, CGUIBaseButton, CGUIRadioButtonGroup, CGUISlider, CGUICheckBox, CGUIBaseSlider, CGUIInputField, CGUIRadialBar, CGUIVideo, CGUIImage, CGUIBlendButton, CGUIRepositionCompositeObject, CGUIFragmentContainer, CGUIPageContainer, CGUILayerContainer, CGUICompositeObject, CGUIMenu, CGUIRangeSlider, CGUIBaseRadioButton, CGUIRadioButton, CGUIRadialSlider, CGUITabClientArea, CGUIGeometryObject, CGUIRadialProgressBar, CGUIComboBoxHeader, CGUIMenuItemSeparator, CGUITextContainer, CGUIMenuBase, CGUICalendar, and CGUISplitContainer.

Friends And Related Function Documentation

◆ CGUI

friend class CGUI
friend

◆ CGUICompositeObject

friend class CGUICompositeObject
friend

CompositeObject's HandleDraw() should be able to update the absolute coordinates before DoDraw() is called. No derived class should manipulate absolute coordinates as they are recalculated automatically by the framework.

Also CGUIObject::FourWayNext() will be called by CompositeObject's FourWayNext() and CGUI's FourWayFocusNext()


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