Guiliani  Version 2.5 revision 7293 (documentation build 13)
GUIGeometryObject.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 GUIGEOMETRYOBJECT_H_
11#define GUIGEOMETRYOBJECT_H_
12
13#include "GUIObject.h"
14#include "GUIColorPropertyObserver.h"
15#include "GUIColorResource.h"
16#include "GUIPropertyResource.h"
17
19
20// @guiliani_doxygen toplevel_control Geometry Object Control
32// @endguiliani_doxygen
33
38{
39public:
42 {
50 PS_RING
51 };
52
66 CGUICompositeObject* const pkParent,
67 const eC_Value& vX,
68 const eC_Value& vY,
69 const eC_Value& vWidth,
70 const eC_Value& vHeight,
71 const eC_UInt& uiColor,
72 const PrimitiveShape_t eShape,
73 const eC_Value& vThickness = eC_FromInt(1),
74 const eC_Bool& bFilled = false,
75 const ObjectHandle_t& eID = NO_HANDLE);
76
91 CGUICompositeObject* const pkParent,
92 const eC_Value& vX,
93 const eC_Value& vY,
94 const eC_Value& vWidth,
95 const eC_Value& vHeight,
96 const eC_UInt& uiColor,
97 const eC_UInt& uiBorderColor,
98 const PrimitiveShape_t eShape,
99 const eC_Value& vThickness = eC_FromInt(1),
100 const eC_Bool& bFilled = false,
101 const ObjectHandle_t& eID = NO_HANDLE);
102
107
113
117 void CopyAttributes(const CGUIGeometryObject& kSource);
118
119#if defined(GUILIANI_STREAM_GUI)
120 virtual void ReadFromStream();
121#endif
122
123#if defined(GUILIANI_WRITE_GUI)
124 virtual void WriteToStream(const eC_Bool bWriteClassID = false);
125#endif
126
129
132
133 virtual eC_Bool DoDraw();
134
135 virtual eC_Bool IsHighlightable() const { return false; }
136
139 eC_UInt GetBorderColor() const;
140
143 void SetBorderColor(const eC_UInt& uiBorderColor);
144
147 void SetBorderColor(const GlobalProperty_t& eBorderColor);
148
151 eC_UInt GetColor() const;
152
155 void SetColor(const eC_UInt& uiColor);
156
159 void SetColor(const GlobalProperty_t& eColor);
160
163 void SetShape(const PrimitiveShape_t eShape);
164
168
171 void SetThickness(const eC_Value& vThickness);
172
175 eC_Value GetThickness() const;
176
179 void SetFilled(const eC_Bool& bFilled);
180
183 eC_Bool GetFilled() const;
184
188 void SetStartAngle(const eC_Value& vStartAngle);
189
193 eC_Value GetStartAngle() const;
194
198 void SetEndAngle(const eC_Value& vEndAngle);
199
203 eC_Value GetEndAngle() const;
204
208 void SetRotationAngle(const eC_Value& vRotationAngle);
209
213 eC_Value GetRotationAngle() const;
214
218 void SetRingWidth(const eC_Value& vRingWidth);
219
223 eC_Value GetRingWidth() const;
224
225private:
226 void Init();
227
228private:
229 static const eC_UInt INDEX_BORDERCOLOR;
230 static const eC_UInt INDEX_COLOR;
231
232 PrimitiveShape_t m_eShape;
233 eC_Value m_vThickness;
234 eC_Bool m_bFilled;
235 eC_Value m_vStartAngle;
236 eC_Value m_vEndAngle;
237 eC_Value m_vRotationAngle;
238 eC_Value m_vRingWidth;
239
240 eC_Value m_vDimensionAdjustment;
241};
242
243#endif
Helper Macros in Guiliani
ObjectHandle_t
List of object resource ids.
Definition: GUIObjectHandleResource.h:55
Helper Macros in Guiliani
GlobalProperty_t
List of property resource ids.
Definition: GUIPropertyResource.h:67
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
Simple control for displaying geometrical primitives.
Definition: GUIGeometryObject.h:38
PrimitiveShape_t GetShape() const
void SetBorderColor(const GlobalProperty_t &eBorderColor)
PrimitiveShape_t
Enumeration for object shapes.
Definition: GUIGeometryObject.h:42
@ PS_LINE1
Diagonal line, from top/left to bottom/right corner of the object.
Definition: GUIGeometryObject.h:43
@ PS_HORIZONTAL_LINE
Horizontal line, centered within the object.
Definition: GUIGeometryObject.h:46
@ PS_ELLIPSE
Ellipse, centered within the object.
Definition: GUIGeometryObject.h:47
@ PS_ARC
Arc, centered within the object.
Definition: GUIGeometryObject.h:49
@ PS_RECTANGLE
Rectangle, Covering the entire object.
Definition: GUIGeometryObject.h:48
@ PS_VERTICAL_LINE
Vertical line, centered within the object.
Definition: GUIGeometryObject.h:45
@ PS_LINE2
Diagonal line, from top/right to bottom/left corner of the object.
Definition: GUIGeometryObject.h:44
@ PS_RING
Ring, centered within the object with specific width.
Definition: GUIGeometryObject.h:50
void SetBorderColor(const eC_UInt &uiBorderColor)
eC_Value GetStartAngle() const
eC_Value GetRotationAngle() const
eC_UInt GetColor() const
CGUIGeometryObject(CGUICompositeObject *const pkParent, const eC_Value &vX, const eC_Value &vY, const eC_Value &vWidth, const eC_Value &vHeight, const eC_UInt &uiColor, const PrimitiveShape_t eShape, const eC_Value &vThickness=eC_FromInt(1), const eC_Bool &bFilled=false, const ObjectHandle_t &eID=NO_HANDLE)
void SetStartAngle(const eC_Value &vStartAngle)
virtual void WriteToStream(const eC_Bool bWriteClassID=false)
CGUIGeometryObject & operator=(const CGUIGeometryObject &kSource)
eC_Value GetThickness() const
virtual void ReadFromStream()
void CopyAttributes(const CGUIGeometryObject &kSource)
void SetFilled(const eC_Bool &bFilled)
eC_Value GetRingWidth() const
eC_UInt GetBorderColor() const
void SetColor(const GlobalProperty_t &eColor)
void SetColor(const eC_UInt &uiColor)
virtual eC_Bool IsHighlightable() const
Definition: GUIGeometryObject.h:135
void SetRingWidth(const eC_Value &vRingWidth)
void SetEndAngle(const eC_Value &vEndAngle)
void SetThickness(const eC_Value &vThickness)
virtual ~CGUIGeometryObject()
eC_Value GetEndAngle() const
void SetShape(const PrimitiveShape_t eShape)
void SetRotationAngle(const eC_Value &vRotationAngle)
CGUIGeometryObject(CGUICompositeObject *const pkParent, const eC_Value &vX, const eC_Value &vY, const eC_Value &vWidth, const eC_Value &vHeight, const eC_UInt &uiColor, const eC_UInt &uiBorderColor, const PrimitiveShape_t eShape, const eC_Value &vThickness=eC_FromInt(1), const eC_Bool &bFilled=false, const ObjectHandle_t &eID=NO_HANDLE)
eC_Bool GetFilled() const
virtual eC_Bool DoDraw()
CGUIGeometryObject(const CGUIGeometryObject &kSource)
This is the Guiliani base class all controls are derived from.
Definition: GUIObject.h:79