Guiliani  Version 2.5 revision 7293 (documentation build 13)
GUIOnscreenKeyboardLayout.h
1#ifndef __ONSCREEN_KEYBOARD_LAYOUT_H__
2#define __ONSCREEN_KEYBOARD_LAYOUT_H__
3
4#include "eC_TArray.h"
5#include "eC_String.h"
6
7#include "GUIRect.h"
8
13{
14public:
17 {
18 KT_UNKNOWN = 0,
19 KT_PRINTABLE_KEY,
20 KT_SPECIAL_KEY,
21 KT_SEPARATOR,
22 KT_PAGE_UPPERCASE,
23 KT_PAGE_LOWERCASE,
24 KT_PAGE_NUMBERS,
25 KT_PAGE_SYMBOLS
26 };
27
29 struct KeyboardSubChars_t;
30
33 {
37 eType(KT_PRINTABLE_KEY),
38 kString(""),
39 uiKeyCode(0),
40 ubWidth(1),
41 pkSubChars(NULL)
42 {}
43
52 const KeyboardKeyType_t& Type,
53 const eC_String& Text,
54 const eC_UInt& Code,
55 const eC_UByte& Width,
56 KeyboardSubChars_t* SubChars = NULL) :
57 eType(Type),
58 kString(Text),
59 uiKeyCode(Code),
60 ubWidth(Width),
61 pkSubChars(SubChars)
62 {}
63
65 eC_String kString;
66 eC_UInt uiKeyCode;
67 eC_UByte ubWidth;
70 };
71
74 {
78 uiNumRows(1)
79 {}
80
81 eC_UInt uiNumRows;
82 eC_TArray<KeyboardKey_t*> pkKeys;
83 };
84
87 {
92 {}
93
94 eC_UInt uiTotalWidth;
96 eC_TArray<KeyboardKey_t*> pkKeys;
97 };
98
101 {
102 PT_UNKNOWN = 0,
103 PT_LOWERCASE,
104 PT_UPPERCASE,
105 PT_NUMBERS,
106 PT_SYMBOLS
107 };
108
111 {
115 eType(PT_UNKNOWN),
116 ubIndex(0)
117 {}
118
120 eC_UByte ubIndex;
121 eC_TArray<KeyboardLine_t*> pkLines;
122 };
123
124public:
128
132
135 void Clear();
136
141 void CalcKeyRects(const eC_Value& vWidth = eC_FromInt(0), const eC_Value& vHeight = eC_FromInt(0));
142
146 eC_UInt GetNumberOfPages() const;
147
152 KeyboardPage_t* GetPage(const eC_UInt& uiIndex);
153
159
165
171 eC_Bool FindPage(const KeyboardPageType_t& ePageType, eC_UByte& ubIndex);
172
175 void AddPage();
176
180 void AddLine(KeyboardPage_t* pkPage);
181
185 void AddKey(KeyboardLine_t* pkLine);
186
191
196 eC_Bool DeletePage(KeyboardPage_t* pkPage);
197
202 eC_Bool DeleteLine(KeyboardLine_t* pkLine);
203
208 eC_Bool DeleteKey(KeyboardKey_t* pkKey);
209
215
216#ifdef GUILIANI_STREAM_GUI
221 virtual void ReadFromStream();
222#endif
223
224#ifdef GUILIANI_WRITE_GUI
230 virtual void WriteToStream(const eC_Bool bWriteClassID = false);
231#endif
232
233private:
234 eC_TArray<KeyboardPage_t*> m_pkPages;
235 eC_Value m_vWidth;
236 eC_Value m_vHeight;
237};
238
239#endif
Layout for an OnScreenKeyboard.
Definition: GUIOnscreenKeyboardLayout.h:13
eC_Bool DeleteLine(KeyboardLine_t *pkLine)
virtual void ReadFromStream()
void AddLine(KeyboardPage_t *pkPage)
eC_Bool DeleteSubKey(KeyboardKey_t *pkKey)
KeyboardKeyType_t
type of key
Definition: GUIOnscreenKeyboardLayout.h:17
virtual void WriteToStream(const eC_Bool bWriteClassID=false)
eC_UInt GetNumberOfPages() const
eC_Bool FindPage(const KeyboardPageType_t &ePageType, eC_UByte &ubIndex)
void AddKey(KeyboardLine_t *pkLine)
KeyboardPageType_t
page-type
Definition: GUIOnscreenKeyboardLayout.h:101
KeyboardPage_t * GetPage(const eC_UInt &uiIndex)
KeyboardPage_t * GetPage(KeyboardLine_t *pkLine)
void CalcKeyRects(const eC_Value &vWidth=eC_FromInt(0), const eC_Value &vHeight=eC_FromInt(0))
eC_Bool DeletePage(KeyboardPage_t *pkPage)
eC_Bool DeleteKey(KeyboardKey_t *pkKey)
void AddSubKey(KeyboardKey_t *pkKey)
KeyboardPage_t * GetPage(KeyboardKey_t *pkKey)
virtual ~CGUIOnscreenKeyboardLayout()
Helper class to supply a platform independent rectangle implementation.
Definition: GUIRect.h:63
struct for a key
Definition: GUIOnscreenKeyboardLayout.h:33
CGUIRect kRect
covering rect
Definition: GUIOnscreenKeyboardLayout.h:68
eC_UInt uiKeyCode
key-code
Definition: GUIOnscreenKeyboardLayout.h:66
KeyboardSubChars_t * pkSubChars
pointer to subchars
Definition: GUIOnscreenKeyboardLayout.h:69
KeyboardKey_t(const KeyboardKeyType_t &Type, const eC_String &Text, const eC_UInt &Code, const eC_UByte &Width, KeyboardSubChars_t *SubChars=NULL)
Definition: GUIOnscreenKeyboardLayout.h:51
KeyboardKeyType_t eType
type of key
Definition: GUIOnscreenKeyboardLayout.h:64
eC_UByte ubWidth
width in units
Definition: GUIOnscreenKeyboardLayout.h:67
KeyboardKey_t()
Definition: GUIOnscreenKeyboardLayout.h:36
eC_String kString
string to display
Definition: GUIOnscreenKeyboardLayout.h:65
keyboard line
Definition: GUIOnscreenKeyboardLayout.h:87
eC_UInt uiTotalWidth
width in units
Definition: GUIOnscreenKeyboardLayout.h:94
CGUIRect kRect
covering rect
Definition: GUIOnscreenKeyboardLayout.h:95
KeyboardLine_t()
Definition: GUIOnscreenKeyboardLayout.h:90
eC_TArray< KeyboardKey_t * > pkKeys
keys
Definition: GUIOnscreenKeyboardLayout.h:96
page-struct
Definition: GUIOnscreenKeyboardLayout.h:111
KeyboardPage_t()
Definition: GUIOnscreenKeyboardLayout.h:114
KeyboardPageType_t eType
type
Definition: GUIOnscreenKeyboardLayout.h:119
eC_UByte ubIndex
index
Definition: GUIOnscreenKeyboardLayout.h:120
eC_TArray< KeyboardLine_t * > pkLines
lines
Definition: GUIOnscreenKeyboardLayout.h:121
sub-chars
Definition: GUIOnscreenKeyboardLayout.h:74
eC_TArray< KeyboardKey_t * > pkKeys
keys
Definition: GUIOnscreenKeyboardLayout.h:82
KeyboardSubChars_t()
Definition: GUIOnscreenKeyboardLayout.h:77
eC_UInt uiNumRows
number of rows
Definition: GUIOnscreenKeyboardLayout.h:81