Guiliani  Version 2.5 revision 7293 (documentation build 13)
CGUIChart Class Reference

This control can be used to visualize multiple data-sources in line- or bar-charts. More...

#include <GUIChart.h>

Inheritance diagram for CGUIChart:

Classes

struct  Data_t
 

Public Types

enum  AxisRepresentation_t { NONE , LINE , LINE_AND_SCALING , LINE_SCALING_AND_TEXT }
 enum how the axis are displayed More...
 
enum  DataRepresentation_t {
  POINTS , POINTS_AND_LINES , LINES , BARS ,
  PIE , RING , STACKED_LINES , STACKED_BARS
}
 enum how to disply values More...
 
- Public Types inherited from CGUIObject
enum  FourWayFocus_t { FOCUS_LEFT , FOCUS_RIGHT , FOCUS_UP , FOCUS_DOWN }
 

Public Member Functions

 CGUIChart ()
 
 CGUIChart (CGUICompositeObject *const pkParent, const eC_Value &vX, const eC_Value &vY, const eC_Value &vWidth, const eC_Value &vHeight, const ObjectHandle_t &eID=NO_HANDLE)
 
 CGUIChart (CGUICompositeObject *const pkParent, const eC_Value &vX, const eC_Value &vY, const eC_Value &vWidth, const eC_Value &vHeight, eC_Int iScalingXAxis, eC_Int iScalingYAxis, eC_Value vMaxShownNumberY, eC_Value vMinShownNumberY, const ObjectHandle_t &eID=NO_HANDLE)
 
 CGUIChart (CGUICompositeObject *const pkParent, const eC_Value &vX, const eC_Value &vY, const eC_Value &vWidth, const eC_Value &vHeight, eC_UInt iAxisColor, eC_UInt TextLabelColor, eC_UInt DrawLineColor, eC_UInt DrawPointColor, eC_UInt BarColor, eC_Value AxisLineWidth, eC_Value DrawLineWidth, eC_Value vScaleLength, eC_Value vPointSize, eC_UInt uiScalingXAxis, eC_UInt uiScalingYAxis, eC_Value vMaxShownNumberY, eC_Value vMinShownNumberY, eC_Value vZoomFactorY, eC_UInt uiZoomFactorX, const ObjectHandle_t &eID=NO_HANDLE)
 
virtual ~CGUIChart ()
 
void AddData (eC_Value vDataValue, eC_UInt uiDimension=0)
 
virtual eC_Bool DoButtonDown (const eC_Value &vAbsX, const eC_Value &vAbsY)
 
virtual eC_Bool DoClick (const eC_Value &vAbsX, const eC_Value &vAbsY)
 
virtual eC_Bool DoDrag (const eC_Value &vDeltaX, const eC_Value &vDeltaY, const eC_Value &vAbsX, const eC_Value &vAbsY)
 
virtual eC_Bool DoDragEnd (const eC_Value &vAbsX, const eC_Value &vAbsY)
 
virtual eC_Bool DoDraw ()
 
eC_UInt GetAxisColor () const
 
eC_Value GetAxisLineWidth () const
 
eC_UInt GetBarColor (const eC_UInt &uiIndex) const
 
DataRepresentation_t GetDataRepresentation () const
 
eC_Value GetDrawLineWidth () const
 
CGUIRect GetFocusArea () const
 
CGUICommonEnums::AxisAlignment_t GetHelperLineRepresentation () const
 
eC_UInt GetHorizontalHelperLineColor () const
 
eC_UInt GetLineColor (const eC_UInt &uiIndex) const
 
eC_UInt GetPointColor (const eC_UInt &uiIndex) const
 
eC_Value GetPointSize () const
 
void GetRangeX (eC_Int &iMinNumber, eC_Int &iMaxNumber) const
 
void GetRangeY (eC_Value &vMinValue, eC_Value &vMaxValue) const
 
AxisRepresentation_t GetRepresentationXAxis () const
 
AxisRepresentation_t GetRepresentationYAxis () const
 
eC_Value GetScaleLength () const
 
eC_UInt GetScalingXAxis () const
 
eC_UInt GetScalingYAxis () const
 
eC_UInt GetSelectionColor () const
 
eC_Bool GetShowBarData () const
 
eC_Int GetStartLabelValue () const
 
eC_UInt GetTextLabelColor () const
 
eC_UInt GetVerticalHelperLineColor () const
 
eC_Value GetZoomFactorX () const
 
eC_Value GetZoomFactorY () const
 
virtual eC_Bool IsHighlightable () const
 
void JumpToDataPoint (const eC_Int &iMinShownData)
 
void JumpToTheEnd ()
 
void KeepLastXElemenets (const eC_UInt &uiDataAmountToKepp)
 
virtual void ReadFromStream ()
 
void SetAxisColor (const eC_UInt &uiAxisColor)
 
void SetAxisColor (const GlobalProperty_t &eAxisColor)
 
void SetAxisLineWidth (const eC_Value &vAxisLineWidth)
 
void SetBarColor (const eC_UInt &uiIndex, const eC_UInt &uiBarColor)
 
void SetBarColor (const eC_UInt &uiIndex, const GlobalProperty_t &eBarColor)
 
void SetDataRepresentation (const DataRepresentation_t &eDataRepresentation)
 
void SetDrawLineWidth (const eC_Value &vDrawLineWidth)
 
void SetFont (const FontResource_t &eFontId)
 
virtual void SetHeight (const eC_Value &vY)
 
void SetHelperLineRepresentation (const CGUICommonEnums::AxisAlignment_t &eRepresentation)
 
void SetHorizontalHelperLineColor (const eC_UInt &uiColor)
 
void SetHorizontalHelperLineColor (const GlobalProperty_t &eColor)
 
void SetImages (const ImageResource_t &eImageBG)
 
void SetLineColor (const eC_UInt &uiIndex, const eC_UInt &uiLineColor)
 
void SetLineColor (const eC_UInt &uiIndex, const GlobalProperty_t &eLineColor)
 
void SetMaxValueY (const eC_Value &vMaxNumber)
 
void SetMinValueY (const eC_Value &vMinNumber)
 
void SetPointColor (const eC_UInt &uiIndex, const eC_UInt &uiPointColor)
 
void SetPointColor (const eC_UInt &uiIndex, const GlobalProperty_t &ePointColor)
 
void SetPointSize (const eC_Value &vPointSize)
 
void SetRangeX (const eC_Int &iMinNumber, const eC_Int &iMaxNumber)
 
void SetRangeY (const eC_Value &vMinValue, const eC_Value &vMaxValue)
 
void SetRepresentationXAxis (const AxisRepresentation_t &eXAxis)
 
void SetRepresentationYAxis (const AxisRepresentation_t &eYAxis)
 
void SetScaleLength (const eC_Value &vScaleLength)
 
void SetScalingXAxis (const eC_UInt &uiScalingXAxis)
 
void SetScalingYAxis (const eC_UInt &uiScalingYAxis)
 
void SetSelectionColor (const eC_UInt &uiSelectionColor)
 
void SetSelectionColor (const GlobalProperty_t &eSelectionColor)
 
void SetShowBarData (const eC_Bool &bShowBarData)
 
void SetStandardImages ()
 
void SetStartLabelValue (const eC_Int &iStartValue)
 
void SetTextLabelColor (const eC_UInt &uiTextLabelColor)
 
void SetTextLabelColor (const GlobalProperty_t &eTextLabelColor)
 
virtual eC_Bool SetValue (CDataPoolEntry &rkValue)
 
void SetVerticalHelperLineColor (const eC_UInt &uiColor)
 
void SetVerticalHelperLineColor (const GlobalProperty_t &eColor)
 
virtual void SetWidth (const eC_Value &vX)
 
void SetZoomFactorX (const eC_Value &vZoomFactorX)
 
void SetZoomFactorY (const eC_Value &vZoomFactorY)
 
void WipeAllData ()
 
virtual void WriteToStream (const eC_Bool bWriteClassID=false)
 
void ZoomInX ()
 
void ZoomInY ()
 
void ZoomOutX ()
 
void ZoomOutY ()
 
- Public Member Functions inherited from CGUIObject
 CGUIObject ()
 
 CGUIObject (CGUICompositeObject *const pkParent, const CGUIRect &kRect, const ObjectHandle_t &eID=NO_HANDLE)
 
 CGUIObject (CGUICompositeObject *const pkParent, const eC_Value &vX, const eC_Value &vY, const eC_Value &vWidth, const eC_Value &vHeight, const ObjectHandle_t &eID=NO_HANDLE)
 
 CGUIObject (const CGUIObject &kSource)
 
virtual ~CGUIObject ()
 
void AddValueObserver (CGUIObserver *pkObserver)
 
eC_Bool CalculateInvalidatedRect (CGUIRect &rRect) const
 
virtual eC_Bool ClaimFocus ()
 
virtual void CreateSnapshot (eC_UInt uiBackColor=0x00)
 
eC_Bool DataPoolConnectorExists () const
 
void DeleteSnapshot ()
 
virtual void DisableSnapshotDrawing (eC_Bool bDeleteSnapshot=true)
 
virtual eC_Bool DoDraw ()
 
virtual eC_Bool DoDrawSnapshot ()
 
virtual void EnableSnapshotDrawing ()
 
virtual CGUIObjectFindObject (const eC_Value &vAbsX, const eC_Value &vAbsY)
 
virtual eC_Bool FocusAny ()
 
virtual eC_Bool FocusNext (CGUIObject *const pRefObj=NULL, const eC_Bool &bSubTreeOfRefObjDone=false)
 
virtual eC_Bool FocusPrevious (CGUIObject *const pRefObj=NULL, const eC_Bool &bSubTreeOfRefObjDone=false)
 
CGUIRect GetAbsRect () const
 
eC_Value GetAbsXPos () const
 
eC_Value GetAbsXPosCenter () const
 
eC_Value GetAbsXPosREdge () const
 
eC_Value GetAbsYPos () const
 
eC_Value GetAbsYPosBEdge () const
 
eC_Value GetAbsYPosCenter () const
 
eC_UByte GetAlpha () const
 
CGUIBehaviourDecoratorGetBehaviour ()
 
const CGUIBehaviourDecoratorGetBehaviour () const
 
GUIBitmapPlaneID_t GetBitmapID () const
 
CGUIBitmapPlaneGetBitmapPlane () const
 
CGUIRect GetCurrentAbsRect () const
 
eC_Value GetCurrentAbsXPos () const
 
eC_Value GetCurrentAbsXPosCenter () const
 
eC_Value GetCurrentAbsXPosREdge () const
 
eC_Value GetCurrentAbsYPos () const
 
eC_Value GetCurrentAbsYPosBEdge () const
 
eC_Value GetCurrentAbsYPosCenter () const
 
CDataPoolConnectorGetDataPoolConnector ()
 
eC_Value GetDistanceBottom () const
 
eC_Value GetDistanceRight () const
 
eC_Value GetHalfHeight () const
 
eC_Value GetHalfWidth () const
 
eC_Value GetHeight () const
 
ObjectHandle_t GetID () const
 
CGUILayouterGetLayouter ()
 
const CGUILayouterGetLayouter () const
 
ObjectHandle_t GetNeighborBottomID () const
 
ObjectHandle_t GetNeighborLeftID () const
 
ObjectHandle_t GetNeighborRightID () const
 
ObjectHandle_t GetNeighborTopID () const
 
CGUIObjectGetObjectByID (const ObjectHandle_t &eID, const eC_Bool &bOnlyVisible=false)
 
const CGUIObjectGetObjectByID (const ObjectHandle_t &eID, const eC_Bool &bOnlyVisible=false) const
 
CGUIRect GetOriginRect () const
 
CGUICompositeObjectGetParent ()
 
const CGUICompositeObjectGetParent () const
 
CGUIRect GetRelRect () const
 
eC_Value GetRelXPos () const
 
eC_Value GetRelXPosCenter () const
 
eC_Value GetRelXPosREdge () const
 
eC_Value GetRelYPos () const
 
eC_Value GetRelYPosBEdge () const
 
eC_Value GetRelYPosCenter () const
 
eC_Value GetWidth () const
 
void InvalidateArea ()
 
eC_Bool IsClickable () const
 
eC_Bool IsClickThrough () const
 
virtual eC_Bool IsCompositeObject () const
 
eC_Bool IsDescendantOf (const CGUIObject *const pAncestor) const
 
eC_Bool IsDisabled () const
 
eC_Bool IsDragable () const
 
eC_Bool IsDragged () const
 
eC_Bool IsDrawingSnapshot () const
 
eC_Bool IsFocussable () const
 
eC_Bool IsFocussed () const
 
eC_Bool IsGrayedOut () const
 
virtual eC_Bool IsHighlightable () const
 
eC_Bool IsHighlighted () const
 
eC_Bool IsInvisible () const
 
eC_Bool IsPressed () const
 
eC_Bool IsStopFocus () const
 
void NotifyValueObservers (const CGUIValue &kValue, const eC_UInt uiX=0, const eC_UInt uiY=0)
 
CGUIObjectoperator= (const CGUIObject &kSource)
 
virtual void ReadFromStream ()
 
virtual void RefreshLayout (CGUILayouter::eMovedEdges_t eMovedEdges) const
 
void RemoveValueObserver (CGUIObserver *pkObserver)
 
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 *pkBehaviour)
 
void SetClickThrough (const eC_Bool &bClickThrough)
 
virtual void SetDisabled (const eC_Bool &bDisabled)
 
virtual void SetFocussable (const eC_Bool &bFocussable)
 
virtual void SetGrayedOut (const eC_Bool &bGrayOut)
 
virtual void SetHeight (const eC_Value &vY)
 
void SetID (const ObjectHandle_t &eID)
 
virtual void SetInvisible (const eC_Bool &bInvisible)
 
void SetLayouter (CGUILayouter *pLayouter)
 
void SetNeighborBottomID (const ObjectHandle_t eNewNeighborBottomID)
 
void SetNeighborIDs (const ObjectHandle_t eNewNeighborLeftID, const ObjectHandle_t eNewNeighborRightID, const ObjectHandle_t eNewNeighborTopID, const ObjectHandle_t eNewNeighborBottomID)
 
void SetNeighborLeftID (const ObjectHandle_t eNewNeighborLeftID)
 
void SetNeighborRightID (const ObjectHandle_t eNewNeighborRightID)
 
void SetNeighborTopID (const ObjectHandle_t eNewNeighborTopID)
 
virtual void SetParent (CGUICompositeObject *const pkParent)
 
void SetRelRect (const CGUIRect &kNewRect)
 
virtual void SetRelXPos (const eC_Value &vX)
 
void SetRelXPosCenter (const eC_Value &vXCenter)
 
void SetRelXPosREdge (const eC_Value &vX)
 
virtual void SetRelYPos (const eC_Value &vY)
 
void SetRelYPosBEdge (const eC_Value &vY)
 
void SetRelYPosCenter (const eC_Value &vYCenter)
 
void SetStopFocus (const eC_Bool &bDontFocusToParent)
 
virtual eC_Bool SetValue (CDataPoolEntry &rkValue)
 
virtual eC_Bool SetValue (const CGUIValue &rkValue)
 
virtual void SetWidth (const eC_Value &vX)
 
virtual void WriteToStream (const eC_Bool bWriteClassID=false)
 
- Public Member Functions inherited from CGUIBehaviour
virtual eC_Bool DoUserEvent (CGUIEvent *const pEvent)
 
virtual void OnCreate ()
 
virtual void OnDelete ()
 
virtual void OnHide ()
 
virtual void OnShow ()
 
virtual eC_Bool DoLongClick (const eC_Value &vAbsX=eC_FromInt(-1), const eC_Value &vAbsY=eC_FromInt(-1))
 
virtual eC_Bool DoDoubleClick (const eC_Value &vAbsX=eC_FromInt(-1), const eC_Value &vAbsY=eC_FromInt(-1))
 
virtual eC_Bool DoButtonUp (const eC_Value &vAbsX=eC_FromInt(-1), const eC_Value &vAbsY=eC_FromInt(-1))
 
virtual eC_Bool DoMouseEnter (const eC_Value &vAbsX=eC_FromInt(-1), const eC_Value &vAbsY=eC_FromInt(-1))
 
virtual eC_Bool DoMouseLeave (const eC_Value &vAbsX=eC_FromInt(-1), const eC_Value &vAbsY=eC_FromInt(-1))
 
virtual eC_Bool DoMouseMove (const eC_Value &vAbsX=eC_FromInt(-1), const eC_Value &vAbsY=eC_FromInt(-1))
 
virtual void GetFocus ()
 
virtual void LoseFocus ()
 
virtual eC_Bool Decrease ()
 
virtual eC_Bool Increase ()
 
virtual eC_Bool DoKeyDown (const GUIKeyIdentifier_t &eKeyIdentifier, const eC_UInt &uiModifiers)
 
virtual eC_Bool DoKeyUp (const GUIKeyIdentifier_t &eKeyIdentifier, const eC_UInt &uiModifiers)
 
virtual eC_Bool DoChar (const eC_UInt &uiKey, const GUIKeyIdentifier_t &eKeyIdentifier, const eC_UInt &uiModifiers)
 
virtual eC_Bool DoScrollUp (const eC_Value &vAbsX, const eC_Value &vAbsY)
 
virtual eC_Bool DoScrollDown (const eC_Value &vAbsX, const eC_Value &vAbsY)
 
virtual eC_Bool DoScrollLeft (const eC_Value &vAbsX, const eC_Value &vAbsY)
 
virtual eC_Bool DoScrollRight (const eC_Value &vAbsX, const eC_Value &vAbsY)
 
- Public Member Functions inherited from CGUIStreamableObject
const eC_String & GetXMLTag () const
 
virtual void ReadFromStream ()
 
void SetXMLTag (const eC_String &kXMLTag)
 
virtual void WriteToStream (const eC_Bool bWriteClassID=false)
 
- 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 ()
 

Additional Inherited Members

- Static Public Attributes inherited from CGUIObject
static const eC_Char XMLTAG_ALPHA []
 XML tag to be used writing alpha-value into a stream.
 
static const eC_Char XMLTAG_CLICKTHROUGH []
 XML tag to be used writing clickthrough-state into a stream.
 
static const eC_Char XMLTAG_CONTROLCLASSID []
 XML tag to be used when writing a control class ID into a stream.
 
static const eC_Char XMLTAG_DISABLED []
 XML tag to be used writing disabled-state into a stream.
 
static const eC_Char XMLTAG_FOCUSSABLE []
 XML tag to be used writing focussable-state into a stream.
 
static const eC_Char XMLTAG_GRAYEDOUT []
 XML tag to be used writing grayedout-state into a stream.
 
static const eC_Char XMLTAG_HEIGHT []
 XML tag to be used writing height into a stream.
 
static const eC_Char XMLTAG_INVISIBLE []
 XML tag to be used writing invisible-state into a stream.
 
static const eC_Char XMLTAG_OBJECTID []
 XML tag to be used writing object id into a stream.
 
static const eC_Char XMLTAG_OVERRIDDENNEIGHBORS []
 XML tag to be used writing overridden neighbors into a stream.
 
static const eC_Char XMLTAG_WIDTH []
 XML tag to be used writing width into a stream.
 
static const eC_Char XMLTAG_XPOS []
 XML tag to be used writing x-position into a stream.
 
static const eC_Char XMLTAG_YPOS []
 XML tag to be used writing y-position into a stream.
 
- Static Public Attributes inherited from CGUIBehaviour
static const eC_Char XMLTAG_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 []
 
- Protected Member Functions inherited from CGUIObject
virtual eC_Bool CreateBitmapPlane ()
 
virtual eC_Bool FourWayNext (FourWayFocus_t eFocusDirection)
 
- Protected Member Functions inherited from CGUIStreamableObject
eC_UInt ReadStreamingHeader (const eC_UInt &uiClassVersion, const eC_UInt &uiClassMinVersion=0) const
 
void WriteStreamingFooter (const eC_Bool &bWriteClassID) const
 
void WriteStreamingHeader (const eC_Bool &bWriteClassID, const eC_Char *const pkClassIDTag, const eC_Int &iClassID, const eC_UInt &uiClassVersion) const
 

Detailed Description

This control can be used to visualize multiple data-sources in line- or bar-charts.

Member Enumeration Documentation

◆ AxisRepresentation_t

enum how the axis are displayed

Enumerator
NONE 

do not show axis

LINE 

show only line of axis

LINE_AND_SCALING 

Dots of data connected with 1 line.

LINE_SCALING_AND_TEXT 

Bars Raising out of x-axis.

◆ DataRepresentation_t

enum how to disply values

Enumerator
POINTS 

only points

LINES 

points and lines

Dots of data connected with 1 line

BARS 

Bars Raising out of x-axis.

PIE 

pie-chart (only one dataset)

RING 

ring-chart (stacked datasets)

STACKED_LINES 

stacked lines on top of each other

STACKED_BARS 

stacked bars on top of each other

Constructor & Destructor Documentation

◆ CGUIChart() [1/4]

CGUIChart::CGUIChart ( CGUICompositeObject *const  pkParent,
const eC_Value &  vX,
const eC_Value &  vY,
const eC_Value &  vWidth,
const eC_Value &  vHeight,
eC_UInt  iAxisColor,
eC_UInt  TextLabelColor,
eC_UInt  DrawLineColor,
eC_UInt  DrawPointColor,
eC_UInt  BarColor,
eC_Value  AxisLineWidth,
eC_Value  DrawLineWidth,
eC_Value  vScaleLength,
eC_Value  vPointSize,
eC_UInt  uiScalingXAxis,
eC_UInt  uiScalingYAxis,
eC_Value  vMaxShownNumberY,
eC_Value  vMinShownNumberY,
eC_Value  vZoomFactorY,
eC_UInt  uiZoomFactorX,
const ObjectHandle_t eID = NO_HANDLE 
)

Constructor Please use the SetImages method to set the correct images.

Parameters
pkParentPointer to the designated parent object
vXX-position relative to its parent object
vYY-position relative to its parent object
vWidthWidth of the geometry object
vHeightHeight of the geometry object
iAxisColorColor of the axis Ex(0xff000000)
TextLabelColorColor of the Text Lables Ex(0xff000000)
DrawLineColorColor of the Line that connects data points Ex(0xff000000)
DrawPointColorColor of the Data Points Ex(0xff123456)
BarColorColor of the Bars Ex(0xff000000)
AxisLineWidthWitdh of axis lines
DrawLineWidthWitdh of lines that connect Data Points
vScaleLengthLength of the lines that go thru X and Y axis
vPointSizeSize of the point to be drawn
uiScalingXAxisNumber of parts in X axis (lines that cross X axis)
uiScalingYAxisNumber of parts in Y axis (lines that cross Y axis)
vMaxShownNumberYMaximum lable number on Y axis (is not a constant AND changes dinamically depending on user interaction)
vMinShownNumberYMinimum lable number on Y axis (is not a constant AND changes dinamically depending on user interaction)
vZoomFactorYHow much zoom will enlarge Y axis (best choice 2)
uiZoomFactorXHow much zoom will enlarge X axis (best choice 2)
eIDObject identifier of this object (choose NO_HANDLE if none is required)

◆ CGUIChart() [2/4]

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

Constructor Please use the SetImages method to set the correct images.

Parameters
pkParentPointer to the designated parent object
vXX-position relative to its parent object
vYY-position relative to its parent object
vWidthWidth of the geometry object
vHeightHeight of the geometry object
eIDObject-ID Parameters that will set up automatically: (iAxisColor, TextLabelColor, DrawLineColor, DrawPointColor, BarColor, AxisLineWidth, DrawLineWidth, vScaleLength, vPointSize uiScalingXAxis, uiScalingYAxis, vMaxShownNumberY, vMinShownNumberY, vZoomFactorY, uiZoomFactorX)

◆ CGUIChart() [3/4]

CGUIChart::CGUIChart ( CGUICompositeObject *const  pkParent,
const eC_Value &  vX,
const eC_Value &  vY,
const eC_Value &  vWidth,
const eC_Value &  vHeight,
eC_Int  iScalingXAxis,
eC_Int  iScalingYAxis,
eC_Value  vMaxShownNumberY,
eC_Value  vMinShownNumberY,
const ObjectHandle_t eID = NO_HANDLE 
)

Constructor Please use the SetImages method to set the correct images.

Parameters
pkParentPointer to the designated parent object
vXX-position relative to its parent object
vYY-position relative to its parent object
vWidthWidth of the geometry object
vHeightHeight of the geometry object
iScalingXAxisinitial scaling of x-axis
iScalingYAxisinitial scaling of y-axis
vMaxShownNumberYMaximum lable number on Y axis (is not a constant AND changes dinamically depending on user interaction)
vMinShownNumberYMinimum lable number on Y axis (is not a constant AND changes dinamically depending on user interaction)
eIDObject-ID Parameters that will set up automatically: (iAxisColor, TextLabelColor, DrawLineColor, DrawPointColor, BarColor, AxisLineWidth, DrawLineWidth, vScaleLength, vPointSize uiScalingXAxis, uiScalingYAxis, vZoomFactorY, uiZoomFactorX)

◆ ~CGUIChart()

virtual CGUIChart::~CGUIChart ( )
virtual

Destructor

◆ CGUIChart() [4/4]

CGUIChart::CGUIChart ( )

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
CGUIChart()

Member Function Documentation

◆ AddData()

void CGUIChart::AddData ( eC_Value  vDataValue,
eC_UInt  uiDimension = 0 
)

AddData Adds data to the array. Note that the dimension starts at 0. For example if only one line of data is displayed then its dimension is 0. If user wish to display two lines of data, then the user needs to append second dimension (1) and so on.

Parameters
vDataValueeC_Value
uiDimensioneC_UInt

◆ DoButtonDown()

virtual eC_Bool CGUIChart::DoButtonDown ( const eC_Value &  vAbsX,
const eC_Value &  vAbsY 
)
virtual

Called when the mouse button or finger is pressed down over an object.

Note
DoButtonDown() should work on the absolute positions of this object, that were set at the time of the passed redraw, as the user expects to click on what he sees and not to click on the object in a newer and probably intermediate state that he currently does not see in this state. Thus, to calculate the relative position (where the object was pressed relative to the origin of this object) from the vAbsY argument you must do it like this: vMyRelYPos = vAbsY - GetAbsYPos().
Parameters
vAbsXX-position in screen coordinates where the click occurred
vAbsYY-position in screen coordinates where the click occurred
Returns
True The event has been handled.
False The event has not been handled. In this base implementation always returns False.

Reimplemented from CGUIBehaviour.

◆ DoClick()

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

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

Note
DoClick() should work on the absolute positions of this object, that were set at the time of the passed redraw, as the user expects to click on what he sees and not to click on an object in a newer and probably intermediate state that he currently does not see. Thus, to calculate the relative position (where the mouse button was pressed and released at the same position for in a certain time span, relative to the origin of this object) from the vAbsY argument you must do it like this: vMyRelYPos = vAbsY - GetAbsYPos().
Parameters
vAbsXX-position in screen coordinates where the click occurred
vAbsYY-position in screen coordinates where the click occurred
Returns
True The event has been handled.
False The event has not been handled. In this base implementation it always returns False.

Reimplemented from CGUIBehaviour.

◆ DoDrag()

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

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

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

Reimplemented from CGUIBehaviour.

◆ DoDragEnd()

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

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

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

Reimplemented from CGUIBehaviour.

◆ DoDraw()

virtual eC_Bool CGUIChart::DoDraw ( )
virtual

Visualizes the object. It is forbidden to call SetRelXPos, SetRelYPos, SetWidth or SetHeight in DoDraw, i.e., it is not allowed to change the layout.

Returns
True if anything was drawn, False otherwise

Reimplemented from CGUIObject.

◆ GetAxisColor()

eC_UInt CGUIChart::GetAxisColor ( ) const

GetAxisColor This method returns the color of the x- and y-axis (scaling color is also included).

Returns
Axis-color

◆ GetAxisLineWidth()

eC_Value CGUIChart::GetAxisLineWidth ( ) const

GetAxisLineWidth This method returns the visual width of the axis lines (scaling lines are also included)

Returns
m_vAxisLineWidth eC_Value

◆ GetBarColor()

eC_UInt CGUIChart::GetBarColor ( const eC_UInt &  uiIndex) const

GetBarColor This method returns the color of the bar (bar-chart representation) depending on the dymensions. Default is 0 (first data array)

Parameters
uiIndexeC_UInt
Returns
bar-color of index

◆ GetDataRepresentation()

DataRepresentation_t CGUIChart::GetDataRepresentation ( ) const

This method returns the currently set representation of data points. It can be points, points and lines, lines or bars.

Returns
data representation

◆ GetDrawLineWidth()

eC_Value CGUIChart::GetDrawLineWidth ( ) const

GetDrawLineWidth This method returns the visual width of the draw lines (line-chart representation)

Returns
m_vDrawLineWidth eC_Value

◆ GetFocusArea()

CGUIRect CGUIChart::GetFocusArea ( ) const

Get the currently focussed area of data

Returns
focus-area

◆ GetHelperLineRepresentation()

CGUICommonEnums::AxisAlignment_t CGUIChart::GetHelperLineRepresentation ( ) const

This method returns the representation type of the helper lines

Returns
representation type of the helper lines

◆ GetHorizontalHelperLineColor()

eC_UInt CGUIChart::GetHorizontalHelperLineColor ( ) const

This method returns the color of the horizontal helper lines

Returns
color

◆ GetLineColor()

eC_UInt CGUIChart::GetLineColor ( const eC_UInt &  uiIndex) const

GetLineColor This method returns the color of the line (line-chart representation) depending on the dymensions. Default is 0 (first data array)

Parameters
uiIndex
Returns
line-color of index

◆ GetPointColor()

eC_UInt CGUIChart::GetPointColor ( const eC_UInt &  uiIndex) const

GetPointColor This method returns the color of the point (point-chart representation) depending on the dymensions. Default is 0 (first data array)

Parameters
uiIndexeC_UInt
Returns
point-color of index

◆ GetPointSize()

eC_Value CGUIChart::GetPointSize ( ) const

GetPointSize This method returns the visual size of the datapoints

Returns
m_vPointSize eC_Value

◆ GetRangeX()

void CGUIChart::GetRangeX ( eC_Int &  iMinNumber,
eC_Int &  iMaxNumber 
) const

Get the range for shown datapoints

Parameters
iMinNumberis the data point to be shown first
iMaxNumberis the data point to be shown last

◆ GetRangeY()

void CGUIChart::GetRangeY ( eC_Value &  vMinValue,
eC_Value &  vMaxValue 
) const

Get the range for y-axis

Parameters
vMinValueminimum value
vMaxValuemaximum value

◆ GetRepresentationXAxis()

AxisRepresentation_t CGUIChart::GetRepresentationXAxis ( ) const

This method return the currently set representation of x-axis. (invisible, only-axis, axis and scaling, axis scaling and labels)

Returns
horizontal axis-representation

◆ GetRepresentationYAxis()

AxisRepresentation_t CGUIChart::GetRepresentationYAxis ( ) const

This method return the currently set representation of y-axis. (invisible, only-axis, axis and scaling, axis scaling and labels)

Returns
vertical axis-representation

◆ GetScaleLength()

eC_Value CGUIChart::GetScaleLength ( ) const

GetScaleLength This method returns the visual lenght of the scales (x- and y-axis scaling)

Returns
m_vScaleLength eC_Value

◆ GetScalingXAxis()

eC_UInt CGUIChart::GetScalingXAxis ( ) const

GetScalingXAxis This method returns the scaling of X-axis.

Returns
m_uiScalingXAxis eC_UInt

◆ GetScalingYAxis()

eC_UInt CGUIChart::GetScalingYAxis ( ) const

GetScalingYAxis This method returns the scaling of Y-axis.

Returns
m_uiScalingYAxis eC_UInt

◆ GetSelectionColor()

eC_UInt CGUIChart::GetSelectionColor ( ) const

GetBarColor This method returns the color of the selection Default is 0 (first data array)

Returns
Selection-color

◆ GetShowBarData()

eC_Bool CGUIChart::GetShowBarData ( ) const

Return if bar-data is currently shown

Returns
true if active

◆ GetStartLabelValue()

eC_Int CGUIChart::GetStartLabelValue ( ) const

Get the starting value for x-axis

Returns
starting-value

◆ GetTextLabelColor()

eC_UInt CGUIChart::GetTextLabelColor ( ) const

GetDrawLineColor This method returns the color of the text that is used to draw all labels.

Returns
Color of text-label

◆ GetVerticalHelperLineColor()

eC_UInt CGUIChart::GetVerticalHelperLineColor ( ) const

This method returns the color of the horizontal helper lines

Returns
color

◆ GetZoomFactorX()

eC_Value CGUIChart::GetZoomFactorX ( ) const

GetZoomFactorX This method returns the zoom factor of X-axis.

Returns
m_uiZoomFactorX eC_Value

◆ GetZoomFactorY()

eC_Value CGUIChart::GetZoomFactorY ( ) const

GetZoomFactorY This method returns the zoom factor of Y-axis.

Returns
m_vZoomFactorY eC_Value

◆ IsHighlightable()

virtual eC_Bool CGUIChart::IsHighlightable ( ) const
inlinevirtual

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

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

Reimplemented from CGUIObject.

◆ JumpToDataPoint()

void CGUIChart::JumpToDataPoint ( const eC_Int &  iMinShownData)

Sets the minimum data point as first datapoint of the x axis For example - 100 data points and scaling of x axis is 10 SetMinShownData(20) will make it so that the x axis will display 20th data point first and 29th data point last

Parameters
iMinShownDatais the data point to be shown first

◆ JumpToTheEnd()

void CGUIChart::JumpToTheEnd ( )

JumpToTheEnd Whenever this method will be called the data-point view will jump to the end. That means that only the last datapoints will be displayed.

◆ KeepLastXElemenets()

void CGUIChart::KeepLastXElemenets ( const eC_UInt &  uiDataAmountToKepp)

KeepLastXElemenets This method keeps x amount of data points that are saved in this class. Note, if you are using DataPool then when the DataPool will notify this class again, all data points will come back.

Parameters
uiDataAmountToKeppeC_UInt

◆ ReadFromStream()

virtual void CGUIChart::ReadFromStream ( )
virtual

Reads all object attributes from streaming file. Only for use with GUIFactory. GUIStreamingFileReader has to be set in CGUI::Init().

See also
CGUIFactory

Reimplemented from CGUIObject.

◆ SetAxisColor() [1/2]

void CGUIChart::SetAxisColor ( const eC_UInt &  uiAxisColor)

SetAxisColor

Parameters
uiAxisColor

◆ SetAxisColor() [2/2]

void CGUIChart::SetAxisColor ( const GlobalProperty_t eAxisColor)

SetAxisColor

Parameters
eAxisColor

◆ SetAxisLineWidth()

void CGUIChart::SetAxisLineWidth ( const eC_Value &  vAxisLineWidth)

SetAxisLineWidth This method sets the with of axis lines (that also includes the width of scaling lines)

Parameters
vAxisLineWidtheC_Value

◆ SetBarColor() [1/2]

void CGUIChart::SetBarColor ( const eC_UInt &  uiIndex,
const eC_UInt &  uiBarColor 
)

SetBarColor

Parameters
uiIndexis the indes of the array of colors (starts from 0)
uiBarColor

◆ SetBarColor() [2/2]

void CGUIChart::SetBarColor ( const eC_UInt &  uiIndex,
const GlobalProperty_t eBarColor 
)

SetBarColor

Parameters
uiIndexis the indes of the array of colors (starts from 0)
eBarColor

◆ SetDataRepresentation()

void CGUIChart::SetDataRepresentation ( const DataRepresentation_t eDataRepresentation)

This method changes the representation of data points. It can be points, points and lines, lines or bars.

Parameters
eDataRepresentationdata representation

◆ SetDrawLineWidth()

void CGUIChart::SetDrawLineWidth ( const eC_Value &  vDrawLineWidth)

SetDrawLineWidth This method sets the with of lines that are used to connect data points

Parameters
vDrawLineWidtheC_Value

◆ SetFont()

void CGUIChart::SetFont ( const FontResource_t eFontId)

Sets the font used for the axis

Parameters
eFontIdFontID

◆ SetHeight()

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

Sets this object's height to a new value.

Parameters
vYthe new height

Reimplemented from CGUIObject.

◆ SetHelperLineRepresentation()

void CGUIChart::SetHelperLineRepresentation ( const CGUICommonEnums::AxisAlignment_t eRepresentation)

This method sets display of helper-lines (none, hor, ver or both)

Parameters
eRepresentationtype of helper-lines

◆ SetHorizontalHelperLineColor() [1/2]

void CGUIChart::SetHorizontalHelperLineColor ( const eC_UInt &  uiColor)

This method sets the color of the horizontal helper lines.

Parameters
uiColorcolor

◆ SetHorizontalHelperLineColor() [2/2]

void CGUIChart::SetHorizontalHelperLineColor ( const GlobalProperty_t eColor)

This method sets the color of the horizontal helper lines.

Parameters
eColorcolor

◆ SetImages()

void CGUIChart::SetImages ( const ImageResource_t eImageBG)

SetImages Method to change the images used for the chart background. If the chart size varies from the supplied image's size, the image will automatically split into three portions. These are either a left/middle/right part for horizontal, or a top/middle/bottom part for vertical sliders. The left/top images will be constructed from the left/top half of the original image. Analogue, The right/bottom images will be constructor from the right/bottom half of the original image. The pixel row/column in the middle of the original image will be stretched to fill up the space, if the chart is to be displayed bigger than the original image.

Parameters
eImageBGID of background image

◆ SetLineColor() [1/2]

void CGUIChart::SetLineColor ( const eC_UInt &  uiIndex,
const eC_UInt &  uiLineColor 
)

SetLineColor

Parameters
uiIndexeC_Uint is the indes of the array of colors (starts from 0)
uiLineColor

◆ SetLineColor() [2/2]

void CGUIChart::SetLineColor ( const eC_UInt &  uiIndex,
const GlobalProperty_t eLineColor 
)

SetLineColor

Parameters
uiIndexeC_Uint is the indes of the array of colors (starts from 0)
eLineColor

◆ SetMaxValueY()

void CGUIChart::SetMaxValueY ( const eC_Value &  vMaxNumber)

Sets the maximum number of Y axis scaling

Parameters
vMaxNumberis the maximum number

◆ SetMinValueY()

void CGUIChart::SetMinValueY ( const eC_Value &  vMinNumber)

Sets the minimum number of Y axis scaling

Parameters
vMinNumberis the minimum number

◆ SetPointColor() [1/2]

void CGUIChart::SetPointColor ( const eC_UInt &  uiIndex,
const eC_UInt &  uiPointColor 
)

SetPointColor

Parameters
uiIndexeC_Uint is the indes of the array of colors (starts from 0)
uiPointColor

◆ SetPointColor() [2/2]

void CGUIChart::SetPointColor ( const eC_UInt &  uiIndex,
const GlobalProperty_t ePointColor 
)

SetPointColor

Parameters
uiIndexeC_Uint is the indes of the array of colors (starts from 0)
ePointColor

◆ SetPointSize()

void CGUIChart::SetPointSize ( const eC_Value &  vPointSize)

SetPointSize This method sets the size of points that are used to draw data on the screen

Parameters
vPointSizeeC_Value

◆ SetRangeX()

void CGUIChart::SetRangeX ( const eC_Int &  iMinNumber,
const eC_Int &  iMaxNumber 
)

Sets the range for shown data points It will start always from the first parameter, but if the last parameter will exceed normal scaling of x axis then the chart will display more datapoints than the input suggests.

Parameters
iMinNumberis the data point to be shown first
iMaxNumberis the data point to be shown last

◆ SetRangeY()

void CGUIChart::SetRangeY ( const eC_Value &  vMinValue,
const eC_Value &  vMaxValue 
)

Sets minimum and maximum value for y-axis

Parameters
vMinValueminimum value
vMaxValuemaximum value

◆ SetRepresentationXAxis()

void CGUIChart::SetRepresentationXAxis ( const AxisRepresentation_t eXAxis)

This method changes the representation of x-axis. (invisible, only-axis, axis and scaling, axis scaling and labels)

Parameters
eXAxis

◆ SetRepresentationYAxis()

void CGUIChart::SetRepresentationYAxis ( const AxisRepresentation_t eYAxis)

This method changes the representation of y-axis. (invisible, only-axis, axis and scaling, axis scaling and labels)

Parameters
eYAxis

◆ SetScaleLength()

void CGUIChart::SetScaleLength ( const eC_Value &  vScaleLength)

SetScaleLength This method sets the lenght of scale lines (both x- and y-axis)

Parameters
vScaleLengtheC_Value

◆ SetScalingXAxis()

void CGUIChart::SetScalingXAxis ( const eC_UInt &  uiScalingXAxis)

SetScalingXAxis This method sets the scaling of x-axis (amount of partitions - in how many parts will be x-axis divided) This dictetes how many datapoints (if datapoints > scaling) will be displayed in one chart frame

Parameters
uiScalingXAxiseC_UInt

◆ SetScalingYAxis()

void CGUIChart::SetScalingYAxis ( const eC_UInt &  uiScalingYAxis)

SetScalingYAxis This method sets the scaling of y-axis (amount of partitions - in how many parts will be y-axis divided) This dictetes how many labels will be on y-axis (not including the origin label)

Parameters
uiScalingYAxiseC_UInt

◆ SetSelectionColor() [1/2]

void CGUIChart::SetSelectionColor ( const eC_UInt &  uiSelectionColor)

SetSelectionColor

Parameters
uiSelectionColor

◆ SetSelectionColor() [2/2]

void CGUIChart::SetSelectionColor ( const GlobalProperty_t eSelectionColor)

SetSelectionColor

Parameters
eSelectionColor

◆ SetShowBarData()

void CGUIChart::SetShowBarData ( const eC_Bool &  bShowBarData)

This method turns on and off the value feedback method. ONLY works in bar-chart representation. Value feedback method shows the data value of the bar that is clicked by the user.

Parameters
bShowBarData

◆ SetStandardImages()

void CGUIChart::SetStandardImages ( )

SetStandardImages Sets standard images.

◆ SetStartLabelValue()

void CGUIChart::SetStartLabelValue ( const eC_Int &  iStartValue)

SetStartLabelValue This method sets the value label at which x-axis starts

Parameters
iStartValueeC_Int

◆ SetTextLabelColor() [1/2]

void CGUIChart::SetTextLabelColor ( const eC_UInt &  uiTextLabelColor)

SetTextLabelColor

Parameters
uiTextLabelColor

◆ SetTextLabelColor() [2/2]

void CGUIChart::SetTextLabelColor ( const GlobalProperty_t eTextLabelColor)

SetTextLabelColor

Parameters
eTextLabelColor

◆ SetValue()

virtual eC_Bool CGUIChart::SetValue ( CDataPoolEntry rkValue)
virtual

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

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

Reimplemented from CGUIObject.

◆ SetVerticalHelperLineColor() [1/2]

void CGUIChart::SetVerticalHelperLineColor ( const eC_UInt &  uiColor)

This method sets the color of the horizontal helper lines

Parameters
uiColorcolor

◆ SetVerticalHelperLineColor() [2/2]

void CGUIChart::SetVerticalHelperLineColor ( const GlobalProperty_t eColor)

This method sets the color of the horizontal helper lines

Parameters
eColorcolor

◆ SetWidth()

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

Sets this object's width to a new value.

Parameters
vXthe new width

Reimplemented from CGUIObject.

◆ SetZoomFactorX()

void CGUIChart::SetZoomFactorX ( const eC_Value &  vZoomFactorX)

SetZoomFactorX This method sets the zoom factor of x-axis. That means that each time when the user zooms out the x-axis the ignore factor (data displayed per scale (default is 1)) will be multiplied by this number

Parameters
vZoomFactorXfor x-axis

◆ SetZoomFactorY()

void CGUIChart::SetZoomFactorY ( const eC_Value &  vZoomFactorY)

SetZoomFactorY This method sets the zoom factor of y-axis. That means that each time when the user zooms out the y-axis the min and max numbers will be multiplied by this number.

Parameters
vZoomFactorYfor y-axis

◆ WipeAllData()

void CGUIChart::WipeAllData ( )

WipeAllData This method deletes all data points that are saved in this class. Note, if you are using DataPool then when the DataPool will notify this class again, all data points will come back.

◆ WriteToStream()

virtual void CGUIChart::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.

◆ ZoomInX()

void CGUIChart::ZoomInX ( )

ZoomInX This method zooms in of x-axis (which means that less data points will be drawn in a single chart frame)

◆ ZoomInY()

void CGUIChart::ZoomInY ( )

ZoomInY This method zooms out in y-axis (which means that the range between min and max is smaller)

◆ ZoomOutX()

void CGUIChart::ZoomOutX ( )

ZoomOutX This method zooms out of x-axis (which means that more data points will be drawn in a single chart frame)

◆ ZoomOutY()

void CGUIChart::ZoomOutY ( )

ZoomOutY This method zooms out of y-axis (which means that the range between min and max is bigger)


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