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

Container object which can be scrolled if required. More...

#include <GUIScrollView.h>

Inheritance diagram for CGUIScrollView:

Public Types

enum  ScrollBarPolicy { AUTOMATIC, ALWAYS_VISIBLE, NEVER_VISIBLE }
 Scrollbar policies. These specify under which circumstances a scrollbar is visible. More...
 
- Public Types inherited from CGUIObject
enum  FourWayFocus_t { FOCUS_LEFT, FOCUS_RIGHT, FOCUS_UP, FOCUS_DOWN }
 

Public Member Functions

 CGUIScrollView (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)
 
 CGUIScrollView (CGUICompositeObject *const pParent, const CGUIRect &kRect, const ObjectHandle_t &eID=NO_HANDLE)
 
 CGUIScrollView (const CGUIScrollView &rkSource)
 
 CGUIScrollView ()
 
virtual eC_Bool AddObject (CGUIObject *pObject)
 
virtual void AdjustScrollBars ()
 
virtual void DoAnimate (const eC_Value &vTimes=eC_FromInt(1))
 
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)
 
virtual eC_Bool DoScrollUp (const eC_Value &vAbsX, const eC_Value &vAbsY)
 
virtual CGUICompositeObjectGetClipper () const
 
virtual CGUICompositeObjectGetContainer () const
 
virtual void GetFocus ()
 
CGUIScrollBarGetHorizontalScrollbar ()
 
CGUIScrollBarGetVerticalScrollbar ()
 
virtual eC_Bool IsHorizontalScrollBarAtBottom () const
 
virtual eC_Bool IsVerticalScrollBarAtRight () const
 
CGUIScrollViewoperator= (const CGUIScrollView &rkSource)
 
virtual void ReadFromStream ()
 
virtual void RemoveObject (CGUIObject *pObject)
 Removes an object from the scrolled container. More...
 
virtual void RestoreScrollPosition ()
 
virtual void SaveScrollPosition ()
 Stores the scroll positions (values of both scroll bars)
 
virtual void ScrollToFocussedObject ()
 
virtual void ScrollToObject (CGUIObject *pkObject)
 
void SetAutoAdjustContainerSize (const eC_Bool bAutoAdjustContainerSize)
 
void SetAutoAdjustScrollViewLayout (const eC_Bool bAutoAdjustScrollViewLayout)
 
virtual void SetHeight (const eC_Value &vHeight)
 
virtual void SetHorizontalScrollBarAtBottom (const eC_Bool bIsAtBottom)
 
virtual void SetHorizontalScrollbarPolicy (const ScrollBarPolicy ePolicy)
 
virtual void SetScrollingInertia (const eC_Value vInertia)
 
virtual void SetScrollingViewport (const eC_Value vX, const eC_Value vY)
 
virtual void SetVerticalScrollBarAtRight (const eC_Bool bIsAtRight)
 
virtual void SetVerticalScrollbarPolicy (const ScrollBarPolicy ePolicy)
 
virtual void SetWidth (const eC_Value &vWidth)
 
virtual void StartScrollingAnimation ()
 Called when the Scrollview wishes to start scrolling. Overriding methods should call the base class implementation.
 
virtual void StopScrollingAnimation ()
 Called when the scrolling animation is over. Overriding methods should call the base class implementation.
 
virtual void WriteToStream (const eC_Bool bWriteClassID=false)
 
- Public Member Functions inherited from CGUICompositeObject
 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.
 
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 RefreshLayout (CGUILayouter::eMovedEdges_t eMovedEdges) const
 
void RemoveAllChildren ()
 
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 SetInvisible (const eC_Bool &bInvisible)
 
virtual void SetInvisible (const eC_Bool &bInvisible, const eC_Bool &bChildrenInvisible)
 
- 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 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)
 
- Public Member Functions inherited from CGUIStreamableObject
const eC_String & GetXMLTag () const
 
void SetXMLTag (const eC_String &kXMLTag)
 
- Public Member Functions inherited from CGUIAnimatable
virtual ~CGUIAnimatable ()
 Destructor. Removes all existing animation callbacks.
 
virtual eC_Bool IsAnimating () const
 
virtual void StartAnimation ()
 
virtual void StopAnimation ()
 

Protected Member Functions

virtual void AdjustClipperSize ()
 
virtual void AdjustContainerSize ()
 
void Init ()
 General initialization.
 
- Protected Member Functions inherited from CGUICompositeObject
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
 

Protected Attributes

eC_Bool m_bAutoAdjustContainerSize
 
eC_Bool m_bAutoAdjustScrollViewLayout
 
eC_Bool m_bIsHorizontalScrollBarAtBottom
 Position of horizontal scrollbar (true=bottom, false=top)
 
eC_Bool m_bIsVerticalScrollBarAtRight
 Position of vertical scrollbar (true=right, false=left)
 
ScrollBarPolicy m_eHorizontalScrollBarPolicy
 Scrollbar policy defining whether a horizontal scrollbar is visible or not.
 
ScrollBarPolicy m_eVerticalScrollBarPolicy
 Scrollbar policy defining whether a vertical scrollbar is visible or not.
 
eC_Int m_iHorScrollPos
 Stored position of the horizontal scroll bar.
 
eC_Int m_iVerScrollPos
 Stored position of the vertical scroll bar.
 
CGUICompositeObjectm_pkClipper
 
CGUIScrollBarm_pkHorScrollBar
 
CGUIScrollBarm_pkVerScrollBar
 
eC_Value m_vScrollingInertia
 Inertia value for soft scrolling. Legal values are positive and greater than 1.
 
eC_Value m_vViewportXBorder
 Horizontal (in X direction) gap between visible area and the area outside of which scrolling will occur.
 
eC_Value m_vViewportYBorder
 Vertical (in Y direction) gap between visible area and the area outside of which scrolling will occur.
 

Additional Inherited Members

- Static Public Attributes inherited from CGUICompositeObject
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"
 

Detailed Description

Container object which can be scrolled if required.

scroll_view.png
The "scroll view" serves as a container which gives a scrollable view onto its embedded controls. Its content is typically larger than the scroll view itself, so that the user can scroll through its content (Class: CGUIScrollView).

This class serves as a container object which gives a scrollable view onto another object, which is typically larger than the CGUIScrollView object itself.

The ScrollView consists of four objects:

  • A vertical Scrollbar, positioned on the right
  • A horizontal Scrollbar, positioned on the bottom
  • A Clipping-region, which clips the view onto the container object
  • A composite object container (child of the clipper), which contains the objects which will actually be scrolled

Objects which are added to the ScrollView will actually be added to the internal container-object. The container will automatically resize itself if new children are added to it, so that all contained objects are visible.

Example:

// Create a scroll view.
CGUIScrollView* pkScrollView = new CGUIScrollView(this,
eC_FromInt(0), eC_FromInt(0),
eC_FromInt(100), eC_FromInt(100),
OBJ_SCROLLVIEW);
// Add a new child Object.
CGUIObject *pkChildObject = new CGUIObject(this,
eC_FromInt(0), eC_FromInt(0),
eC_FromInt(100), eC_FromInt(100),
OBJ_OBJECT1);
pkScrollView->AddObject(pkChildObject);
// Sets the scrollbar policy for the horizontal scrollbar.

Member Enumeration Documentation

◆ ScrollBarPolicy

Scrollbar policies. These specify under which circumstances a scrollbar is visible.

Enumerator
AUTOMATIC 

Scrollbar will automatically be displayed as required (default)

ALWAYS_VISIBLE 

Scrollbar will always be visible.

NEVER_VISIBLE 

Scrollbar will never be visible.

Constructor & Destructor Documentation

◆ CGUIScrollView() [1/4]

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

Constructor

Parameters
pParentPointer to the designated parent object.
vXX-position relative to its parent object.
vYY-position relative to its parent object.
vWidthWidth of the object.
vHeightHeight of the object.
eIDObject Identifier of this object

◆ CGUIScrollView() [2/4]

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

Constructor taking a rectangle as input.

Parameters
pParentPointer to the designated parent object.
kRectRectangle describing position and size
eIDObject Identifier of this object

◆ CGUIScrollView() [3/4]

CGUIScrollView::CGUIScrollView ( const CGUIScrollView rkSource)

Copy constructor. This will copy the ScrollView's attributes. (Note that this will NOT copy any child objects)

Parameters
rkSource

◆ CGUIScrollView() [4/4]

CGUIScrollView::CGUIScrollView ( )

Standard constructor. Only to be called by factory. No user code should call this constructor, not even in streaming mode (that is, when GUILIANI_STREAM_GUI is defined)!

See also
CGUISlider()

Member Function Documentation

◆ AddObject()

eC_Bool CGUIScrollView::AddObject ( CGUIObject pObject)
virtual

It is not allowed to add any objects directly to the ScrollableObject. Instead all added objects will automatically be added to the container object.

Parameters
pObjectPointer to object which will be added to the container object's childlist.
Returns
True if the object was added, otherwise False.

Reimplemented from CGUICompositeObject.

Reimplemented in CGUITableView.

◆ AdjustClipperSize()

void CGUIScrollView::AdjustClipperSize ( )
protectedvirtual

Helper method for AdjustScrollBars. Called after setting the scroll bar visibility. This method adjusts the size of the clipping container so that it does not overlap the scroll bars.

◆ AdjustContainerSize()

void CGUIScrollView::AdjustContainerSize ( )
protectedvirtual

Automatically resizes the container, so that it fully encapsulates all its children

◆ AdjustScrollBars()

void CGUIScrollView::AdjustScrollBars ( )
virtual

This updates the visibility and sizes of the attached ScrollBars. Typically, this needs to be called whenever the ScrollView's content has changed.

◆ DoAnimate()

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

Implementation of scrolling animation. This will scroll the currently focused object (if it is a descendant of the scrollview) into view.

Parameters
vTimesthe correction factor

Reimplemented from CGUIAnimatable.

Reimplemented in CGUIMultiLineEdit, and CGUITouchScrollView.

◆ DoScrollDown()

eC_Bool CGUIScrollView::DoScrollDown ( const eC_Value &  vAbsX,
const eC_Value &  vAbsY 
)
virtual

Called when the mouse wheel was scrolled in downward direction.

Parameters
vAbsXX-position of the mouse in screen coordinates
vAbsYY-position of the mouse in screen coordinates
Returns
True If the event has been handled.
false Else.

Reimplemented from CGUIBehaviour.

◆ DoScrollLeft()

eC_Bool CGUIScrollView::DoScrollLeft ( const eC_Value &  vAbsX,
const eC_Value &  vAbsY 
)
virtual

Called when the mouse wheel was scrolled in upward direction while the scroll direction modifier was pressed.

Parameters
vAbsXX-position of the mouse in screen coordinates
vAbsYY-position of the mouse in screen coordinates
See also
CGUIEventHandler::SetScrollModifiers()
Returns
True If the event has been handled.
false Else.

Reimplemented from CGUIBehaviour.

◆ DoScrollRight()

eC_Bool CGUIScrollView::DoScrollRight ( const eC_Value &  vAbsX,
const eC_Value &  vAbsY 
)
virtual

Called when the mouse wheel was scrolled in downward direction while the scroll direction modifier was pressed.

Parameters
vAbsXX-position of the mouse in screen coordinates
vAbsYY-position of the mouse in screen coordinates
See also
CGUIEventHandler::SetScrollModifiers()
Returns
True If the event has been handled.
false Else.

Reimplemented from CGUIBehaviour.

◆ DoScrollUp()

eC_Bool CGUIScrollView::DoScrollUp ( const eC_Value &  vAbsX,
const eC_Value &  vAbsY 
)
virtual

Called when the mouse wheel was scrolled in upward direction.

Parameters
vAbsXX-position of the mouse in screen coordinates
vAbsYY-position of the mouse in screen coordinates
Returns
True If the event has been handled.
false Else.

Reimplemented from CGUIBehaviour.

◆ GetClipper()

CGUICompositeObject * CGUIScrollView::GetClipper ( ) const
virtual

Retrieves the pointer to the ScrollView's clipper object. This is the composite object against which all content is clipped. It is thus also the parent of the Container composite.

Returns
pointer to the scrollview's clipper object

◆ GetContainer()

CGUICompositeObject * CGUIScrollView::GetContainer ( ) const
virtual

Retrieves the pointer to the ScrollView's container object. This is the composite object which actually contains the scrollable content of the ScrollView.

Returns
pointer to the scrollview's container object

◆ GetFocus()

virtual void CGUIScrollView::GetFocus ( )
inlinevirtual

This ensures that a child object of this container will always be scrolled into the visible area if it receives the focus.

Reimplemented from CGUIBehaviour.

Reimplemented in CGUIListBox, and CGUIMultiLineEdit.

◆ GetHorizontalScrollbar()

CGUIScrollBar* CGUIScrollView::GetHorizontalScrollbar ( )
inline

Returns a pointer to the horizontal scrollbar.

See also
GetVerticalScrollbar
Returns
Pointer to the horizontal scrollbar

◆ GetVerticalScrollbar()

CGUIScrollBar* CGUIScrollView::GetVerticalScrollbar ( )
inline

Returns a pointer to the vertical scrollbar. Use this in case you wish to change the scrollbar's graphics. Note that the ScrollView will automatically override some of the ScrollBar's attributes, like its position / size though.

Returns
Pointer to the vertical scrollbar

◆ IsHorizontalScrollBarAtBottom()

eC_Bool CGUIScrollView::IsHorizontalScrollBarAtBottom ( ) const
virtual
Returns
True if horizontal Scrollbar is at the bottom of the ScrollView (and there IS a scrollbar), False otherwise

◆ IsVerticalScrollBarAtRight()

eC_Bool CGUIScrollView::IsVerticalScrollBarAtRight ( ) const
virtual
Returns
True if vertical Scrollbar is at the right of the ScrollView (and there IS a scrollbar), False otherwise

◆ operator=()

CGUIScrollView & CGUIScrollView::operator= ( const CGUIScrollView rkSource)

Assignment operator. This will copy the ScrollView's attributes. (Note that this will NOT copy any child objects)

Parameters
rkSource
Returns
copy

◆ ReadFromStream()

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

Reimplemented in CGUIMultiLineEdit, CGUIListBox, CGUITableView, and CGUITouchScrollView.

◆ RemoveObject()

void CGUIScrollView::RemoveObject ( CGUIObject pObject)
virtual

Removes an object from the scrolled container.

Objects are removed from the internal container of scrolled objects.

Parameters
pObjectObject to be removed.
See also
AddObject

Reimplemented from CGUICompositeObject.

Reimplemented in CGUIMultiLineEdit.

◆ RestoreScrollPosition()

void CGUIScrollView::RestoreScrollPosition ( )
virtual

Restores the positions of both scroll bars to the ones that were saved with the last call to SaveScrollPosition().

◆ ScrollToFocussedObject()

void CGUIScrollView::ScrollToFocussedObject ( )
virtual

This ensures that children of the ScrollView will automatically be scrolled into the visible area if they receive the focus. It will automatically be called by AdjustScrollBars(). You may reimplement this method in derived classes if you wish to avoid this default behaviour.

Reimplemented in CGUIMultiLineEdit, and CGUITouchScrollView.

◆ ScrollToObject()

void CGUIScrollView::ScrollToObject ( CGUIObject pkObject)
virtual

Scroll to the given object, that is part of scroll view.

Parameters
pkObjectThe object to scroll to (make visible as good as possible).

Reimplemented in CGUITouchScrollView.

◆ SetAutoAdjustContainerSize()

void CGUIScrollView::SetAutoAdjustContainerSize ( const eC_Bool  bAutoAdjustContainerSize)
inline

Enable/Disable automatic resize of the container to be large enough to encapsulate all child objects. By default, the container will automatically adapt its size e.g. when new children are being added to it.

Parameters
bAutoAdjustContainerSizeThe new value

◆ SetAutoAdjustScrollViewLayout()

void CGUIScrollView::SetAutoAdjustScrollViewLayout ( const eC_Bool  bAutoAdjustScrollViewLayout)
inline

Enable/Disable automatic layout of the Clipper and ScrollBars. By default, the Clipper and ScrollBars will automatically adapt their size/position when the size of the scrollview changes, their visibility changes or their horizontal/vertical layout changes.

Parameters
bAutoAdjustScrollViewLayoutThe new value

◆ SetHeight()

void CGUIScrollView::SetHeight ( const eC_Value &  vHeight)
virtual

This implementation of the SetHeight method calls the base class' standard implementation but also assures that attached ScrollBars are adjusted with regard to the new height.

Parameters
vHeightThe new height

Reimplemented from CGUICompositeObject.

Reimplemented in CGUITableView, and CGUIListBox.

◆ SetHorizontalScrollBarAtBottom()

void CGUIScrollView::SetHorizontalScrollBarAtBottom ( const eC_Bool  bIsAtBottom)
virtual

Specifies whether the horizontal ScrollBar will be positioned at the top or bottom side of the Scrollview.

Parameters
bIsAtBottomtrue positions the scrollbar at the bottom, false positions the scrollbar at the top

◆ SetHorizontalScrollbarPolicy()

virtual void CGUIScrollView::SetHorizontalScrollbarPolicy ( const ScrollBarPolicy  ePolicy)
inlinevirtual

Sets the scrollbar policy for the horizontal scrollbar.

Parameters
ePolicyPolicy for the horizontal scrollbar (
See also
ScrollBarPolicy)

◆ SetScrollingInertia()

void CGUIScrollView::SetScrollingInertia ( const eC_Value  vInertia)
virtual

Movement inertia of scrolling animation. Higher inertia values will result in slower animation.

Parameters
vInertiaInertia value. Must be greater than one, and the greater the value, the slower the scrolling.

◆ SetScrollingViewport()

void CGUIScrollView::SetScrollingViewport ( const eC_Value  vX,
const eC_Value  vY 
)
virtual

Defines the viewport into which the focused object will be scrolled. This is useful if you wish to commence scrolling before the focus actually leaves the visible area.

Parameters
vXBorder in horizontal direction in pixels by which the viewport is smaller than the visible area.
vYBorder in vertical direction in pixels by which the viewport is smaller than the visible area.

◆ SetVerticalScrollBarAtRight()

void CGUIScrollView::SetVerticalScrollBarAtRight ( const eC_Bool  bIsAtRight)
virtual

Specifies whether the vertical ScrollBar will be positioned at the right or left side of the Scrollview.

Parameters
bIsAtRighttrue positions the scrollbar at the right side, false positions the scrollbar at the left side

◆ SetVerticalScrollbarPolicy()

virtual void CGUIScrollView::SetVerticalScrollbarPolicy ( const ScrollBarPolicy  ePolicy)
inlinevirtual

Sets the scrollbar policy for the vertical scrollbar.

Parameters
ePolicyPolicy for the vertical scrollbar (
See also
ScrollBarPolicy)

◆ SetWidth()

void CGUIScrollView::SetWidth ( const eC_Value &  vWidth)
virtual

This implementation of the SetWidth method calls the base class' standard implementation but also assures that attached ScrollBars are adjusted with regard to the new width.

Parameters
vWidthThe new width

Reimplemented from CGUICompositeObject.

Reimplemented in CGUITableView, and CGUIListBox.

◆ WriteToStream()

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

Reimplemented in CGUIMultiLineEdit, CGUIListBox, CGUITableView, and CGUITouchScrollView.

Member Data Documentation

◆ m_bAutoAdjustContainerSize

eC_Bool CGUIScrollView::m_bAutoAdjustContainerSize
protected

Specifies if the Container shall automatically be resized to be large enough to encapsulate all children

◆ m_bAutoAdjustScrollViewLayout

eC_Bool CGUIScrollView::m_bAutoAdjustScrollViewLayout
protected

Specifies if the ScrollBars and the Clipper shall automatically adapt their size/position when the dimension of the ScrollView or the visibility of the ScrollBars changes

◆ m_pkClipper

CGUICompositeObject* CGUIScrollView::m_pkClipper
protected

Composite object that clips the contained (scrolled) items. Its only child is m_pContainer.

Note
This object is valid to be NULL.

◆ m_pkHorScrollBar

CGUIScrollBar* CGUIScrollView::m_pkHorScrollBar
protected

Horizontal scrollbar

Note
This object is valid to be NULL.

◆ m_pkVerScrollBar

CGUIScrollBar* CGUIScrollView::m_pkVerScrollBar
protected

vertical scrollbar

Note
This object is valid to be NULL.

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