This is the Guiliani base class for all composite objects. More...
#include <GUICompositeObject.h>
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 CGUIObject * | FindObject (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 CGUIObject * | GetAndCheckObjectByID (ObjectHandle_t eObjID, const eC_String &kObjectName) const |
CGUIObject * | GetAndCheckObjectByID (ObjectHandle_t eObjID, const eC_String &kObjectName) |
CGUIObject * | GetChild (const eC_UInt uIndex) const |
CGUIObject * | GetChild (const eC_UInt uIndex) |
const ObjectPtrList & | GetChildObjectsList () const |
const ObjectPtrList & | GetDrawOrderList () const |
eC_Int | GetIndexOfChild (const CGUIObject *pkObject) const |
eC_UInt | GetNumberOfChildren () const |
CGUIObject * | GetObjectByID (const ObjectHandle_t &eID, const eC_Bool &bOnlyVisible=false) |
const CGUIObject * | GetObjectByID (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) |
CGUICompositeObject & | operator= (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) |
![]() | |
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 |
CGUIBehaviourDecorator * | GetBehaviour () |
const CGUIBehaviourDecorator * | GetBehaviour () const |
GUIBitmapPlaneID_t | GetBitmapID () const |
CGUIBitmapPlane & | GetBitmapPlane () 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 |
CDataPoolConnector & | GetDataPoolConnector () |
eC_Value | GetDistanceBottom () const |
eC_Value | GetDistanceRight () const |
eC_Value | GetHalfHeight () const |
eC_Value | GetHalfWidth () const |
eC_Value | GetHeight () const |
ObjectHandle_t | GetID () const |
CGUILayouter * | GetLayouter () |
const CGUILayouter * | GetLayouter () const |
ObjectHandle_t | GetNeighborBottomID () const |
ObjectHandle_t | GetNeighborLeftID () const |
ObjectHandle_t | GetNeighborRightID () const |
ObjectHandle_t | GetNeighborTopID () const |
CGUIObject * | GetObjectByID (const ObjectHandle_t &eID, const eC_Bool &bOnlyVisible=false) |
const CGUIObject * | GetObjectByID (const ObjectHandle_t &eID, const eC_Bool &bOnlyVisible=false) const |
CGUIRect | GetOriginRect () const |
CGUICompositeObject * | GetParent () |
const CGUICompositeObject * | GetParent () 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) |
CGUIObject & | operator= (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) |
![]() | |
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) |
![]() | |
const eC_String & | GetXMLTag () const |
void | SetXMLTag (const eC_String &kXMLTag) |
![]() | |
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 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 const eC_Char | XMLTAG_BEHAVIOURCLASSID [] = "BehaviourClassID" |
XML tag to be used when writing a behaviour class ID into a stream. | |
![]() | |
static const eC_Char | XMLTAG_CLASSVERSION [] = "ClassVersion" |
Protected Member Functions | |
virtual eC_Bool | FourWayNext (FourWayFocus_t eFocusDirection) |
ObjectPtrList & | GetChildObjectsList () |
virtual void | HandleDraw (const CGUIRect &ClipRect) |
![]() | |
virtual eC_Bool | CreateBitmapPlane () |
![]() | |
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 | |
![]() | |
enum | FourWayFocus_t { FOCUS_LEFT, FOCUS_RIGHT, FOCUS_UP, FOCUS_DOWN } |
This is the Guiliani base class for all composite objects.
![]() | 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...
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.
CGUICompositeObject::CGUICompositeObject | ( | ) |
CGUICompositeObject standard constructor.
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.
pParent | Pointer to the designated parent object. |
vX | X-position relative to its parent object |
vY | Y-position relative to its parent object |
vWidth | Width of the composite object |
vHeight | Height of the composite object |
eID | Object Identifier of this composite object (choose NO_HANDLE if none is required) |
CGUICompositeObject::CGUICompositeObject | ( | CGUICompositeObject *const | pParent, |
const CGUIRect & | kRect, | ||
const ObjectHandle_t & | eID = NO_HANDLE |
||
) |
CGUICompositeObject constructor.
pParent | Pointer to the designated parent object. |
kRect | Bounding rectangle relative to parent. |
eID | Object Identifier of this composite object (choose NO_HANDLE if none is required) |
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.
kSource | Source object to be copied. |
|
virtual |
Add a new Object to the list of child objects. This will automatically set the child's parent-pointer to this object.
pkObject | The object to be added |
Reimplemented in CGUITabContainer, CGUITableView, CGUIScrollView, CGUIMenu, CGUICarousel, CGUITabClientArea, CGUIPageContainer, CGUIExpandingComposite, CGUIWheelContainer, CGUISplitContainer, and CGUIGroupContainer.
eC_Bool CGUICompositeObject::BringToFront | ( | const CGUIObject * | pkObject | ) |
bring object to front of container, so it is above all other children
pkObject | object to bring to front |
|
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.
|
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.
Reimplemented in CGUIListBox, CGUI, CGUILayerContainer, CGUIPageContainer, CGUIFragmentContainer, and CGUISplitContainer.
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.
pkObject | The object to move to the top |
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.
pkObject | Pointer to object whose drawing order is to be changed |
pDrawOnTopOf | Pointer to the object above which pkObject will be drawn from now on |
|
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.
vAbsX | Absolute X coordinate for which the topmost object shall be returned |
vAbsY | Absolute Y coordinate for which the topmost object shall be returned |
Reimplemented from CGUIObject.
void CGUICompositeObject::Flip | ( | const eC_Bool & | rbVertical | ) |
flips the object and all children inside
rbVertical | if true flip vertically else horizontally |
|
virtual |
Set focus to any focusable child object in the subtree of this object, including the object itself
Reimplemented from CGUIObject.
Reimplemented in CGUIListBox, and CGUIMenuBase.
|
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:
pRefObj | usually is a child of this object which indicates the current position in the child list. |
bSubTreeOfRefObjDone | indicates if the subtree that is under pRefObj has already been asked to take focus, or if not. |
Reimplemented from CGUIObject.
|
virtual |
Set focus to the previous focusable child object before the currently focused one, also please refer to 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:
pRefObj | usually is a child of this object which indicates the current position in the child list. |
bSubTreeOfRefObjDone | indicates 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. |
Reimplemented from CGUIObject.
|
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.
eFocusDirection | The focus direction |
Reimplemented from CGUIObject.
Reimplemented in CGUIMenuBar, and CGUIMenu.
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.
eObjID | The ID of the object to be searched. |
kObjectName | The name of the object. Will be shown in the message that is generated when throwing an exception. |
CGUIException | if no object with the given ID was found. |
|
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.
eObjID | The ID of the object to be searched. |
kObjectName | The name of the object. Will be shown in the message that is generated when throwing an exception. |
CGUIException | if no object with the given ID was found. |
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.
uIndex | Index of the child, zero-based, that is, first child has index zero. |
|
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.
uIndex | Index of the child, zero-based, that is, first child has index zero. |
|
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.
|
inlineprotected |
Retrieves a pointer to this object's list of child objects.
|
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.
eC_Int CGUICompositeObject::GetIndexOfChild | ( | const CGUIObject * | pkObject | ) | const |
Returns the corresponding index to a pointer to a child.
pkObject | Pointer to the child. |
|
inline |
Returns the number of children.
|
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.
eID | ID of the object for which to search. |
bOnlyVisible | ignore elements which are not currently visible |
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.
eID | ID of the object for which to search. |
bOnlyVisible | ignore elements which are not currently visible |
|
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.
ClipRect | The clipping rectangle |
Reimplemented from CGUIObject.
Reimplemented in CGUILayerContainer.
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.
cuiIndex | The index of insertion. |
pkChild | The child which has to be inserted. |
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.
pkObject | Pointer to the object that might be a child of the current object. |
|
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.
Reimplemented from CGUIObject.
eC_Bool CGUICompositeObject::LowerOneLevel | ( | const CGUIObject * | pkObject | ) |
lower object one level, so it switchs positions with the object directly below it
pkObject | object to lower one level |
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.
kSource | Source object to be copied. |
eC_Bool CGUICompositeObject::RaiseOneLevel | ( | const CGUIObject * | pkObject | ) |
raise object one level, so it switches positions with the object directly above it
pkObject | object to raise one level |
|
virtual |
Reads composite object attributes and children from stream. Reads attributes from the streaming file. Only for use with GUIFactoryManager.
CGUIStreamingControlException | When 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.
|
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.
eMovedEdges | This 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.
void CGUICompositeObject::RemoveAllChildren | ( | ) |
Removes and deletes all children from the composite object and empties the draw order list.
|
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.
pkObject | The object to be removed |
Reimplemented in CGUIComboBox, CGUIMultiLineEdit, CGUIBaseInputField, CGUITabContainer, CGUIScrollBar, CGUIScrollView, CGUIMenu, CGUICarousel, CGUITabClientArea, CGUIPageContainer, CGUIWheelContainer, and CGUISplitContainer.
void CGUICompositeObject::Rotate | ( | const eC_UInt & | ruiDegrees, |
const eC_Bool & | rbFirst = false |
||
) |
rotates the object and all children inside
ruiDegrees | degress to rotate (90, 180, 270) |
rbFirst | true if first object in hierarchy |
eC_Bool CGUICompositeObject::SendToBack | ( | const CGUIObject * | pkObject | ) |
send object to back of container, so it is below all other children
pkObject | object to send to back |
|
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.
bClickThrough | The new clickthrough state of this composite object. |
|
virtual |
Set this composite object and its children clickthrough or not.
bClickThrough | Set this composite object to clickthrough if true. |
bChildrenClickThrough | Set all children of this composite object to cklickthrough. |
|
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.
bCyclicFocus | Boolean 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. |
|
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.
bDisabled | The new enabled state of this composite object. |
Reimplemented from CGUIObject.
Reimplemented in CGUIComboBox.
|
virtual |
Set this control disable or not. Whether the children will be set or not depends on parameter bChildrenDisabled
bDisabled | Disabled, when true. otherwise, false |
bChildrenDisabled | State of the children. |
|
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.
bFocussable | The new focusable state of this composite object. |
Reimplemented from CGUIObject.
|
virtual |
Set this composite object and its children focusable or not.
bFocussable | Set this composite object to be focusable if true. |
bChildrenFocussable | Set all children of this composite object to be focusable. |
|
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.
bGrayedOut | The new grayed-out state of this composite object. |
Reimplemented from CGUIObject.
Reimplemented in CGUIComboBox, and CGUIPrimitiveButton.
|
virtual |
Set this control and its children grayedout or not.
bGrayedOut | Grayedout, when true. otherwise, false |
bChildrenGrayedOut | Gray out the children or 'un-gray-out' them. |
|
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.
vY | The new height |
Reimplemented from CGUIObject.
Reimplemented in CGUIComboBox, CGUITableView, CGUIListBox, CGUITabContainer, CGUIBaseInputField, CGUIScrollView, CGUICarousel, CGUIPageContainer, CGUIComboBoxHeader, CGUIWheelContainer, CGUIFragmentContainer, CGUIExpandingComposite, and CGUISplitContainer.
|
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.
bInvisible | The new visibility state of this composite object. |
Reimplemented from CGUIObject.
Reimplemented in CGUILayerContainer.
|
virtual |
Set this composite object and its children invisible or visible.
bInvisible | If true, this composite object will be invisible, if false, the composite object will be visible. |
bChildrenInvisible | If true, all children (and their children) will be invisible. If false, the children will be visible. |
|
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.
vX | The new width |
Reimplemented from CGUIObject.
Reimplemented in CGUIComboBox, CGUITableView, CGUIListBox, CGUITabContainer, CGUIBaseInputField, CGUIScrollView, CGUICarousel, CGUIPageContainer, CGUIComboBoxHeader, CGUIWheelContainer, CGUIFragmentContainer, CGUIExpandingComposite, and CGUISplitContainer.
|
virtual |
Writes all object attributes to the streaming file. StreamWriter has to be initialized. Only for use with GUIStreamWriter.
bWriteClassID | This 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. |
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.
|
friend |
|
friend |