|
1 /* |
|
2 * Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: header of number mode symbol table. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef C_PENINPUTARABICFINGERHWRNUMSYMBOLTABLE_H |
|
20 #define C_PENINPUTARABICFINGERHWRNUMSYMBOLTABLE_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32std.h> |
|
24 #include <e32base.h> |
|
25 #include <e32cmn.h> |
|
26 |
|
27 #include <peninputlayoutctrlgroup.h> |
|
28 |
|
29 // FORWARD DECLARATIONS |
|
30 class CAknFepCtrlEventButton; |
|
31 class CVirtualKeyboard; |
|
32 |
|
33 // CLASS DECLARATION |
|
34 |
|
35 /** |
|
36 * class CPeninputArabicFingerHwrNumSymbolTable. |
|
37 * |
|
38 * The symbol table control for arabic input |
|
39 * |
|
40 * @lib peninputfingerhwrar.lib |
|
41 * @since Symbian TB9.2 |
|
42 */ |
|
43 class CPeninputArabicFingerHwrNumSymbolTable : public CControlGroup |
|
44 { |
|
45 public: |
|
46 /** |
|
47 * Symbian constructor |
|
48 * |
|
49 * @since Symbian TB9.2 |
|
50 * @param aUiLayout The layout |
|
51 * @param aId The control id |
|
52 * @return pointer of created object. |
|
53 */ |
|
54 static CPeninputArabicFingerHwrNumSymbolTable* NewL( CFepUiLayout* aUiLayout, TInt aId ); |
|
55 |
|
56 /** |
|
57 * Symbian constructor |
|
58 * |
|
59 * @since Symbian TB9.2 |
|
60 * @param aUiLayout The layout |
|
61 * @param aId The control id |
|
62 * @return pointer of created object. |
|
63 */ |
|
64 static CPeninputArabicFingerHwrNumSymbolTable* NewLC( CFepUiLayout* aUiLayout, TInt aId ); |
|
65 |
|
66 /** |
|
67 * standard c++ destructor. |
|
68 * |
|
69 * @since Symbian TB9.2 |
|
70 */ |
|
71 ~CPeninputArabicFingerHwrNumSymbolTable(); |
|
72 |
|
73 public: |
|
74 /** |
|
75 * open the symbol table. |
|
76 * |
|
77 * @since Symbian TB9.2 |
|
78 * |
|
79 * @return None |
|
80 */ |
|
81 void OpenSymbolTable(); |
|
82 |
|
83 /** |
|
84 * cancel the popup. |
|
85 * |
|
86 * @since Symbian TB9.2 |
|
87 * @return None |
|
88 * |
|
89 */ |
|
90 void CloseSymbolTable(); |
|
91 |
|
92 /** |
|
93 * get visibility of popup. |
|
94 * @since Symbian TB9.2 |
|
95 * @return ETrue if the popup is visible |
|
96 */ |
|
97 TBool IsPopup(); |
|
98 |
|
99 /** |
|
100 * sizechanged |
|
101 * |
|
102 */ |
|
103 void SizeChanged(const TRect aVirtualKeypadRect, const RArray<TRect> aBtnRects, |
|
104 const TInt aKeypadRow, const TInt aKeypadCol, TBool aIsLandscape = ETrue); |
|
105 |
|
106 /** |
|
107 * Load VKB image |
|
108 * |
|
109 */ |
|
110 void LoadVkbKeyImageL(TInt aResId, const TSize& aKeySize); |
|
111 |
|
112 /** |
|
113 * Load virutal Key and set key rects. |
|
114 * |
|
115 */ |
|
116 void LoadVirtualKeypadKeyL(const TInt aResId, const RArray<TRect>& aCellRects); |
|
117 |
|
118 /** |
|
119 * Return keypad control |
|
120 * |
|
121 */ |
|
122 inline CVirtualKeyboard* KeyPad(){return iNumKeypad;} |
|
123 |
|
124 /** |
|
125 * Navigate page |
|
126 * |
|
127 */ |
|
128 void UpdateNumSymbolTable(TInt aNumSctType = ENumSCTLatin); |
|
129 |
|
130 /** |
|
131 * Construct from resource |
|
132 * This funciton will be called when the resource has changed for example skin was changed |
|
133 */ |
|
134 void ConstructFromResourceL(); |
|
135 |
|
136 /** |
|
137 * accept editor's number mapping restriction. |
|
138 * |
|
139 * @since S60 v5.0 |
|
140 * @param aNumMapping a string contains numbers and related char. max length is 16. |
|
141 * @return none |
|
142 */ |
|
143 void SetNumericMapping( const TDesC& aNumMapping ); |
|
144 |
|
145 /* |
|
146 * set arabic number mode. |
|
147 * @since s60 v5.2 |
|
148 * @param aIsNativeNumMode a flag to indicate whether it is native number mode. |
|
149 * @return none. |
|
150 */ |
|
151 void SetNativeNumMode(const TBool aIsNativeNumMode); |
|
152 protected: //virtuals from CControlGroup (CFepUiBaseCtrl) |
|
153 |
|
154 /** |
|
155 * From CControlGroup |
|
156 * Handle pointer down event |
|
157 * |
|
158 * @since Symbian TB9.2 |
|
159 * @param aPoint The point position relative the layout |
|
160 * @return The control which handles the event. |
|
161 */ |
|
162 CFepUiBaseCtrl* HandlePointerDownEventL(const TPoint& aPoint); |
|
163 |
|
164 /** |
|
165 * From CControlGroup |
|
166 * Handle pointer up event |
|
167 * |
|
168 * @since Symbian TB9.2 |
|
169 * @param aPoint The point position relative the layout |
|
170 * @return The control which handles the event. |
|
171 */ |
|
172 CFepUiBaseCtrl* HandlePointerUpEventL(const TPoint& aPoint); |
|
173 |
|
174 /** |
|
175 * From CControlGroup |
|
176 * Handle pointer move event |
|
177 * |
|
178 * @since S60 54.0 |
|
179 * @param aPoint The point position relative the layout |
|
180 * @return The control which handles the event. |
|
181 */ |
|
182 CFepUiBaseCtrl* HandlePointerMoveEventL(const TPoint& aPoint); |
|
183 |
|
184 /** |
|
185 * C++ constructor |
|
186 * |
|
187 * @since Symbian TB9.2 |
|
188 * @param aFepUiLayout A Ui Layout environment (CFepUiLayout) |
|
189 * @param aControlId Control id |
|
190 * @return none. |
|
191 */ |
|
192 CPeninputArabicFingerHwrNumSymbolTable(CFepUiLayout* aFepUiLayout, TInt aControlId); |
|
193 |
|
194 /** |
|
195 * Symbian second-phase constructor |
|
196 * |
|
197 * @since Symbian TB9.2 |
|
198 * @return None |
|
199 */ |
|
200 void ConstructL(); |
|
201 |
|
202 /** |
|
203 * create a virtual keypad |
|
204 * |
|
205 * @since Symbian TB9.2 |
|
206 * @return None |
|
207 */ |
|
208 void CreateVirtualKeypadL(); |
|
209 |
|
210 /** |
|
211 * create a new virtual key |
|
212 * |
|
213 */ |
|
214 CVirtualKey* CreateVkbKeyL(TResourceReader& aReader, const TRect aKeyRect); |
|
215 |
|
216 /** |
|
217 * update the virtal key |
|
218 * |
|
219 */ |
|
220 void UpdateVkbKeyL( CVirtualKey* aVirtualKey, TResourceReader& aReader, |
|
221 const TRect aKeyRect ); |
|
222 void OnActivate(); |
|
223 |
|
224 /** |
|
225 * Update the virtual key feedback |
|
226 * |
|
227 */ |
|
228 void UpdateAllVirtualKeysFeedback(); |
|
229 |
|
230 /** |
|
231 * Draw group control |
|
232 */ |
|
233 void Draw(); |
|
234 |
|
235 /** |
|
236 * Load background from resource |
|
237 * |
|
238 */ |
|
239 void LoadBackgroundFromResourceL(const TInt aResId); |
|
240 |
|
241 /* |
|
242 * map latin number to arabic number. |
|
243 */ |
|
244 TInt16 MapLatinNumAccordingToNumMode(TInt16 aUnicode); |
|
245 private: |
|
246 /** |
|
247 * multipage viritual keyboard |
|
248 * not own. |
|
249 */ |
|
250 CVirtualKeyboard* iNumKeypad; |
|
251 |
|
252 /** |
|
253 * visibility of popup list. |
|
254 */ |
|
255 TBool iPopupVisible; |
|
256 |
|
257 /** |
|
258 * store the layout mode |
|
259 */ |
|
260 TBool iIsLandscape; |
|
261 |
|
262 TInt iCurrentNumSCTType; |
|
263 /* |
|
264 * Default number mode. |
|
265 */ |
|
266 TBool iIsNativeNumMode; |
|
267 }; |
|
268 |
|
269 #endif // C_PENINPUTARABICFINGERHWRNUMSYMBOLTABLE_H |