author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Wed, 15 Sep 2010 12:34:44 +0300 | |
branch | RCL_3 |
changeset 50 | 5a1685599b76 |
parent 44 | ecbabf52600f |
child 56 | 8152b1f1763a |
permissions | -rw-r--r-- |
44 | 1 |
/* |
2 |
* Copyright (c) 2002-2005 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: peninput generic vkb window layout class |
|
15 |
* |
|
16 |
*/ |
|
17 |
||
18 |
||
19 |
#ifndef C_PENINPUTGENERICVKBWINDOW_H |
|
20 |
#define C_PENINPUTGENERICVKBWINDOW_H |
|
21 |
||
22 |
// System includes |
|
23 |
#include <peninputlayoutwindowext.h> |
|
24 |
#include <peninputuistatemgrinterface.h> |
|
25 |
#include <AknLayoutDef.h> |
|
26 |
||
27 |
// Forward declarations |
|
28 |
class CAknFepCtrlRangeBar; |
|
29 |
class CAknFepCtrlEventButton; |
|
30 |
class CAknFepCtrlDragButton; |
|
31 |
class CAknFepCtrlRepeatButton; |
|
32 |
class CPeninputCommonChoiceList; |
|
33 |
class CPeninputLayoutInputmodelChoice; |
|
34 |
class CPeninputGenericVkbLafMgr; |
|
35 |
class CPeninputSyncBitmapRotator; |
|
36 |
class CRepository; |
|
37 |
class CFepLayoutScrollableList; |
|
38 |
// Constants |
|
39 |
const TInt KMaxFileLength = 80; |
|
40 |
||
41 |
const TInt KMaxRangeLabelLength = 100; |
|
42 |
||
43 |
/** |
|
44 |
* class TAllRangeLabels |
|
45 |
*/ |
|
46 |
class TAllRangeLabels |
|
47 |
{ |
|
48 |
public: |
|
49 |
TBuf<KMaxRangeLabelLength> iLabelNativeChar; |
|
50 |
TBuf<KMaxRangeLabelLength> iLabelNativeNumber; |
|
51 |
TBuf<KMaxRangeLabelLength> iLabelLatinChar; |
|
52 |
TBuf<KMaxRangeLabelLength> iLabelLatinNumber; |
|
53 |
TBuf<KMaxRangeLabelLength> iLabelSymbol; |
|
54 |
TBuf<KMaxRangeLabelLength> iLabelAccent; |
|
55 |
}; |
|
56 |
/** |
|
57 |
* Vkb layout window class |
|
58 |
* This class define methods to deal with window layout and |
|
59 |
* handle events sent to this window |
|
60 |
* |
|
61 |
* @lib peninputgenericvkb.lib |
|
62 |
* @since S60 v3.2 |
|
63 |
*/ |
|
64 |
class CPeninputGenericVkbWindow : public CPeninputLayoutWindowExt |
|
65 |
{ |
|
66 |
private: |
|
67 |
enum TIndicatorAlign |
|
68 |
{ |
|
69 |
EIndiAlignLeft, |
|
70 |
EIndiAlignCenter, |
|
71 |
EIndiAlignRight |
|
72 |
}; |
|
73 |
public: |
|
74 |
||
75 |
/** |
|
76 |
* Two-phased constructor |
|
77 |
* |
|
78 |
* @since S60 v3.2 |
|
79 |
* @param aUiLayout The plugin ui layout |
|
80 |
* @param aLayoutContext The vkb layout context |
|
81 |
* @return The pointer to CPeninputGenericVkbWindow object |
|
82 |
*/ |
|
83 |
static CPeninputGenericVkbWindow* NewL( CFepUiLayout* aUiLayout, |
|
84 |
MPeninputLayoutContext* aLayoutContext, MPeninputUiStateMgr* aUiStateMgr ); |
|
85 |
||
86 |
/** |
|
87 |
* Destructor |
|
88 |
* |
|
89 |
* @since S60 v3.2 |
|
90 |
* @return None |
|
91 |
*/ |
|
92 |
virtual ~CPeninputGenericVkbWindow(); |
|
93 |
||
94 |
/** |
|
95 |
* Do when case changed |
|
96 |
* |
|
97 |
* @since S60 v3.2 |
|
98 |
* @param aNewCase The new case |
|
99 |
* @return None |
|
100 |
*/ |
|
101 |
void DoCaseChange( TInt aNewCase ); |
|
102 |
||
103 |
// From base class CPeninputLayoutWindow |
|
104 |
||
105 |
/** |
|
106 |
* From CPeninputLayoutWindow |
|
107 |
* Handle control event |
|
108 |
* |
|
109 |
* @since S60 v3.2 |
|
110 |
* @param aEventType The event type |
|
111 |
* @param aCtrl The control who sends the event |
|
112 |
* @param aEventData The event data |
|
113 |
* @return None |
|
114 |
*/ |
|
115 |
void HandleControlEvent( TInt aEventType, |
|
116 |
CFepUiBaseCtrl* aCtrl, |
|
117 |
const TDesC& aEventData ); |
|
118 |
||
119 |
/** |
|
120 |
* From CPeninputLayoutWindow |
|
121 |
* Get id of window config resource |
|
122 |
* |
|
123 |
* @since S60 v3.2 |
|
124 |
* @return The id of window config resource |
|
125 |
*/ |
|
126 |
TInt GetWindowConfigResId(); |
|
127 |
||
128 |
/** |
|
129 |
* From CPeninputLayoutWindow |
|
130 |
* Get id of window resource |
|
131 |
* |
|
132 |
* @since S60 v3.2 |
|
133 |
* @return The id of window resource |
|
134 |
*/ |
|
135 |
TInt GetWindowResId(); |
|
136 |
||
137 |
/** |
|
138 |
* From CPeninputLayoutWindowExt |
|
139 |
* Get resource id of numeric keymapping |
|
140 |
* |
|
141 |
* @since S60 v3.2 |
|
142 |
* @return The id of window resource |
|
143 |
*/ |
|
144 |
TInt GetNumKeymappingResId(); |
|
145 |
||
146 |
/** |
|
147 |
* From CPeninputLayoutWindow |
|
148 |
* Get file name of window config resource |
|
149 |
* |
|
150 |
* @since S60 v3.2 |
|
151 |
* @param aLangID The id of language |
|
152 |
* @return The file name of window config resource |
|
153 |
*/ |
|
154 |
const TDesC& GetWindowConfigResFileName( TInt aLangID ); |
|
155 |
||
156 |
/** |
|
157 |
* From CPeninputLayoutWindow |
|
158 |
* Get file name of window resource |
|
159 |
* |
|
160 |
* @since S60 v3.2 |
|
161 |
* @return The file name of window resource |
|
162 |
*/ |
|
163 |
const TDesC& GetWindowResFileName(); |
|
164 |
||
165 |
/** |
|
166 |
* From CPeninputLayoutWindow |
|
167 |
* Re-organize all controls in the assigned client area layout |
|
168 |
* |
|
169 |
* @since S60 v3.2 |
|
170 |
* @param aClientLayoutId The id of client area layout |
|
171 |
* @return None |
|
172 |
*/ |
|
173 |
void ReorganizeControls( TInt aClientLayoutId, TBool aNeedReset ); |
|
174 |
||
175 |
/** |
|
176 |
* From CPeninputLayoutWindow |
|
177 |
* Change unit size |
|
178 |
* |
|
179 |
* @since S60 v3.2 |
|
180 |
* @return The window rect |
|
181 |
*/ |
|
182 |
const TRect ChangeUnitSize(); |
|
183 |
||
184 |
/** |
|
185 |
* From CPeninputLayoutWindow |
|
186 |
* Change size of client area |
|
187 |
* |
|
188 |
* @since S60 v3.2 |
|
189 |
* @return None |
|
190 |
*/ |
|
191 |
void ChangeClientSize(); |
|
192 |
||
193 |
/** |
|
194 |
* From CPeninputLayoutWindow |
|
195 |
* Construct all controls specified in resource |
|
196 |
* |
|
197 |
* @since S60 v3.2 |
|
198 |
* @return None |
|
199 |
*/ |
|
200 |
void CreateAllControlsL(); |
|
201 |
||
202 |
/** |
|
203 |
* From CPeninputLayoutWindow |
|
204 |
* Set control fonts. Fonts info comes from resource |
|
205 |
* |
|
206 |
* @since S60 v3.2 |
|
207 |
* @return None |
|
208 |
*/ |
|
209 |
void SetControlsFont(); |
|
210 |
||
211 |
/** |
|
212 |
* From CPeninputLayoutWindow |
|
213 |
* Pop up choice list |
|
214 |
* |
|
215 |
* @since S60 v3.2 |
|
216 |
* @return None |
|
217 |
*/ |
|
218 |
void PopupChoiceList(); |
|
219 |
||
220 |
/** |
|
221 |
* ConstructFromResourceL load settings from resource. |
|
222 |
* Before calling this function, the resource id should be set |
|
223 |
* |
|
224 |
* @since S60 v3.2 |
|
225 |
* @return None |
|
226 |
*/ |
|
227 |
void ConstructFromResourceL(); |
|
228 |
||
229 |
static TInt BackgroundTaskL(TAny* aPtr); |
|
230 |
||
231 |
/** |
|
232 |
* config unit size, reason may due to client layout id changed, |
|
233 |
* Set current language |
|
234 |
* |
|
235 |
* @since S60 v3.2 |
|
236 |
* @param aLang Current language |
|
237 |
* @return None |
|
238 |
*/ |
|
239 |
void SetSwitchlistLanguage(TInt aLang); |
|
240 |
||
241 |
/** |
|
242 |
* Current editor is secret |
|
243 |
* |
|
244 |
* @since S60 v3.2 |
|
245 |
* @param aSecret Editor is secret |
|
246 |
* @return None |
|
247 |
*/ |
|
248 |
void SetSwitchlistSecretFlag(TBool aSecret); |
|
249 |
||
250 |
/** |
|
251 |
* Dim the arrow keys on FSQ when the editor |
|
252 |
* is findpane or secret editor |
|
253 |
* |
|
254 |
* @since S60 v3.2 |
|
255 |
* @param aSecret Editor is secret |
|
256 |
* @return None |
|
257 |
*/ |
|
258 |
void DimArrowKeys( TBool aDimArrow ); |
|
259 |
||
260 |
void DimEnterKey( TBool aDimmed ); |
|
261 |
||
262 |
/** |
|
263 |
* Pop up switcher windows |
|
264 |
* |
|
265 |
* @since S60 v3.2 |
|
266 |
* @param aSecret Editor is secret |
|
267 |
* @return None |
|
268 |
*/ |
|
269 |
void PopupSwitchWindowL(); |
|
270 |
||
271 |
/** |
|
272 |
* Handle accented char event |
|
273 |
* |
|
274 |
* @since S60 v3.2 |
|
275 |
* @param aEventType The event type |
|
276 |
* @param aEventData The event data |
|
277 |
* @param aDeadKey The DeadKey char buffer |
|
278 |
* @param anewCharBuf The new Accented buffer |
|
279 |
* @return None |
|
280 |
*/ |
|
281 |
TBool HandleAccentCharEvent(TInt aEventType, |
|
282 |
const TDesC& aEventData, |
|
283 |
const TDesC& aDeadKey, |
|
284 |
HBufC* anewCharBuf ); |
|
285 |
||
286 |
/** |
|
287 |
* Handle virtual key latched event |
|
288 |
* |
|
289 |
* @since S60 v3.2 |
|
290 |
* @param aEventType The event type |
|
291 |
* @param aCtrl The controler |
|
292 |
* @param aEventData Event data |
|
293 |
* @return None |
|
294 |
*/ |
|
295 |
void HandleVirtualKeyLatchedEvent(TInt aEventType, |
|
296 |
CFepUiBaseCtrl* aCtrl, |
|
297 |
const TDesC& aEventData ); |
|
298 |
||
299 |
||
300 |
/** |
|
301 |
* handle virtual key up event |
|
302 |
* |
|
303 |
* @since S60 v3.2 |
|
304 |
* @param aEventType The event type |
|
305 |
* @param aCtrl The controler |
|
306 |
* @param aEventData Event data |
|
307 |
* @return None |
|
308 |
*/ |
|
309 |
TBool HandleVirtualKeyUpEvent(TInt aEventType, |
|
310 |
CFepUiBaseCtrl* aCtrl, |
|
311 |
const TDesC& aEventData ); |
|
50
5a1685599b76
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
44
diff
changeset
|
312 |
|
5a1685599b76
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
44
diff
changeset
|
313 |
/** |
5a1685599b76
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
44
diff
changeset
|
314 |
* Handle virtual key down event |
5a1685599b76
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
44
diff
changeset
|
315 |
* |
5a1685599b76
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
44
diff
changeset
|
316 |
* @since S60 v5.0 |
5a1685599b76
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
44
diff
changeset
|
317 |
* @param None |
5a1685599b76
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
44
diff
changeset
|
318 |
* @return None |
5a1685599b76
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
44
diff
changeset
|
319 |
*/ |
5a1685599b76
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
44
diff
changeset
|
320 |
void HandleVirtualKeyDownEvent(); |
5a1685599b76
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
44
diff
changeset
|
321 |
|
44 | 322 |
virtual void SetLafLayOut(TInt aRows, TInt aColumns); |
323 |
/* |
|
324 |
* |
|
325 |
* @since S60 v3.2 |
|
326 |
* @return None |
|
327 |
*/ |
|
328 |
void SetDeadKey(); |
|
329 |
void ChangeInputModeL(); |
|
330 |
||
331 |
/** |
|
332 |
* Unlatch a DeadKey by the key buffer |
|
333 |
* |
|
334 |
* @since S60 v3.2 |
|
335 |
* @param abuf The key buffer which will be unlatched |
|
336 |
* @return None |
|
337 |
*/ |
|
338 |
void UnLatchDeadKey( const TDesC& abuf = KNullDesC ); |
|
339 |
||
340 |
void SetPromptTextL(TUint8* aData); |
|
341 |
||
342 |
void UpdateLafData(); |
|
343 |
||
344 |
void ConstructAccentListL(TInt aLang); |
|
345 |
||
346 |
void ShowBubble(TInt aShow); |
|
347 |
||
348 |
/** |
|
349 |
* Show tooltip of ICF |
|
350 |
* |
|
351 |
* @param aText The text to be displayed in ICF |
|
352 |
* @return None |
|
353 |
*/ |
|
354 |
void ShowTooltipL( const TDesC& aText, TInt aLangCode = ELangTest ); |
|
355 |
||
356 |
/** |
|
357 |
* Hide tooltip of ICF |
|
358 |
* |
|
359 |
* @return None |
|
360 |
*/ |
|
361 |
void HideTooltip(); |
|
362 |
||
363 |
/** |
|
364 |
* Hide candidate list |
|
365 |
* |
|
366 |
* @return None |
|
367 |
*/ |
|
368 |
void HideCandidateList(); |
|
369 |
||
370 |
/** |
|
371 |
* Show candidate list |
|
372 |
* |
|
373 |
* @param aItemArray, the contents to be shown |
|
374 |
* @param aActiveIndex, the default index |
|
375 |
* @return None |
|
376 |
*/ |
|
377 |
void ShowCandidateListL( TInt aAlign, const CDesCArray* aItemArray, |
|
378 |
TInt aActiveIndex ); |
|
379 |
||
380 |
/** |
|
381 |
* Handle candidate list selected events |
|
382 |
* |
|
383 |
* @param aCtrl, pointer of the candidate list on which events occur. |
|
384 |
* @param, aEventData event data |
|
385 |
* @return None |
|
386 |
*/ |
|
387 |
void HandleCandidateListSelectedL( CFepUiBaseCtrl* aCtrl, const TDesC& aEventData ); |
|
388 |
||
389 |
/* |
|
390 |
* Load range labels for range list |
|
391 |
* |
|
392 |
* @since S60 v5.0 |
|
393 |
* @param aLangId current language id |
|
394 |
* @return None |
|
395 |
*/ |
|
396 |
void ConstructRangeLabelListL( TInt aLangId ); |
|
397 |
||
398 |
/** |
|
399 |
* Update state of range button |
|
400 |
* |
|
401 |
* @since S60 v5.0 |
|
402 |
* @return None |
|
403 |
*/ |
|
404 |
void UpdateRangeCtrlsL(); |
|
405 |
||
406 |
void ConstructFSQAccentListL( TInt aLangId ); |
|
407 |
||
408 |
void SetIndiBubbleImageL( const TInt aImgID1, |
|
409 |
const TInt aMaskID1, |
|
410 |
const TInt aImgID2, |
|
411 |
const TInt aMaskID2 ); |
|
412 |
||
413 |
void IndiBubbleWithText(); |
|
414 |
||
415 |
void IndiBubbleWithoutText(); |
|
416 |
||
417 |
void SetIndiWithTextFlag( TBool aFlag ); |
|
418 |
||
419 |
void UpdateIndiBubbleL( TUint8* aData ); |
|
420 |
||
421 |
inline TFepIndicatorInfo IndicatorData(); |
|
422 |
||
423 |
inline void SetIndicatorData( const TFepIndicatorInfo& aIndicatorData ); |
|
424 |
protected: |
|
425 |
||
426 |
/** |
|
427 |
* Constructor |
|
428 |
* |
|
429 |
* @since S60 v3.2 |
|
430 |
* @param aUiLayout The plugin ui layout |
|
431 |
* @param aLayoutContext The vkb layout context |
|
432 |
* @return None |
|
433 |
*/ |
|
434 |
CPeninputGenericVkbWindow( CFepUiLayout* aUiLayout, |
|
435 |
MPeninputLayoutContext* aLayoutContext, |
|
436 |
MPeninputUiStateMgr* aUiStateMgr ); |
|
437 |
void ConstructL(); |
|
438 |
||
439 |
virtual TBool CreateCustomControlL( TInt16 aControlId, TInt32 aImageId ); |
|
440 |
virtual void AddCustomControlGroupL(CFepUiBaseCtrl* aCtrl); |
|
441 |
||
442 |
private: |
|
443 |
||
444 |
/** |
|
445 |
* Show range list |
|
446 |
* |
|
447 |
* @since S60 v5.0 |
|
448 |
* @return None |
|
449 |
*/ |
|
450 |
void PopupRangeListL(); |
|
451 |
||
452 |
/** |
|
453 |
* Prepare range list items |
|
454 |
* |
|
455 |
* @since S60 v5.0 |
|
456 |
* @param aRangeItems items in range list |
|
457 |
* @return None |
|
458 |
*/ |
|
459 |
void PrepareRangeListItems( RArray<CFepLayoutChoiceList::SItem>& |
|
460 |
aRangeItems ); |
|
461 |
||
462 |
/** |
|
463 |
* Utils to get context value |
|
464 |
* |
|
465 |
* @since S60 v5.0 |
|
466 |
* @param aDataIndex index of context value |
|
467 |
* @return conext value |
|
468 |
*/ |
|
469 |
TInt IntContext( TPeninputDataType aDataIndex ); |
|
470 |
||
471 |
void CalIndicatorRect(const TRect& aBoundRect, |
|
472 |
TRect& aRealRect1, |
|
473 |
TRect& aRealRect2, |
|
474 |
TIndicatorAlign aAlign); |
|
475 |
||
476 |
/** |
|
477 |
* Handle range list event |
|
478 |
* |
|
479 |
* @since S60 v5.0 |
|
480 |
* @return None |
|
481 |
*/ |
|
482 |
void HandleRangeListSelectedL( CFepUiBaseCtrl* aCtrl, |
|
483 |
const TDesC& aData ); |
|
484 |
||
485 |
/** |
|
486 |
* Get resource ids of range button icon |
|
487 |
* |
|
488 |
* @since S60 v5.0 |
|
489 |
* @param aLangId current language id |
|
490 |
* @param aAlphaRange variable to receive icon resource id for alpha range |
|
491 |
* @param aOtherRange variable to receive icon resource id for other ranges |
|
492 |
* @return None |
|
493 |
*/ |
|
494 |
void GetRangeIconResource( TInt aLangId, TInt& aAlphaRange, |
|
495 |
TInt& aOtherRange ); |
|
496 |
||
497 |
/** |
|
498 |
* Add range bar into client area |
|
499 |
* |
|
500 |
* @since S60 v3.2 |
|
501 |
* @return None |
|
502 |
*/ |
|
503 |
void AddRangeBarL(); |
|
504 |
||
505 |
/** |
|
506 |
* Add button to client area |
|
507 |
* |
|
508 |
* @since S60 v3.2 |
|
509 |
* @param aControlId The control id |
|
510 |
* @param aEventId The control's event id |
|
511 |
* @param aResId The control's resource id |
|
512 |
* @param aUnicode The control's unicode |
|
513 |
* @param aIsRepeat The TBool indicating whether the |
|
514 |
* control is repeated or not |
|
515 |
* @return The pointer to CAknFepCtrlEventButton object |
|
516 |
*/ |
|
517 |
CAknFepCtrlEventButton* AddButtonL( const TInt aControlId, |
|
518 |
const TInt aEventId, |
|
519 |
const TInt aResId, |
|
520 |
const TInt aUnicode = 0, |
|
521 |
const TBool aIsRepeat = EFalse ); |
|
522 |
||
523 |
/** |
|
524 |
* Add popup window to display accented char list |
|
525 |
* |
|
526 |
* @since S60 v3.2 |
|
527 |
* @return None |
|
528 |
*/ |
|
529 |
void AddPopupWindowL(); |
|
530 |
||
531 |
/** |
|
532 |
* Reset accent button |
|
533 |
* |
|
534 |
* @since S60 v3.2 |
|
535 |
* @return None |
|
536 |
*/ |
|
537 |
void ResetAccentButton(); |
|
538 |
||
539 |
/** |
|
540 |
* Handle size changed for accented chars popup window |
|
541 |
* |
|
542 |
* @since S60 v3.2 |
|
543 |
* @return None |
|
544 |
*/ |
|
545 |
void PopupWindowSizeChange(); |
|
546 |
||
547 |
/** |
|
548 |
* get resource info of accented chars popup window |
|
549 |
* |
|
550 |
* @since S60 v3.2 |
|
551 |
* @return None |
|
552 |
*/ |
|
553 |
void GetPopupWndInfoFromResL( TResourceReader reader, const TRect& aRect ); |
|
554 |
void DoIdleConstructL(); |
|
555 |
||
556 |
void SetVkbLayoutSize(); |
|
557 |
||
558 |
void SimulateRawEvent(TInt aScanCode, TRawEvent::TType aType); |
|
559 |
||
560 |
void SetRangeBarSizeL(TInt x, TInt y); |
|
561 |
||
562 |
TBool HandleDeadKeyL(TInt aEventType, const TDesC& aEventData ); |
|
563 |
||
564 |
void ReorgnizeICFAndButtons(); |
|
565 |
||
566 |
void UpdateICFTextL(); |
|
567 |
||
568 |
inline TBool IsRtoLLanguage( TInt aLanguage ); |
|
569 |
inline TBool IsValidLanguage(TInt aLanguage); |
|
570 |
||
571 |
void HandleButtonResOnLangDirChange( TInt aControlId ); |
|
572 |
void HandleButtonResOnLangDirChangeL( TInt aControlId ); |
|
573 |
||
574 |
/* |
|
575 |
* Create a candidate list control |
|
576 |
*/ |
|
577 |
void CreateCandidateListL(); |
|
578 |
||
579 |
/* |
|
580 |
* Retrieve text color from skin for candidiate list |
|
581 |
*/ |
|
582 |
TRgb CandidateListTextColor(); |
|
583 |
||
584 |
/* |
|
585 |
* Retrieve text color from skin for autocompletion part |
|
586 |
*/ |
|
587 |
TRgb AutoCompletionPartColor(); |
|
588 |
||
589 |
/** |
|
590 |
* Called when short press occurs on range button. |
|
591 |
* |
|
592 |
* @since S60 v3.2 |
|
593 |
* @return None |
|
594 |
*/ |
|
595 |
void HandleRangeButtonShortPress(); |
|
596 |
||
597 |
private: // Data |
|
598 |
||
599 |
/** |
|
600 |
* The vkb extenting control for vkb area |
|
601 |
* Not own |
|
602 |
*/ |
|
603 |
CPeninputVkbCtrlExt* iVkbCtrl; |
|
604 |
||
605 |
/** |
|
606 |
* The range bar |
|
607 |
* Not own |
|
608 |
*/ |
|
609 |
CAknFepCtrlRangeBar* iRangeBar; |
|
610 |
||
611 |
/** |
|
612 |
* The language switch button |
|
613 |
* Not own |
|
614 |
*/ |
|
615 |
CAknFepCtrlEventButton* iLangSwitchBtn; |
|
616 |
||
617 |
/** |
|
618 |
* The resource file name |
|
619 |
*/ |
|
620 |
TBuf<KMaxFileLength> iResourceFilename; |
|
621 |
||
622 |
/** |
|
623 |
* The popup window |
|
624 |
* Own |
|
625 |
*/ |
|
626 |
CPeninputCommonChoiceList* iPopupWnd; |
|
627 |
||
628 |
/** |
|
629 |
* The background bitmap of popup window |
|
630 |
* Not own |
|
631 |
*/ |
|
632 |
CFbsBitmap* iPopupWndBgImg; |
|
633 |
||
634 |
/** |
|
635 |
* The focus bitmap of popup window |
|
636 |
* Not own |
|
637 |
*/ |
|
638 |
CFbsBitmap* iPopupWndFocusImg; |
|
639 |
||
640 |
/** |
|
641 |
* The UI state manager |
|
642 |
* Not own |
|
643 |
*/ |
|
644 |
MPeninputUiStateMgr* iUiStateMgr; |
|
645 |
||
646 |
/** |
|
647 |
* Application window rect |
|
648 |
*/ |
|
649 |
TRect iAppWndRect; |
|
650 |
||
651 |
/** |
|
652 |
* VKB window rect |
|
653 |
*/ |
|
654 |
TRect iVkbWndRect; |
|
655 |
||
656 |
CIdle *iIdle; |
|
657 |
||
658 |
/** |
|
659 |
* Whether popup window has been initied |
|
660 |
*/ |
|
661 |
TBool iPopupInited; |
|
662 |
||
663 |
/** |
|
664 |
* Popup window item rect |
|
665 |
*/ |
|
666 |
TRect iPopupItemRect; |
|
667 |
||
668 |
/** |
|
669 |
* Choice text layout |
|
670 |
*/ |
|
671 |
TAknTextLineLayout iChoiceTextLayout; |
|
672 |
||
673 |
/** |
|
674 |
* Whether popup window text property has been set |
|
675 |
*/ |
|
676 |
TBool iPopupSet; |
|
677 |
||
678 |
/** |
|
679 |
* Array of unit size |
|
680 |
* Own |
|
681 |
*/ |
|
682 |
RArray<TSize> iUnits; |
|
683 |
/** |
|
684 |
* Touch input switcher |
|
685 |
* Own |
|
686 |
*/ |
|
687 |
CAknFepCtrlRepeatButton* iArrowLeftButton; |
|
688 |
||
689 |
CAknFepCtrlRepeatButton* iArrowRightButton; |
|
690 |
||
691 |
CAknFepCtrlDragButton* iMoveButton; |
|
692 |
||
693 |
CPeninputGenericVkbLafMgr* iLafMgr; |
|
694 |
||
695 |
// CPeninputLayoutInputmodelChoice* iModeSwitchChoice; |
|
696 |
||
697 |
/** |
|
698 |
* The new DeadKey buffer |
|
699 |
*/ |
|
700 |
TBuf<16> iNewDeadKeyBuf; |
|
701 |
||
702 |
/** |
|
703 |
* The old DeadKey buffer |
|
704 |
*/ |
|
705 |
TBuf<16> iOldDeadKeyBuf; |
|
706 |
||
707 |
||
708 |
TAknWindowLineLayout iBubbleSize; |
|
709 |
TAknTextLineLayout iBubbleTextLayout; |
|
710 |
TBool iFirstConstruct; |
|
711 |
||
712 |
/** |
|
713 |
* Writing language |
|
714 |
*/ |
|
715 |
TInt iLanguage; |
|
716 |
||
717 |
/** |
|
718 |
* Bitmap rotator |
|
719 |
*/ |
|
720 |
CPeninputSyncBitmapRotator* iBmpRotator; |
|
721 |
/** |
|
722 |
* Accent command list |
|
723 |
*/ |
|
724 |
RArray<CFepLayoutChoiceList::SItem> iAccentCmdList; |
|
725 |
||
726 |
TSize iIndicatorSize; |
|
727 |
||
728 |
TSize iIndicatorTextSize; |
|
729 |
||
730 |
TBool iIndiWithText; |
|
731 |
||
732 |
TFepIndicatorInfo iIndicatorData; |
|
733 |
||
734 |
/** |
|
735 |
* Range labels for range list |
|
736 |
*/ |
|
737 |
TAllRangeLabels iRangeLabels; |
|
738 |
||
739 |
/** |
|
740 |
* Indicates whether range button short press is handled. |
|
741 |
*/ |
|
742 |
TBool iHandleRangeShortPress; |
|
743 |
||
744 |
/** |
|
745 |
* Indicates whether US rsc file exist or not |
|
746 |
*/ |
|
747 |
TBool iUSRscFileExist; |
|
748 |
||
749 |
private: |
|
750 |
CFepLayoutScrollableList* iCandidateList; |
|
751 |
||
752 |
}; |
|
753 |
||
754 |
inline TBool CPeninputGenericVkbWindow::IsRtoLLanguage( TInt aLanguage ) |
|
755 |
{ |
|
756 |
return ( aLanguage == ELangArabic || |
|
757 |
aLanguage == ELangHebrew || |
|
758 |
aLanguage == ELangFarsi || |
|
759 |
aLanguage == ELangUrdu ); |
|
760 |
} |
|
761 |
||
762 |
inline TBool CPeninputGenericVkbWindow::IsValidLanguage(TInt aLanguage) |
|
763 |
{ |
|
764 |
return (aLanguage != ELangTest && aLanguage != ELangNone); |
|
765 |
} |
|
766 |
inline void CPeninputGenericVkbWindow::SetIndicatorData( |
|
767 |
const TFepIndicatorInfo& aIndicatorData ) |
|
768 |
{ |
|
769 |
iIndicatorData.iIndicatorImgID = aIndicatorData.iIndicatorImgID; |
|
770 |
iIndicatorData.iIndicatorMaskID = aIndicatorData.iIndicatorMaskID; |
|
771 |
iIndicatorData.iIndicatorTextImgID = aIndicatorData.iIndicatorTextImgID; |
|
772 |
iIndicatorData.iIndicatorTextMaskID = aIndicatorData.iIndicatorTextMaskID; |
|
773 |
} |
|
774 |
||
775 |
inline TFepIndicatorInfo CPeninputGenericVkbWindow::IndicatorData() |
|
776 |
{ |
|
777 |
return iIndicatorData; |
|
778 |
} |
|
779 |
#endif // C_PENINPUTGENERICVKBWINDOW_H |