Guiliani  Version 2.5 revision 7293 (documentation build 13)
GUIProperties.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 GUIPROPERTIES__H_
11#define GUIPROPERTIES__H_
12
13#include "eC_Types.h"
14#include "eC_String.h"
15#include "GUISubject.h"
16#include "GUIPropertyResource.h"
17
18#include "GUIComponentManager.h"
19
21#define GETPROPHDL CGUIComponentManager::GetInstance().GetProperties()
22
28{
29 friend class CGUI;
30 friend class CGUIComponentManager;
31
32public:
35 static void CreateInstance();
36
39 static void DeleteInstance();
40
41#ifdef GUILIANI_STREAM_GUI
47 void ReadGlobalPropertiesFromFile(const eC_String& kPath);
48#endif
49
50#ifdef GUILIANI_WRITE_GUI
56 void WriteGlobalPropertiesToFile(const eC_String& kPath) const;
57#endif
58
66 const GlobalProperty_t ePropertyID,
67 const eC_Int iPropertyValue);
68
76 const GlobalProperty_t ePropertyID,
77 const eC_UInt uiPropertyValue);
78
86 const GlobalProperty_t ePropertyID,
87 const eC_Float fPropertyValue);
88
96 const GlobalProperty_t ePropertyID,
97 const eC_String& rkStr);
98
106 const GlobalProperty_t ePropertyID,
107 const eC_Bool bPropertyValue);
108
117 const GlobalProperty_t ePropertyID,
118 const CGUIValue& kPropertyValue,
119 const CGUIValue::GUIValue_t& eType);
120
128 const GlobalProperty_t ePropertyID,
129 const CGUIValue& kPropertyValue);
130
136 eC_Int GetGlobalIntegerProperty(const GlobalProperty_t ePropertyID) const;
137
143 eC_UInt GetGlobalColorProperty(const GlobalProperty_t ePropertyID) const;
144
150 eC_Float GetGlobalFloatProperty(const GlobalProperty_t ePropertyID) const;
151
157 const eC_String GetGlobalTextProperty(const GlobalProperty_t ePropertyID) const;
158
164 eC_Bool GetGlobalBoolProperty(const GlobalProperty_t ePropertyID) const;
165
171 const CGUIValue& GetGlobalProperty(const GlobalProperty_t ePropertyID) const;
172
181 const GlobalProperty_t ePropertyID,
182 CGUIObserver *pObserver);
183
189 const GlobalProperty_t ePropertyID,
190 CGUIObserver *pObserver);
191
198
204
208 eC_UInt GetNOFProperties() const;
209
213 eC_String GetPropertyFilename() const;
214
215private:
217 typedef struct
218 {
219 CGUIValue kPropertyValue;
220 CGUISubject* pkPropertySubject;
221 } GUI_GlobalProperties_t;
222
223private:
227 void DeInit();
228
231
234
237 void Init();
238
241 CGUIProperties(const CGUIProperties& kSource);
242
246 CGUIProperties& operator=(const CGUIProperties& kSource);
247
248private:
250 GUI_GlobalProperties_t* m_pkGUIPropertyTable;
251
253 eC_UInt m_uiGUIPropertyTableSize;
254
256 eC_String m_kPropertyFilename;
257};
258
259#endif
Helper Macros in Guiliani
GlobalProperty_t
List of property resource ids.
Definition: GUIPropertyResource.h:67
central component-manager
Definition: GUIComponentManager.h:62
GUI base class for any Guiliani application.
Definition: GUI.h:47
Observer Base class for Observer-Design-Pattern within Guiliani.
Definition: GUIObserver.h:28
This class allows for the global customisation of controls without the need to derive specialised obj...
Definition: GUIProperties.h:28
GlobalProperty_t AddDynamicProperty(const CGUIValue &kPropertyValue)
eC_Bool GetGlobalBoolProperty(const GlobalProperty_t ePropertyID) const
void SetGlobalColorProperty(const GlobalProperty_t ePropertyID, const eC_UInt uiPropertyValue)
const eC_String GetGlobalTextProperty(const GlobalProperty_t ePropertyID) const
eC_String GetPropertyFilename() const
void SetGlobalTextProperty(const GlobalProperty_t ePropertyID, const eC_String &rkStr)
void SetGlobalProperty(const GlobalProperty_t ePropertyID, const CGUIValue &kPropertyValue)
static void DeleteInstance()
void SetGlobalFloatProperty(const GlobalProperty_t ePropertyID, const eC_Float fPropertyValue)
static void CreateInstance()
void SetGlobalBoolProperty(const GlobalProperty_t ePropertyID, const eC_Bool bPropertyValue)
void SetGlobalProperty(const GlobalProperty_t ePropertyID, const CGUIValue &kPropertyValue, const CGUIValue::GUIValue_t &eType)
eC_UInt GetNOFProperties() const
void SetGlobalIntegerProperty(const GlobalProperty_t ePropertyID, const eC_Int iPropertyValue)
void ReadGlobalPropertiesFromFile(const eC_String &kPath)
void RemoveDynamicProperty(const GlobalProperty_t eID)
eC_UInt GetGlobalColorProperty(const GlobalProperty_t ePropertyID) const
void RemoveObserver(const GlobalProperty_t ePropertyID, CGUIObserver *pObserver)
void WriteGlobalPropertiesToFile(const eC_String &kPath) const
eC_Float GetGlobalFloatProperty(const GlobalProperty_t ePropertyID) const
const CGUIValue & GetGlobalProperty(const GlobalProperty_t ePropertyID) const
eC_Int GetGlobalIntegerProperty(const GlobalProperty_t ePropertyID) const
Subject Base class for Observer-Design-Pattern within Guiliani.
Definition: GUISubject.h:34
CGUIValue stores a single value in one specific type.
Definition: GUIValue.h:25
GUIValue_t
This enumeration indicates the type (format) of the CGUIValue.
Definition: GUIValue.h:29
void AddObserver(const GlobalProperty_t ePropertyID, CGUIObserver *pObserver)