|
1 /* |
|
2 * Copyright (c) 2005-2008 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 char range selector. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef C_PENINPUTARABICFINGERHWRSYMBOLTABLE_H |
|
20 #define C_PENINPUTARABICFINGERHWRSYMBOLTABLE_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 CMultiPageVirtualKeyboard; |
|
32 class CPeninputSyncBitmapRotator; |
|
33 |
|
34 // CLASS DECLARATION |
|
35 |
|
36 /** |
|
37 * class CPeninputArabicFingerHwrSymbolTable. |
|
38 * |
|
39 * The symbol table control for arabic input |
|
40 * |
|
41 * @lib peninputfingerhwr.lib |
|
42 * @since S60 v5.0 |
|
43 */ |
|
44 class CPeninputArabicFingerHwrSymbolTable : public CControlGroup |
|
45 { |
|
46 public: |
|
47 /** |
|
48 * Symbian constructor |
|
49 * |
|
50 * @since S60 v5.0 |
|
51 * @param aUiLayout The layout |
|
52 * @param aId The control id |
|
53 * @return pointer of created object. |
|
54 */ |
|
55 static CPeninputArabicFingerHwrSymbolTable* NewL( CFepUiLayout* aUiLayout, TInt aId ); |
|
56 |
|
57 /** |
|
58 * Symbian constructor |
|
59 * |
|
60 * @since S60 v5.0 |
|
61 * @param aUiLayout The layout |
|
62 * @param aId The control id |
|
63 * @return pointer of created object. |
|
64 */ |
|
65 static CPeninputArabicFingerHwrSymbolTable* NewLC( CFepUiLayout* aUiLayout, TInt aId ); |
|
66 |
|
67 /** |
|
68 * standard c++ destructor. |
|
69 * |
|
70 * @since S60 v5.0 |
|
71 */ |
|
72 ~CPeninputArabicFingerHwrSymbolTable(); |
|
73 |
|
74 public: |
|
75 /** |
|
76 * open the symbol table. |
|
77 * |
|
78 * @since S60 v5.0 |
|
79 * |
|
80 * @return None |
|
81 */ |
|
82 void OpenSymbolTable(); |
|
83 |
|
84 /** |
|
85 * cancel the popup. |
|
86 * |
|
87 * @since S60 v5.0 |
|
88 * @return None |
|
89 * |
|
90 */ |
|
91 void CloseSymbolTable(); |
|
92 |
|
93 /** |
|
94 * get visibility of popup. |
|
95 * @since S60 v5.0 |
|
96 * @return ETrue if the popup is visible |
|
97 */ |
|
98 TBool IsPopup(); |
|
99 |
|
100 /** |
|
101 * sizechanged |
|
102 * |
|
103 */ |
|
104 void SizeChanged(const TSize aKeypadSize, const TSize aButtonSize, |
|
105 const TInt aKeypadRow, const TInt aKeypadCol, TBool aIsLandscape = ETrue); |
|
106 |
|
107 void LoadVkbKeyImageL(TInt aResId, const TSize& aKeySize); |
|
108 |
|
109 void LoadVirtualKeypadKeyL(const TInt aResId, const RArray<TRect>& aCellRects); |
|
110 |
|
111 inline CMultiPageVirtualKeyboard* KeyPad(){return iMutiPageKeypad;} |
|
112 |
|
113 void NavigatePage(TInt aPageNo, TInt aPos); |
|
114 |
|
115 void UpdatePageButtonsUi(); |
|
116 |
|
117 void UpdateAllVirtualKeysFeedback(TInt aType); |
|
118 |
|
119 protected: //virtuals from CControlGroup (CFepUiBaseCtrl) |
|
120 |
|
121 /** |
|
122 * From CControlGroup |
|
123 * Handle pointer down event |
|
124 * |
|
125 * @since S60 V5.0 |
|
126 * @param aPoint The point position relative the layout |
|
127 * @return The control which handles the event. |
|
128 */ |
|
129 CFepUiBaseCtrl* HandlePointerDownEventL(const TPoint& aPoint); |
|
130 |
|
131 /** |
|
132 * From CControlGroup |
|
133 * Handle pointer up event |
|
134 * |
|
135 * @since S60 V5.0 |
|
136 * @param aPoint The point position relative the layout |
|
137 * @return The control which handles the event. |
|
138 */ |
|
139 CFepUiBaseCtrl* HandlePointerUpEventL(const TPoint& aPoint); |
|
140 |
|
141 /** |
|
142 * From CControlGroup |
|
143 * Handle pointer move event |
|
144 * |
|
145 * @since S60 54.0 |
|
146 * @param aPoint The point position relative the layout |
|
147 * @return The control which handles the event. |
|
148 */ |
|
149 CFepUiBaseCtrl* HandlePointerMoveEventL(const TPoint& aPoint); |
|
150 |
|
151 /** |
|
152 * Handle pointer levae event. |
|
153 * This will be called only when it's got pointer down event before and |
|
154 * now pointer leaves without pointer up event |
|
155 * |
|
156 * @since S60 V4.0 |
|
157 * @param aPoint current pointer position |
|
158 */ |
|
159 void HandlePointerLeave(const TPoint& aPoint); |
|
160 |
|
161 /** |
|
162 * C++ constructor |
|
163 * |
|
164 * @since S60 v5.0 |
|
165 * @param aFepUiLayout A Ui Layout environment (CFepUiLayout) |
|
166 * @param aControlId Control id |
|
167 * @return none. |
|
168 */ |
|
169 CPeninputArabicFingerHwrSymbolTable(CFepUiLayout* aFepUiLayout, TInt aControlId); |
|
170 |
|
171 /** |
|
172 * Symbian second-phase constructor |
|
173 * |
|
174 * @since S60 v5.0 |
|
175 * @return None |
|
176 */ |
|
177 void ConstructL(); |
|
178 |
|
179 /** |
|
180 * create a multipate virtual keypad |
|
181 * |
|
182 * @since S60 v5.0 |
|
183 * @return None |
|
184 */ |
|
185 void CreateVirtualKeypadL(); |
|
186 |
|
187 /** |
|
188 * create the button control |
|
189 * |
|
190 */ |
|
191 void CreateButtonGroupL(); |
|
192 |
|
193 /** |
|
194 * EventButton creation helper. |
|
195 * |
|
196 * @since S60 v5.0 |
|
197 * @param aCtrlId button control id. |
|
198 * @param aResId resource id. |
|
199 * @param aEvent event id; |
|
200 * @param aUnicode a unicode value to be sent |
|
201 * @return pointer to created CAknFepCtrlEventButton obj. |
|
202 */ |
|
203 CAknFepCtrlEventButton* CreateEventBtnL( TInt aCtrlId, TInt32 aResId, |
|
204 TInt aEvent = 0xFFFF,TInt aUnicode=0 ); |
|
205 |
|
206 /** |
|
207 * EventButton layout helper. Move button to specified rect. |
|
208 * |
|
209 * @since S60 v5.0 |
|
210 * @param aButton the button to move |
|
211 * @param aRect new rect of button |
|
212 * @param aXPadding horz padding of button icon. |
|
213 * @param aYPadding vert padding of button icon. |
|
214 * @param aReloadImages Specifies whether the images is to be reloaded. |
|
215 * @return None |
|
216 */ |
|
217 void MoveIconButton( CAknFepCtrlEventButton* aButton, const TRect& aRect, |
|
218 TInt aXPadding=0, TInt aYPadding=0, TBool aReloadImages=ETrue ); |
|
219 |
|
220 /** |
|
221 * create a new virtual key |
|
222 * |
|
223 */ |
|
224 CVirtualKey* CreateVkbKeyL(TResourceReader& aReader, const TRect aKeyRect); |
|
225 |
|
226 /** |
|
227 * update the virtal key |
|
228 * |
|
229 */ |
|
230 void UpdateVkbKeyL( CVirtualKey* aVirtualKey, TResourceReader& aReader, |
|
231 const TRect aKeyRect ); |
|
232 void OnActivate(); |
|
233 private: |
|
234 /** |
|
235 * multipage viritual keyboard |
|
236 * not own. |
|
237 */ |
|
238 CMultiPageVirtualKeyboard* iMutiPageKeypad; |
|
239 |
|
240 /** |
|
241 * Enter button. |
|
242 * not own. |
|
243 */ |
|
244 CAknFepCtrlEventButton* iEnterBtn; |
|
245 |
|
246 /** |
|
247 * space button. |
|
248 * not own. |
|
249 */ |
|
250 CAknFepCtrlEventButton* iSpaceBtn; |
|
251 |
|
252 /** |
|
253 * Sct page 0 selction button control. |
|
254 * Not own. |
|
255 */ |
|
256 CAknFepCtrlEventButton* i3Page1Btn; |
|
257 |
|
258 /** |
|
259 * Sct page 1 selction button control. |
|
260 * Not own. |
|
261 */ |
|
262 CAknFepCtrlEventButton* i3Page2Btn; |
|
263 |
|
264 /** |
|
265 * Sct page 2 selction button control. |
|
266 * Not own. |
|
267 */ |
|
268 CAknFepCtrlEventButton* i3Page3Btn; |
|
269 |
|
270 /** |
|
271 * Sct page 0 selction button control. |
|
272 * Not own. |
|
273 */ |
|
274 CAknFepCtrlEventButton* i2Page1Btn; |
|
275 |
|
276 /** |
|
277 * Sct page 1 selction button control. |
|
278 * Not own. |
|
279 */ |
|
280 CAknFepCtrlEventButton* i2Page2Btn; |
|
281 |
|
282 /** |
|
283 * visibility of popup list. |
|
284 */ |
|
285 TBool iPopupVisible; |
|
286 |
|
287 /** |
|
288 * store the layout mode |
|
289 */ |
|
290 TBool iIsLandscape; |
|
291 |
|
292 /** |
|
293 * remember the pointer down contrl |
|
294 */ |
|
295 CFepUiBaseCtrl* iPenDownCtrl; |
|
296 |
|
297 /** |
|
298 * check if the the pointer is moved out |
|
299 */ |
|
300 TBool iPointerMoveBack; |
|
301 }; |
|
302 |
|
303 #endif // C_PENINPUTARABICFINGERHWRSYMBOLTABLE_H |