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

This is the Guiliani base class for all composite objects. More...

#include <GUICompositeObject.h>

Inheritance diagram for CGUICompositeObject:

Public Member Functions

 CGUICompositeObject ()
 
 CGUICompositeObject (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)
 
 CGUICompositeObject (CGUICompositeObject *const pParent, const CGUIRect &kRect, const ObjectHandle_t &eID=NO_HANDLE)
 
 CGUICompositeObject (const CGUICompositeObject &kSource)
 
virtual ~CGUICompositeObject ()
 This destructor is automatically virtual, as the base class destructor is virtual.
 
virtual eC_Bool AddObject (CGUIObject *pkObject)
 
eC_Bool BringToFront (const CGUIObject *pkObject)
 
eC_Bool CanBeCyclicFocussed () const
 
virtual eC_Bool DoPostDraw ()
 
void DrawOnTop (CGUIObject *pkObject)
 
void DrawOnTopOf (CGUIObject *const pkObject, CGUIObject *const pDrawOnTopOf)
 
virtual CGUIObjectFindObject (const eC_Value &vAbsX, const eC_Value &vAbsY)
 
void Flip (const eC_Bool &rbVertical)
 
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)
 
const CGUIObjectGetAndCheckObjectByID (ObjectHandle_t eObjID, const eC_String &kObjectName) const
 
CGUIObjectGetAndCheckObjectByID (ObjectHandle_t eObjID, const eC_String &kObjectName)
 
CGUIObjectGetChild (const eC_UInt uIndex) const
 
CGUIObjectGetChild (const eC_UInt uIndex)
 
const ObjectPtrListGetChildObjectsList () const
 
const ObjectPtrListGetDrawOrderList () const
 
eC_Int GetIndexOfChild (const CGUIObject *pkObject) const
 
eC_UInt GetNumberOfChildren () const
 
CGUIObjectGetObjectByID (const ObjectHandle_t &eID, const eC_Bool &bOnlyVisible=false)
 
const CGUIObjectGetObjectByID (const ObjectHandle_t &eID, const eC_Bool &bOnlyVisible=false) const
 
eC_Bool InsertChildAt (const eC_UInt cuiIndex, CGUIObject *pkChild)
 
void InvalidateChildren ()
 Invalidates all chidren, but not this parent.
 
eC_Bool IsAncestorOf (const CGUIObject *pkObject) const
 
virtual eC_Bool IsCompositeObject () const
 
eC_Bool LowerOneLevel (const CGUIObject *pkObject)
 
CGUICompositeObjectoperator= (const CGUICompositeObject &kSource)
 
eC_Bool RaiseOneLevel (const CGUIObject *pkObject)
 
virtual void ReadFromStream ()
 
virtual void RefreshLayout (CGUILayouter::eMovedEdges_t eMovedEdges) const
 
void RemoveAllChildren ()
 
virtual void RemoveObject (CGUIObject *pkObject)
 
void Rotate (const eC_UInt &ruiDegrees, const eC_Bool &rbFirst=false)
 
eC_Bool SendToBack (const CGUIObject *pkObject)
 
virtual void SetClickThrough (const eC_Bool &bClickThrough)
 
virtual void SetClickThrough (const eC_Bool &bClickThrough, const eC_Bool &bChildrenClickThrough)
 
void SetCyclicFocus (const eC_Bool &bCyclicFocus)
 
virtual void SetDisabled (const eC_Bool &bDisabled)
 
virtual void SetDisabled (const eC_Bool &bDisabled, const eC_Bool &bChildrenDisabled)
 
virtual void SetFocussable (const eC_Bool &bFocussable)
 
virtual void SetFocussable (const eC_Bool &bFocussable, const eC_Bool &bChildrenFocussable)
 
virtual void SetGrayedOut (const eC_Bool &bGrayedOut)
 
virtual void SetGrayedOut (const eC_Bool &bGrayedOut, const eC_Bool &bChildrenGrayedOut)
 
virtual void SetHeight (const eC_Value &vY)
 
virtual void SetInvisible (const eC_Bool &bInvisible)
 
virtual void SetInvisible (const eC_Bool &bInvisible, const eC_Bool &bChildrenInvisible)
 
virtual void SetWidth (const eC_Value &vX)
 
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 DoDraw ()
 
virtual eC_Bool DoDrawSnapshot ()
 
virtual void EnableSnapshotDrawing ()
 
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
 
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)
 
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)
 
void SetID (const ObjectHandle_t &eID)
 
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)
 
- 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_CHILDREN [] = "Children"
 XML comment tag to be used before writing children to a stream.
 
static const eC_Char XMLTAG_ENDCHILDREN [] = "/Children"
 XML comment tag to be used after writing children to a stream.
 
- 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"
 

Protected Member Functions

virtual eC_Bool FourWayNext (FourWayFocus_t eFocusDirection)
 
ObjectPtrListGetChildObjectsList ()
 
virtual void HandleDraw (const CGUIRect &ClipRect)
 
- Protected Member Functions inherited from CGUIObject
virtual eC_Bool CreateBitmapPlane ()
 
- 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 CGfxWrap
 
class CGUIObject
 

Additional Inherited Members

- Public Types inherited from CGUIObject
enum  FourWayFocus_t { FOCUS_LEFT, FOCUS_RIGHT, FOCUS_UP, FOCUS_DOWN }
 

Detailed Description

This is the Guiliani base class for all composite objects.

composite_object.png
The "composite object" serves as a container, which can contain and manage several other controls. It provides an own coordinate-system and clipping area to its children. The "composite object" control can be used to create e.g. pop-ups or windows (Class: CGUICompositeObject).

CompositeObjects serve as containers, which can contain and manage several child objects. A CGUICompositeObject inherits all basic features from CGUIObject and adds child management. Complex objects, which consist of several sub-objects such as ScrollViews, RadioButton-Groups or Menus, are typically implemented as CompositeObjects.

The CGUICompositeObject itself defines...

  • a local coordinate system for its children.
  • a bounding rectangle, which clips all graphic operations of the children.

The fact that a CompositeObject defines a local coordinate system for its child objects means that all children will be positioned relative to their parent composite object. You can think of having a new coordinate system with (0,0) at the upper left edge of the CompositeObject. The coordinates that you pass to the constructor of the child are the offsets within the composite object's bounding rectangle. That means these are coordinates relative to the parent and not absolute coordinates of the screen. Please refer to Coordinate systems for a comprehensive explanation of Guiliani's coordinate systems.

The clipping area spanned by the CompositeObject defines the area on the screen in which the composite object itself, and all its children (and their children) are allowed to draw. Everything outside of the area of the CompositeObject will be clipped away and therefore not be visible. It is perfectly valid though, to place child objects outside of the parent's region (even at negative coordinates). A standard use-case for this is scrolling, where you will intentionally place objects at positions outside the visible area, and then gradually scroll them into view.

A note on a CGUICompositeObject's default state upon creation: By default CGUICompositeObjects will be disabled and not focusable. This means they will not receive the focus and will not react to any events (e.g. will not react to clicks). Please use the SetDisabled() and SetFocussable() methods if you desire a different behaviour. Be aware that they will receive events triggered on child-objects, though. E.g. if a child object receives a DoClick() event this will also be forwarded to a disabled CGUICompositeObject - following the standard chain-of-responsibility.

Constructor & Destructor Documentation

◆ CGUICompositeObject() [1/4]

CGUICompositeObject::CGUICompositeObject ( )

CGUICompositeObject standard constructor.

See also
CGUIObject().

◆ CGUICompositeObject() [2/4]

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

CGUICompositeObject constructor.

Parameters
pParentPointer to the designated parent object.
vXX-position relative to its parent object
vYY-position relative to its parent object
vWidthWidth of the composite object
vHeightHeight of the composite object
eIDObject Identifier of this composite object (choose NO_HANDLE if none is required)

◆ CGUICompositeObject() [3/4]

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

CGUICompositeObject constructor.

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

◆ CGUICompositeObject() [4/4]

CGUICompositeObject::CGUICompositeObject ( const CGUICompositeObject kSource)

Copy-constructor of CGUICompositeObject. The child-objects-list and the draw-order-list will not be copied, because you don't know, which object pointers are within the lists. So there is no possibility to make real copies (=deep copies) of the objects within the list.

Parameters
kSourceSource object to be copied.

Member Function Documentation

◆ AddObject()

eC_Bool CGUICompositeObject::AddObject ( CGUIObject pkObject)
virtual

Add a new Object to the list of child objects. This will automatically set the child's parent-pointer to this object.

Parameters
pkObjectThe object to be added
Returns
False if the object is already a child of this control or pkObject is NULL, otherwise true.

Reimplemented in CGUITabContainer, CGUITableView, CGUIScrollView, CGUIMenu, CGUICarousel, CGUITabClientArea, CGUIPageContainer, CGUIExpandingComposite, CGUIWheelContainer, CGUISplitContainer, and CGUIGroupContainer.

◆ BringToFront()

eC_Bool CGUICompositeObject::BringToFront ( const CGUIObject pkObject)

bring object to front of container, so it is above all other children

Parameters
pkObjectobject to bring to front
Returns
true if successful false on error

◆ CanBeCyclicFocussed()

eC_Bool CGUICompositeObject::CanBeCyclicFocussed ( ) const
inline

Method to check whether this composite object can be cyclic focused. That is whether the focus restarts from the beginning when it passes the last object within the object's child list (and vice-versa) in case of two-way focusing.

Returns
True, the object can be cyclic focused, False otherwise.

◆ DoPostDraw()

eC_Bool CGUICompositeObject::DoPostDraw ( )
virtual

This slot may be implemented by derived classes to add visualization code which is executed after any child object have been drawn. Unlike DoDraw, which is being called BEFORE any children are being drawn, this method will be automatically called by the framework AFTER all children have been drawn.

Returns
True if anything was drawn, False otherwise

Reimplemented in CGUIListBox, CGUI, CGUILayerContainer, CGUIPageContainer, CGUIFragmentContainer, and CGUISplitContainer.

◆ DrawOnTop()

void CGUICompositeObject::DrawOnTop ( CGUIObject pkObject)

Moves the given Object to the top of the drawing order, thus making it appear in the foreground after the next redraw.

Parameters
pkObjectThe object to move to the top

◆ DrawOnTopOf()

void CGUICompositeObject::DrawOnTopOf ( CGUIObject *const  pkObject,
CGUIObject *const  pDrawOnTopOf 
)

Moves the given Object's position within the drawing order, so that it gets drawn on top of the object pointed to by pDrawOnTopOf. Note that both objects must be children of this CompositeObject.

Special case: If you want pkObject to be drawn before all other children, that is only atop of its parent, but beneath all other children, you can do so by supplying its parent-pointer as pDrawOnTopOf.

Parameters
pkObjectPointer to object whose drawing order is to be changed
pDrawOnTopOfPointer to the object above which pkObject will be drawn from now on

◆ FindObject()

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

Retrieves a pointer to the object, which has the topmost position at the given coordinates. 'Topmost' refers to the control last drawn (z order). If the object is invisible, or its 'ClickThrough' attribute is set to TRUE, it will not be found by this operation. In this case the search is continued among any other existing Objects at the given position.

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 object at the position. Can be NULL if no object was found at that position or if there are only invisible objects at the position.

Reimplemented from CGUIObject.

◆ Flip()

void CGUICompositeObject::Flip ( const eC_Bool &  rbVertical)

flips the object and all children inside

Parameters
rbVerticalif true flip vertically else horizontally

◆ FocusAny()

eC_Bool CGUICompositeObject::FocusAny ( )
virtual

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 from CGUIObject.

Reimplemented in CGUIListBox, and CGUIMenuBase.

◆ FocusNext()

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

Set focus to the next focusable child object after the currently focused one. Usually this function will be called on the currently focused object with no arguments.

Attention: It is forbidden to manipulate the creation tree, especially to delete the object referenced by ms_pFirstRequestedObj or change the cyclic or StopFocus flags of the object referenced by ms_pFocusTerminatingObj when a FocusNext search procedure is running so don't manipulate the creation tree in RequestFocus() or a derived FocusNext(), FocusNextDown() or similar (in any function called by FocusNext()).

Algorithm: Next FocusNext() in the recursion is called on this or parent object. FocusNextDown() is called on this or child object. We decide where to move forwards (up/down/sideways) (up shall be in direction to the root) by the following information: Subtree (RefObj and its subtree) has been processed? Which child is currently referenced? We always use the following prioritization to determine the next step:

  1. down on reference object (initially first child, plus indicating subtree is not yet considered)
  2. sideways to next child (sibling of reference object, plus indicating subtree is not yet considered)
  3. up to parent (using this object as next reference object, plus indicating subtree has already been considered)
Parameters
pRefObjusually is 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
True if focus was obtained, False otherwise

Reimplemented from CGUIObject.

◆ FocusPrevious()

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

Set focus to the previous focusable child object before the currently focused one, also please refer to FocusNext().

See also
FocusNext

Attention: It is forbidden to manipulate the creation tree, especially to delete the object referenced by ms_pFirstRequestedObj or change the cyclic or StopFocus flags of the object referenced by ms_pFocusTerminatingObj when a FocusPrevious search procedure is running, so don't manipulate the creation tree in RequestFocus() or a derived FocusPrevious(), FocusPreviousDown() or similar (in any function called by FocusPrevious()).

Next FocusPrevious() is called on this or parent object. FocusPreviousDown() is called on this or child object. We decide where to move forwards (up/down/sideways) (up shall be in direction to the root) by the following information: Subtree (RefObj and its subtree) has been processed? Which child is currently referenced? We always use the following prioritization to determine the next step:

  1. down on reference object (initially last child, plus indicating subtree is not yet considered)
  2. sideways to next child (sibling of reference object, plus indicating subtree is not yet considered)
  3. up to parent (using this object as next reference object, plus indicating subtree has already been considered)
Parameters
pRefObjusually is a child of this object which indicates the current position in the child list.
bSubTreeOfRefObjDoneindicates if the subtree that is under pRefObj and the subtrees of pRefObj's elder (usually in creation time) sibling have already been asked to take focus, or if not.
Returns
True if focus was obtained, False otherwise

Reimplemented from CGUIObject.

◆ FourWayNext()

eC_Bool CGUICompositeObject::FourWayNext ( FourWayFocus_t  eFocusDirection)
protectedvirtual

Helper function. Declared protected because you may want to add extra functionality to this function in a derived class and then call the base implementation afterwards. Called when the focus should be set to the next control that is to the given direction of the currently focused object. Please use CGUI::FourWayFocusNext() if you want to focus the next control that is in the specific direction of the currently focused object and not this function.

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.
Parameters
eFocusDirectionThe focus direction
See also
CGUI::FourWayFocusNext()

Reimplemented from CGUIObject.

Reimplemented in CGUIMenuBar, and CGUIMenu.

◆ GetAndCheckObjectByID() [1/2]

const CGUIObject * CGUICompositeObject::GetAndCheckObjectByID ( ObjectHandle_t  eObjID,
const eC_String &  kObjectName 
) const

Tries to find an object with a specific ID. The object is searched in a specific parent composite object. If the object could not be found, an exception is thrown.

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

Parameters
eObjIDThe ID of the object to be searched.
kObjectNameThe name of the object. Will be shown in the message that is generated when throwing an exception.
Returns
Returns pointer to the object if it was found, otherwise NULL
Exceptions
CGUIExceptionif no object with the given ID was found.

◆ GetAndCheckObjectByID() [2/2]

CGUIObject* CGUICompositeObject::GetAndCheckObjectByID ( ObjectHandle_t  eObjID,
const eC_String &  kObjectName 
)
inline

Tries to find an object with a specific ID. The object is searched in a specific parent composite object. If the object could not be found, an exception is thrown.

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

Parameters
eObjIDThe ID of the object to be searched.
kObjectNameThe name of the object. Will be shown in the message that is generated when throwing an exception.
Returns
Returns pointer to the object if it was found, otherwise NULL
Exceptions
CGUIExceptionif no object with the given ID was found.

◆ GetChild() [1/2]

CGUIObject * CGUICompositeObject::GetChild ( const eC_UInt  uIndex) const

Returns a pointer to the specified child.

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

Parameters
uIndexIndex of the child, zero-based, that is, first child has index zero.
Returns
Returns pointer to the child if it was found, otherwise NULL.

◆ GetChild() [2/2]

CGUIObject* CGUICompositeObject::GetChild ( const eC_UInt  uIndex)
inline

Returns a pointer to the specified child.

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

Parameters
uIndexIndex of the child, zero-based, that is, first child has index zero.
Returns
Returns pointer to the child if it was found, otherwise NULL.

◆ GetChildObjectsList() [1/2]

const ObjectPtrList& CGUICompositeObject::GetChildObjectsList ( ) const
inline

Retrieves a reference to this object's list of child objects. Note that the returned pointer is "const" to assure that no external object may change the list itself. You may use the returned pointer to access the objects therein, though.

// Get Copy of child list
const CGUICompositeObject* pConstComposite = pSomeCompositeObject;
ObjectPtrList kList = pConstComposite->GetChildObjectsList();
// Iterate over list
FOR_ALL_FORWARD(kIter, kList)
{
// do something with the child
}
Returns
const reference to this object's list of child objects

◆ GetChildObjectsList() [2/2]

ObjectPtrList& CGUICompositeObject::GetChildObjectsList ( )
inlineprotected

Retrieves a pointer to this object's list of child objects.

Returns
pointer to this object's list of child objects

◆ GetDrawOrderList()

const ObjectPtrList& CGUICompositeObject::GetDrawOrderList ( ) const
inline

Retrieves a reference to this object's draw-order list. This list defines the order in which child-objects will be drawn during the redraw cycle. The foremost object will be the last entry within the list. You are not allowed to make any changes to this list, since it is entirely controlled by the CGUICompositeObject base-class, but you may investigate the list's content, if desired.

Returns
const reference to this object's draw-order list

◆ GetIndexOfChild()

eC_Int CGUICompositeObject::GetIndexOfChild ( const CGUIObject pkObject) const

Returns the corresponding index to a pointer to a child.

Parameters
pkObjectPointer to the child.
Returns
Returns the index of the child if it was found, otherwise -1.

◆ GetNumberOfChildren()

eC_UInt CGUICompositeObject::GetNumberOfChildren ( ) const
inline

Returns the number of children.

Returns
Number of children in this composite object.

◆ GetObjectByID() [1/2]

CGUIObject* CGUICompositeObject::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 pointer to the object if it was found, otherwise NULL. Searching for NO_HANDLE will return NULL.

◆ GetObjectByID() [2/2]

const CGUIObject * CGUICompositeObject::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 pointer to the object if it was found, otherwise NULL. Searching for NO_HANDLE will return NULL.

◆ HandleDraw()

void CGUICompositeObject::HandleDraw ( const CGUIRect ClipRect)
protectedvirtual

This method visualizes this object and the objects it contains (child objects). Internally this does all necessary clipping and checking against the currently invalidated region. Note that erroneous overriding of this method may result in corrupted graphical output of the GUI.

Parameters
ClipRectThe clipping rectangle

Reimplemented from CGUIObject.

Reimplemented in CGUILayerContainer.

◆ InsertChildAt()

eC_Bool CGUICompositeObject::InsertChildAt ( const eC_UInt  cuiIndex,
CGUIObject pkChild 
)

Inserts a child at the given index within the child list. Inserting a child, which is already part of this object will move it to the given index. Supplying an illegal index will add the object at the end.

Parameters
cuiIndexThe index of insertion.
pkChildThe child which has to be inserted.
Returns
True if successful, False otherwise

◆ IsAncestorOf()

eC_Bool CGUICompositeObject::IsAncestorOf ( const CGUIObject pkObject) const

Checks if the given object is a child of the current object. Therefore, the whole child tree will be browsed, so that also not only direct children can be found.

Parameters
pkObjectPointer to the object that might be a child of the current object.
Returns
True if the given object is a child (not only a direct one) of the current object or the object itself.

◆ IsCompositeObject()

virtual eC_Bool CGUICompositeObject::IsCompositeObject ( ) const
inlinevirtual

Decide whether the returned GUIObject is CompositeObject or not. Please DO NOT override this method anymore in the derived class, because it is only used in the CGUIObject and CGUICompositeObject to indicate whether an object is a composite object or not.

Returns
Returns true.

Reimplemented from CGUIObject.

◆ LowerOneLevel()

eC_Bool CGUICompositeObject::LowerOneLevel ( const CGUIObject pkObject)

lower object one level, so it switchs positions with the object directly below it

Parameters
pkObjectobject to lower one level
Returns
true if successful false on error

◆ operator=()

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

Operator = method of CGUICompositeObject. The old child-objects entries in the list will be deleted. The child-objects-list and the draw-order-list will be cleared. The source child-objects-list and the draw-order-list will not be copied to the lists of this object, because you don't know, which object pointers are within the lists. So there is no possibility to make deep copies of the objects within the list.

Parameters
kSourceSource object to be copied.
Returns
Copied object (without draw-order- and child-objects-list).

◆ RaiseOneLevel()

eC_Bool CGUICompositeObject::RaiseOneLevel ( const CGUIObject pkObject)

raise object one level, so it switches positions with the object directly above it

Parameters
pkObjectobject to raise one level
Returns
true if successful false on error

◆ ReadFromStream()

void CGUICompositeObject::ReadFromStream ( )
virtual

Reads composite object attributes and children from stream. Reads attributes from the streaming file. Only for use with GUIFactoryManager.

See also
CGUIObject::ReadFromStream()
Exceptions
CGUIStreamingControlExceptionWhen catching a CGUIStreamingControlException from a child, this method adds the object from the exception, resets the object pointer to 'this', then re-throws.

Reimplemented from CGUIObject.

Reimplemented in CGUIComboBox, CGUIMultiLineEdit, CGUIListBox, CGUIBaseInputField, CGUITabContainer, CGUIScrollView, CGUIKeyboard, CGUICarousel, CGUITableView, CGUIMenuBar, CGUIPrimitiveButton, CGUIWheelContainer, CGUITouchScrollView, CGUITabItem, CGUIExpandingComposite, CGUIScrollBar, CGUICenterFocusContainer, CGUIBaseMessageBox, CGUIGroupContainer, CGUIRadioButtonGroup, CGUIInputField, CGUIRepositionCompositeObject, CGUIFragmentContainer, CGUIPageContainer, CGUILayerContainer, CGUIMenu, CGUITabClientArea, CGUIComboBoxHeader, CGUIMenuBase, and CGUISplitContainer.

◆ RefreshLayout()

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

Call this method to refresh this object's and all of its children's layouts. Changing this object's width or height will automatically invoke this method.

Note
Layouters usually don't need to inform their object's parent's layouter as layouting steadily goes from parent to child. That is, parent's DoLayout() is called before its children's DoLayout()s are called.
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 from CGUIObject.

◆ RemoveAllChildren()

void CGUICompositeObject::RemoveAllChildren ( )

Removes and deletes all children from the composite object and empties the draw order list.

◆ RemoveObject()

void CGUICompositeObject::RemoveObject ( CGUIObject pkObject)
virtual

Removes an object from the list of child objects. This will not delete the object! If you wish to physically delete an object, you should use the C++ delete operator. The destructor of the object will then remove the object from the child list by calling this method.

Parameters
pkObjectThe object to be removed

Reimplemented in CGUIComboBox, CGUIMultiLineEdit, CGUIBaseInputField, CGUITabContainer, CGUIScrollBar, CGUIScrollView, CGUIMenu, CGUICarousel, CGUITabClientArea, CGUIPageContainer, CGUIWheelContainer, and CGUISplitContainer.

◆ Rotate()

void CGUICompositeObject::Rotate ( const eC_UInt &  ruiDegrees,
const eC_Bool &  rbFirst = false 
)

rotates the object and all children inside

Parameters
ruiDegreesdegress to rotate (90, 180, 270)
rbFirsttrue if first object in hierarchy

◆ SendToBack()

eC_Bool CGUICompositeObject::SendToBack ( const CGUIObject pkObject)

send object to back of container, so it is below all other children

Parameters
pkObjectobject to send to back
Returns
true if successful false on error

◆ SetClickThrough() [1/2]

virtual void CGUICompositeObject::SetClickThrough ( const eC_Bool &  bClickThrough)
inlinevirtual

Set only this composite object clickthrough. This method simply calls the base implementation CGUIObject::SetClickThrough(). If you also want to set the children's clickthrough-state, use SetClickThrough(const eC_Bool&, const eC_Bool&) instead.

Parameters
bClickThroughThe new clickthrough state of this composite object.
See also
SetClickThrough(const eC_Bool&, const eC_Bool&)

◆ SetClickThrough() [2/2]

void CGUICompositeObject::SetClickThrough ( const eC_Bool &  bClickThrough,
const eC_Bool &  bChildrenClickThrough 
)
virtual

Set this composite object and its children clickthrough or not.

Parameters
bClickThroughSet this composite object to clickthrough if true.
bChildrenClickThroughSet all children of this composite object to cklickthrough.

◆ SetCyclicFocus()

void CGUICompositeObject::SetCyclicFocus ( const eC_Bool &  bCyclicFocus)
inline

Sets the FindNext()'s and FindPrevious()'s ability to try to focus the children in a cyclic manner, i.e. the first child follows the last and the last child preceeds the first.

Parameters
bCyclicFocusBoolean value indicating the new state. TRUE if the algorithm may jump to the child at the other end of the list. FALSE if the algorithm should stop at the end of the child list, thus not jump up to the parent.

◆ SetDisabled() [1/2]

virtual void CGUICompositeObject::SetDisabled ( const eC_Bool &  bDisabled)
inlinevirtual

Set only this composite object disabled or enabled. This method simply calls the base implementation CGUIObject::SetDisabled(). If you also want to set the children's enabled state, use SetDisabled(const eC_Bool&, const eC_Bool&) instead.

Parameters
bDisabledThe new enabled state of this composite object.
See also
SetDisabled(const eC_Bool&, const eC_Bool&)

Reimplemented from CGUIObject.

Reimplemented in CGUIComboBox.

◆ SetDisabled() [2/2]

void CGUICompositeObject::SetDisabled ( const eC_Bool &  bDisabled,
const eC_Bool &  bChildrenDisabled 
)
virtual

Set this control disable or not. Whether the children will be set or not depends on parameter bChildrenDisabled

Parameters
bDisabledDisabled, when true. otherwise, false
bChildrenDisabledState of the children.

◆ SetFocussable() [1/2]

virtual void CGUICompositeObject::SetFocussable ( const eC_Bool &  bFocussable)
inlinevirtual

Set only this composite object focusable or not. This method simply calls the base implementation CGUIObject::SetFocussable(). If you also want to set the children's focusability, use SetFocussable(const eC_Bool&, const eC_Bool&) instead.

Parameters
bFocussableThe new focusable state of this composite object.
See also
SetFocussable(const eC_Bool&, const eC_Bool&)

Reimplemented from CGUIObject.

◆ SetFocussable() [2/2]

void CGUICompositeObject::SetFocussable ( const eC_Bool &  bFocussable,
const eC_Bool &  bChildrenFocussable 
)
virtual

Set this composite object and its children focusable or not.

Parameters
bFocussableSet this composite object to be focusable if true.
bChildrenFocussableSet all children of this composite object to be focusable.

◆ SetGrayedOut() [1/2]

virtual void CGUICompositeObject::SetGrayedOut ( const eC_Bool &  bGrayedOut)
inlinevirtual

Set only this composite object grayed-out. This method simply calls the base implementation CGUIObject::SetGrayedOut(). If you also want to set the children's state, use SetGrayedOut(const eC_Bool&, const eC_Bool&) instead.

Parameters
bGrayedOutThe new grayed-out state of this composite object.
See also
SetGrayedOut(const eC_Bool&, const eC_Bool&)

Reimplemented from CGUIObject.

Reimplemented in CGUIComboBox, and CGUIPrimitiveButton.

◆ SetGrayedOut() [2/2]

void CGUICompositeObject::SetGrayedOut ( const eC_Bool &  bGrayedOut,
const eC_Bool &  bChildrenGrayedOut 
)
virtual

Set this control and its children grayedout or not.

Parameters
bGrayedOutGrayedout, when true. otherwise, false
bChildrenGrayedOutGray out the children or 'un-gray-out' them.

◆ SetHeight()

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

Overridden SetHeight method. A composite object will call DoLayout() on itself when its width/height is changed if its associated layouter is independent of the parent's size. Afterwards in any case its direct children's DoLayout() of their layouters are called.

Parameters
vYThe new height

Reimplemented from CGUIObject.

Reimplemented in CGUIComboBox, CGUITableView, CGUIListBox, CGUITabContainer, CGUIBaseInputField, CGUIScrollView, CGUICarousel, CGUIPageContainer, CGUIComboBoxHeader, CGUIWheelContainer, CGUIFragmentContainer, CGUIExpandingComposite, and CGUISplitContainer.

◆ SetInvisible() [1/2]

virtual void CGUICompositeObject::SetInvisible ( const eC_Bool &  bInvisible)
inlinevirtual

Set only this composite object invisible or visible. This method simply calls the base implementation CGUIObject::SetInvisible(). If you also want to set the children's visibility, use SetInvisible(const eC_Bool&, const eC_Bool&) instead.

Parameters
bInvisibleThe new visibility state of this composite object.
See also
SetInvisible(const eC_Bool&, const eC_Bool&)

Reimplemented from CGUIObject.

Reimplemented in CGUILayerContainer.

◆ SetInvisible() [2/2]

void CGUICompositeObject::SetInvisible ( const eC_Bool &  bInvisible,
const eC_Bool &  bChildrenInvisible 
)
virtual

Set this composite object and its children invisible or visible.

Parameters
bInvisibleIf true, this composite object will be invisible, if false, the composite object will be visible.
bChildrenInvisibleIf true, all children (and their children) will be invisible. If false, the children will be visible.

◆ SetWidth()

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

Overridden SetWidth method. A composite object will call DoLayout() on itself when its width/height is changed if its associated layouter is independent of the parent's size. Afterwards in any case its direct children's DoLayout() of their layouters are called.

Parameters
vXThe new width

Reimplemented from CGUIObject.

Reimplemented in CGUIComboBox, CGUITableView, CGUIListBox, CGUITabContainer, CGUIBaseInputField, CGUIScrollView, CGUICarousel, CGUIPageContainer, CGUIComboBoxHeader, CGUIWheelContainer, CGUIFragmentContainer, CGUIExpandingComposite, and CGUISplitContainer.

◆ WriteToStream()

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

Reimplemented in CGUIComboBox, CGUIMultiLineEdit, CGUIListBox, CGUIBaseInputField, CGUITabContainer, CGUIScrollView, CGUIKeyboard, CGUITableView, CGUICarousel, CGUIMenuBar, CGUIPrimitiveButton, CGUIWheelContainer, CGUITouchScrollView, CGUITabItem, CGUIExpandingComposite, CGUIScrollBar, CGUICenterFocusContainer, CGUIBaseMessageBox, CGUIGroupContainer, CGUIRadioButtonGroup, CGUIInputField, CGUIRepositionCompositeObject, CGUIFragmentContainer, CGUIPageContainer, CGUILayerContainer, CGUIMenu, CGUITabClientArea, CGUIComboBoxHeader, CGUIMenuBase, and CGUISplitContainer.

Friends And Related Function Documentation

◆ CGfxWrap

friend class CGfxWrap
friend

◆ CGUIObject

friend class CGUIObject
friend

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