Guiliani  Version 2.5 revision 7293 (documentation build 13)
GUIBaseTextField.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 GUIBASETEXTFIELD__H_
11#define GUIBASETEXTFIELD__H_
12
13#include "GUIObject.h"
14#include "GUIColorPropertyObserver.h"
15#include "GUITextResource.h"
16
17class CGUI;
18class CGUIText;
19
21
64{
65public:
78 CGUICompositeObject* const pkParent,
79 const eC_Value& vX, const eC_Value& vY,
80 const eC_Value& vWidth, const eC_Value& vHeight,
81 const eC_String &kText,
82 const eC_Bool& bMultiLine = false,
83 const eC_UInt &uiBackgroundColor = 0x00000000,
84 const ObjectHandle_t &eID = NO_HANDLE);
85
95 CGUICompositeObject* const pkParent,
96 const CGUIRect &kRect,
97 const eC_String &kText,
98 const eC_Bool& bMultiLine = false,
99 const eC_UInt &uiBackgroundColor = 0x00000000,
100 const ObjectHandle_t &eID = NO_HANDLE);
101
114 CGUICompositeObject* const pkParent,
115 const eC_Value& vX, const eC_Value& vY,
116 const eC_Value& vWidth, const eC_Value& vHeight,
117 const TextResource_t &eTextID,
118 const eC_Bool& bMultiLine = false,
119 const eC_UInt &uiBackgroundColor = 0x00000000,
120 const ObjectHandle_t &eID = NO_HANDLE);
121
131 CGUICompositeObject* const pkParent,
132 const CGUIRect &kRect,
133 const TextResource_t &eTextID,
134 const eC_Bool& bMultiLine = false,
135 const eC_UInt &uiBackgroundColor = 0x00000000,
136 const ObjectHandle_t &eID = NO_HANDLE);
137
140
145
151
157 virtual eC_Bool SetValue(const CGUIValue& rkValue);
158
159 virtual eC_Bool DoDraw();
160
164 const CGUIText* GetLabel() const { return m_pkText; }
165
170
174 eC_UInt GetBackgroundColor() const;
175
179 void SetBackgroundColor(const eC_UInt &uiBackgroundColor);
180
184 void SetBackgroundColor(const GlobalProperty_t &eBackgroundColor);
185
189 void SetLabel(const TextResource_t &eTextID);
190
194 void SetLabel(const eC_String &rkText);
195
202 void SetText(CGUIText* pkText);
203
209 virtual void SetWidth(const eC_Value& vNewWidth);
210
216 virtual void SetHeight(const eC_Value& vNewHeight);
217
222
223#if defined(GUILIANI_STREAM_GUI) || defined(GUILIANI_WRITE_GUI)
225 static const eC_Char XMLTAG_BASETEXTFIELD[];
226#endif
227
228#ifdef GUILIANI_STREAM_GUI
229 virtual void ReadFromStream();
230#endif
231
232#ifdef GUILIANI_WRITE_GUI
233 virtual void WriteToStream(const eC_Bool bWriteClassID = false);
234#endif
235
236protected:
239
240private:
244 void CopyAttributes(const CGUIBaseTextField& kSource);
245
251 void Init(const eC_String &kText, eC_Bool bMultiLine);
252
258 void Init(const TextResource_t &eTextID, eC_Bool bMultiLine);
259
261 void DeInit();
262};
263#endif
ObjectHandle_t
List of object resource ids.
Definition: GUIObjectHandleResource.h:55
GlobalProperty_t
List of property resource ids.
Definition: GUIPropertyResource.h:67
Helper Macros in Guiliani
TextResource_t
List of text resource ids.
Definition: GUITextResource.h:40
Represents a simple GUI object containing a text.
Definition: GUIBaseTextField.h:64
const CGUIText * GetLabel() const
Definition: GUIBaseTextField.h:164
virtual eC_Bool SetValue(const CGUIValue &rkValue)
static const eC_Char XMLTAG_BASETEXTFIELD[]
xml-tag for the class itself
Definition: GUIBaseTextField.h:225
CGUIBaseTextField(CGUICompositeObject *const pkParent, const CGUIRect &kRect, const eC_String &kText, const eC_Bool &bMultiLine=false, const eC_UInt &uiBackgroundColor=0x00000000, const ObjectHandle_t &eID=NO_HANDLE)
virtual void SetWidth(const eC_Value &vNewWidth)
CGUIBaseTextField & operator=(const CGUIBaseTextField &kSource)
static const eC_Char XMLTAG_BASETEXTFIELD_BACKGROUNDCOLOR[]
xml-tag for background-color
Definition: GUIBaseTextField.h:224
void SetBackgroundColor(const GlobalProperty_t &eBackgroundColor)
CGUIBaseTextField(CGUICompositeObject *const pkParent, const eC_Value &vX, const eC_Value &vY, const eC_Value &vWidth, const eC_Value &vHeight, const TextResource_t &eTextID, const eC_Bool &bMultiLine=false, const eC_UInt &uiBackgroundColor=0x00000000, const ObjectHandle_t &eID=NO_HANDLE)
void SetBackgroundColor(const eC_UInt &uiBackgroundColor)
virtual eC_Bool DoDraw()
void SetLabel(const TextResource_t &eTextID)
eC_UInt GetBackgroundColor() const
void SetLabel(const eC_String &rkText)
CGUIText * m_pkText
The text displayed by this text field.
Definition: GUIBaseTextField.h:238
virtual void WriteToStream(const eC_Bool bWriteClassID=false)
void SetText(CGUIText *pkText)
virtual void ReadFromStream()
CGUIBaseTextField(const CGUIBaseTextField &kSource)
CGUIBaseTextField(CGUICompositeObject *const pkParent, const eC_Value &vX, const eC_Value &vY, const eC_Value &vWidth, const eC_Value &vHeight, const eC_String &kText, const eC_Bool &bMultiLine=false, const eC_UInt &uiBackgroundColor=0x00000000, const ObjectHandle_t &eID=NO_HANDLE)
CGUIBaseTextField(CGUICompositeObject *const pkParent, const CGUIRect &kRect, const TextResource_t &eTextID, const eC_Bool &bMultiLine=false, const eC_UInt &uiBackgroundColor=0x00000000, const ObjectHandle_t &eID=NO_HANDLE)
virtual void SetHeight(const eC_Value &vNewHeight)
CGUIText * GetLabel()
Definition: GUIBaseTextField.h:169
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
GUI base class for any Guiliani application.
Definition: GUI.h:47
This is the Guiliani base class all controls are derived from.
Definition: GUIObject.h:79
Helper class to supply a platform independent rectangle implementation.
Definition: GUIRect.h:63
Class for handling a text.
Definition: GUIText.h:103
CGUIValue stores a single value in one specific type.
Definition: GUIValue.h:25