Guiliani  Version 2.5 revision 7293 (documentation build 13)
GUIRadialBar.h
1/*
2* Copyright (C) TES Electronic Solutions GmbH,
3* All Rights Reserved.
4* Contact: info@guiliani.de
5*
6* This file is part of the Guiliani HMI framework
7* for the development of graphical user interfaces on embedded systems.
8*/
9
10#ifndef GUIRADIALBAR__H_
11#define GUIRADIALBAR__H_
12
13#include "GUIAbstractBar.h"
14#include "GUIColorPropertyObserver.h"
15
17
33{
34public:
37 eC_UInt GetUnfilledColor() const;
38
41 void SetUnfilledColor(const eC_UInt& uiColor);
42
46
49 eC_UInt GetFilledColor() const;
50
53 void SetFilledColor(const eC_UInt& uiColor);
54
57 void SetFilledColor(const GlobalProperty_t& eColor);
58
62 eC_Bool IsCenterFilled() const;
63
67 void SetCenterFilled(const eC_Bool& bCenterFilled);
68
72 eC_Value GetBarWidth() const;
73
77 void SetBarWidth(const eC_Value& vBarWidth);
78
82 eC_Value GetStartAngle() const;
83
88 void SetStartAngle(const eC_Value& vStartAngle);
89
93 eC_Value GetEndAngle() const;
94
99 void SetEndAngle(const eC_Value& vEndAngle);
100
101 virtual eC_Bool DoDraw();
102
103protected:
108
118 CGUICompositeObject* const pkParent,
119 const eC_Value& vX,
120 const eC_Value& vY,
121 const eC_Value& vWidth,
122 const eC_Value& vHeight,
123 const ObjectHandle_t &eID = NO_HANDLE);
124
131 CGUICompositeObject* const pkParent,
132 const CGUIRect &kRect,
133 const ObjectHandle_t &eID = NO_HANDLE);
134
139
145
146#ifdef GUILIANI_STREAM_GUI
147 virtual void ReadFromStream();
148#endif
149#ifdef GUILIANI_WRITE_GUI
150 virtual void WriteToStream(const eC_Bool bWriteClassID = false);
151#endif
152
153protected:
156 virtual void DrawUnfilled();
157
160 virtual void DrawFilled();
161
162protected:
163 eC_Bool m_bUseArcs;
165 eC_Value m_vBarWidth;
166 eC_Value m_vStartAngle;
167 eC_Value m_vEndAngle;
168 eC_Value m_vTotalAngle;
169
170private:
172 void Init();
173
178 void CopyAttributes(const CGUIRadialBar& kSource);
179
180private:
181 static const eC_UInt INDEX_UNFILLEDCOLOR;
182 static const eC_UInt INDEX_FILLEDCOLOR;
183
184};
185#endif
ObjectHandle_t
List of object resource ids.
Definition: GUIObjectHandleResource.h:55
GlobalProperty_t
List of property resource ids.
Definition: GUIPropertyResource.h:67
Base class for bars.
Definition: GUIAbstractBar.h:33
This observer provides the base-interface for controls when using color-properties.
Definition: GUIColorPropertyObserver.h:23
This is the Guiliani base class for all composite objects.
Definition: GUICompositeObject.h:70
Base class for radial bars.
Definition: GUIRadialBar.h:33
virtual eC_Bool DoDraw()
void SetUnfilledColor(const GlobalProperty_t &eColor)
void SetUnfilledColor(const eC_UInt &uiColor)
CGUIRadialBar(CGUICompositeObject *const pkParent, const CGUIRect &kRect, const ObjectHandle_t &eID=NO_HANDLE)
eC_Value m_vEndAngle
end-angle
Definition: GUIRadialBar.h:167
void SetFilledColor(const eC_UInt &uiColor)
eC_Value GetStartAngle() const
eC_Value GetEndAngle() const
virtual void DrawUnfilled()
virtual void DrawFilled()
void SetCenterFilled(const eC_Bool &bCenterFilled)
CGUIRadialBar(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)
eC_Bool m_bCenterFilled
if center is filled or cut
Definition: GUIRadialBar.h:164
void SetEndAngle(const eC_Value &vEndAngle)
virtual void WriteToStream(const eC_Bool bWriteClassID=false)
eC_Value m_vStartAngle
start-angle
Definition: GUIRadialBar.h:166
eC_Bool m_bUseArcs
draw arcs instead of rings
Definition: GUIRadialBar.h:163
void SetFilledColor(const GlobalProperty_t &eColor)
eC_Value m_vTotalAngle
total angle
Definition: GUIRadialBar.h:168
eC_Bool IsCenterFilled() const
eC_UInt GetUnfilledColor() const
void SetBarWidth(const eC_Value &vBarWidth)
eC_Value m_vBarWidth
width of the bar
Definition: GUIRadialBar.h:165
CGUIRadialBar(const CGUIRadialBar &kSource)
eC_Value GetBarWidth() const
virtual void ReadFromStream()
CGUIRadialBar & operator=(const CGUIRadialBar &kSource)
void SetStartAngle(const eC_Value &vStartAngle)
eC_UInt GetFilledColor() const
Helper class to supply a platform independent rectangle implementation.
Definition: GUIRect.h:63