Guiliani  Version 2.6 revision 7293 (documentation build 12)
GUIShape.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 CGUISHAPE__H_
11#define CGUISHAPE__H_
12
13#include "GUIRadialBar.h"
14
15#include "GUIImageResource.h"
16#include "GUICommonEnums.h"
17#include "GUINinePatch.h"
18
20
21// @guiliani_doxygen toplevel_control Shape
33// @endguiliani_doxygen
38{
39public:
49 CGUICompositeObject* const pkParent,
50 const eC_Value& vX,
51 const eC_Value& vY,
52 const eC_Value& vWidth,
53 const eC_Value& vHeight,
54 const ObjectHandle_t &eID = NO_HANDLE);
55
59 CGUIShape(const CGUIShape& kSource);
60
65 CGUIShape& operator=(const CGUIShape& kSource);
66
68 virtual ~CGUIShape();
69
70 virtual eC_Bool DoDraw();
71
72#ifdef GUILIANI_STREAM_GUI
73 CGUIShape();
74
75 virtual void ReadFromStream();
76#endif
77
78#ifdef GUILIANI_WRITE_GUI
79 virtual void WriteToStream(const eC_Bool bWriteClassID = false);
80#endif
81
85 eC_UInt GetColor() const;
86
90 void SetColor(const eC_UInt& uiColor);
91
95 void SetColor(const GlobalProperty_t& eColor);
96
100 eC_UInt GetBorderColor() const;
101
105 void SetBorderColor(const eC_UInt& uiBorderColor);
106
110 void SetBorderColor(const GlobalProperty_t& eBorderColor);
111
115 void SetLineWidth(const eC_Value& vLineWidth);
116
120 eC_Value GetLineWidth() const;
121
125 void SetRelative(const eC_Bool& bRelative);
126
130 eC_Bool GetRelative() const;
131
135
139 void AddPoint(CGUIPoint kPoint);
140
144 void SetFilled(const eC_Bool& bFilled);
145
149 eC_Bool GetFilled() const;
150
154 void SetTransformActive(const eC_Bool& bTransformActive);
155
159 eC_Bool GetTransformActive() const;
160
164 void SetScale(const CGUIPoint& kScale);
165
170
174 void SetRotation(const eC_Value& vRotation);
175
179 eC_Value GetRotation() const;
180
184 void SetTranslate(const CGUIPoint& kTranslate);
185
190
191private:
194 void Init();
195
199 void CopyAttributes(const CGUIShape& kSource);
200
202 void DeInit();
203
204 void UpdatePoints(const eC_Bool& bSizeChanged);
205
206private:
207 static const eC_UInt INDEX_BORDERCOLOR;
208 static const eC_UInt INDEX_COLOR;
209
210 eC_Value m_vLineWidth;
211 eC_Bool m_bRelative;
212 eC_TArray<CGUIPoint> m_kPoints;
213
214 eC_Bool m_bFilled;
215
216 eC_Bool m_bTransformActive;
217 CGUIPoint m_kScale;
218 eC_Value m_vRotation;
219 CGUIPoint m_kTranslate;
220
221 eC_UInt m_uiDrawCount;
222 CGUIPoint* m_pkDrawPoints;
223};
224#endif
Helper Macros in Guiliani
ObjectHandle_t
List of object resource ids.
Definition: GUIObjectHandleResource.h:55
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
This is the Guiliani base class all controls are derived from.
Definition: GUIObject.h:81
CGUIPoint class to hold two values (x, y) like a vector.
Definition: GUIPoint.h:18
A primitive vector shape with transformations.
Definition: GUIShape.h:38
virtual void WriteToStream(const eC_Bool bWriteClassID=false)
void SetLineWidth(const eC_Value &vLineWidth)
void SetColor(const GlobalProperty_t &eColor)
eC_UInt GetBorderColor() const
eC_Bool GetRelative() const
void SetTranslate(const CGUIPoint &kTranslate)
void SetBorderColor(const eC_UInt &uiBorderColor)
void SetRelative(const eC_Bool &bRelative)
void SetFilled(const eC_Bool &bFilled)
CGUIShape(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)
CGUIShape(const CGUIShape &kSource)
eC_Value GetLineWidth() const
virtual eC_Bool DoDraw()
CGUIPoint GetTranslate() const
void SetScale(const CGUIPoint &kScale)
void SetColor(const eC_UInt &uiColor)
eC_UInt GetColor() const
virtual ~CGUIShape()
Destructor.
CGUIPoint GetScale() const
void ClearPoints()
eC_Value GetRotation() const
CGUIShape & operator=(const CGUIShape &kSource)
virtual void ReadFromStream()
void SetTransformActive(const eC_Bool &bTransformActive)
void SetBorderColor(const GlobalProperty_t &eBorderColor)
void SetRotation(const eC_Value &vRotation)
eC_Bool GetFilled() const
void AddPoint(CGUIPoint kPoint)
eC_Bool GetTransformActive() const