|
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: drop-down list control |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #include <PtiEngine.h> |
|
20 #include <coemain.h> |
|
21 #include <AknUtils.h> |
|
22 #include <peninputgeneralitutnew.rsg> |
|
23 #include <peninputitutconfig_chinese.rsg> |
|
24 #include <peninputitutconfig_latin.rsg> |
|
25 #include <peninputitutconfig_korean.rsg> |
|
26 #include <peninputitutconfig_hebrew.rsg> |
|
27 #include <peninputitutconfig_farsi.rsg> |
|
28 #include <AknFepGlobalEnums.h> |
|
29 #include <eikon.hrh> |
|
30 #include <bautils.h> |
|
31 #include <aknlayoutscalable_apps.cdl.h> |
|
32 #include <aknlayoutscalable_avkon.cdl.h> |
|
33 #include <peninputlayoutmultilineicf.h> |
|
34 #include <AknSettingCache.h> |
|
35 #include <AknFepInternalCRKeys.h> |
|
36 #include <centralrepository.h> |
|
37 #include <featmgr.h> |
|
38 |
|
39 #include "peninputgenericitutdatamgr.h" |
|
40 #include "peninputgenericitutlayoutcontext.h" |
|
41 #include "peninputgenericitutconverter.h" |
|
42 #include "peninputgenericitutcustomization.h" |
|
43 #include "peninputgenericitutwindowmanager.h" |
|
44 |
|
45 #define LAF_MODIFY 1 |
|
46 _LIT(KItutCommonResFile, "z:\\resource\\plugins\\peninputgeneralitutnew.rsc"); |
|
47 _LIT(KConfigResourceFile, |
|
48 "z:\\resource\\plugins\\peninputitutconfig_"); |
|
49 _LIT(KResourceFileExtName, ".rsc"); |
|
50 |
|
51 _LIT(KAvkonResourceFile, "z:\\resource\\avkon.rsc"); |
|
52 |
|
53 const TInt KOnePageCandidateCount = 40; |
|
54 const TInt KMaxPredictCandCnt = 250; |
|
55 const TInt KInvalidResId = -1; |
|
56 const TInt KInvalidImMode = -1; |
|
57 const TInt KInvalidIndex = -1; |
|
58 const TUint16 KPlusChar = '+'; |
|
59 |
|
60 // For virtual ITUT candidate list in landscape mode. No reason |
|
61 const TInt KCandsAdjustment = 7; |
|
62 |
|
63 |
|
64 CGenericItutDataMgr* CGenericItutDataMgr::NewL(MItutLayoutContext* aLayoutContext, |
|
65 CPtiEngine* aPtiEngine) |
|
66 { |
|
67 CGenericItutDataMgr* self = new (ELeave) CGenericItutDataMgr(aLayoutContext, aPtiEngine); |
|
68 CleanupStack::PushL(self); |
|
69 self->ConstructL(); |
|
70 CleanupStack::Pop(self);//self |
|
71 return self; |
|
72 } |
|
73 |
|
74 void CGenericItutDataMgr::ClearChnCandidates(TInt aCmd) |
|
75 { |
|
76 switch (aCmd) |
|
77 { |
|
78 case EItutCandidates: |
|
79 { |
|
80 iCandidates.ResetAndDestroy(); |
|
81 iCandidates.Close(); |
|
82 } |
|
83 break; |
|
84 case EItutPuncCandidates: |
|
85 { |
|
86 iPuncCandidates.ResetAndDestroy(); |
|
87 iPuncCandidates.Close(); |
|
88 } |
|
89 break; |
|
90 default: |
|
91 break; |
|
92 } |
|
93 } |
|
94 |
|
95 CGenericItutDataMgr::~CGenericItutDataMgr() |
|
96 { |
|
97 iSubscriberList.Close(); |
|
98 |
|
99 iMenuItemList.ResetAndDestroy(); |
|
100 |
|
101 CCoeEnv::Static()->DeleteResourceFile(iAvkonResId); |
|
102 |
|
103 CCoeEnv::Static()->DeleteResourceFile(iCommonResId); |
|
104 |
|
105 // Remove the resource file of current input language |
|
106 if ( iConfigResId ) |
|
107 { |
|
108 CCoeEnv::Static()->DeleteResourceFile( iConfigResId ); |
|
109 } |
|
110 |
|
111 // Remove the resource file of some special controls |
|
112 if ( iSpecialResId ) |
|
113 { |
|
114 CCoeEnv::Static()->DeleteResourceFile( iSpecialResId ); |
|
115 } |
|
116 |
|
117 ClearChnCandidates(EItutCandidates); |
|
118 ClearChnCandidates(EItutPuncCandidates); |
|
119 |
|
120 iKeypadCellRects.Close(); |
|
121 iKeypadCellRectsCn.Close(); |
|
122 iKeypadCellRectsQuery.Close(); |
|
123 iKeypadCellRectsForPrtWest.Close(); |
|
124 delete iNumericKeymapData; |
|
125 } |
|
126 |
|
127 void CGenericItutDataMgr::ConstructL() |
|
128 { |
|
129 // initialize layout info of controls and layout |
|
130 ReadLafInfo(); |
|
131 |
|
132 TFileName resourceCommonName(KItutCommonResFile); |
|
133 CCoeEnv* coeEnv = CCoeEnv::Static(); |
|
134 BaflUtils::NearestLanguageFile(coeEnv->FsSession(), resourceCommonName); |
|
135 iCommonResId = coeEnv->AddResourceFileL(resourceCommonName); |
|
136 |
|
137 TFileName resourceAvkonName(KAvkonResourceFile); |
|
138 BaflUtils::NearestLanguageFile(coeEnv->FsSession(), resourceAvkonName); |
|
139 iAvkonResId = coeEnv->AddResourceFileL(resourceAvkonName); |
|
140 |
|
141 TResourceReader reader; |
|
142 CCoeEnv::Static()->CreateResourceReaderLC(reader, R_AVKON_TOUCH_INDICATOR_EDIT_MODE_MENU); |
|
143 |
|
144 const TInt count=reader.ReadInt16(); |
|
145 for ( TInt ii=0; ii<count; ++ii ) |
|
146 { |
|
147 TMenuItem* item = new (ELeave) TMenuItem(); |
|
148 CleanupStack::PushL( item ); |
|
149 item->iCommand = reader.ReadInt32(); |
|
150 reader.ReadInt32(); |
|
151 reader.ReadInt32(); |
|
152 item->iText = reader.ReadTPtrC(); |
|
153 reader.ReadTPtrC(); |
|
154 reader.ReadTPtrC(); |
|
155 reader.ReadInt16(); |
|
156 reader.ReadInt16(); |
|
157 CleanupStack::Pop(); // pop first, since additem pushes again |
|
158 iMenuItemList.Append( item ); |
|
159 reader.ReadInt32(); // extension link |
|
160 } |
|
161 CleanupStack::PopAndDestroy(); //reader |
|
162 |
|
163 // There are some special controls in Chinese and Korean VITUT, |
|
164 // and these controls are hidden when changing to other input language, |
|
165 // so related resource file should be in control environment at all times. |
|
166 // Otherwise crash happens when reading resource for them sometime. |
|
167 // For example: If writing language is Chinese, enters spell mode, |
|
168 // then switches theme, crash happens. |
|
169 if ( FeatureManager::FeatureSupported( KFeatureIdChinese ) || |
|
170 FeatureManager::FeatureSupported( KFeatureIdKorean ) ) |
|
171 { |
|
172 TFileName resourceFilename( KConfigResourceFile ) ; |
|
173 if ( FeatureManager::FeatureSupported( KFeatureIdChinese ) ) |
|
174 { |
|
175 // Chinese variant |
|
176 resourceFilename.Append( ResFileExtByScriptIdx( EChnExt ) ); |
|
177 } |
|
178 else |
|
179 { |
|
180 // Korean variant |
|
181 resourceFilename.Append( ResFileExtByScriptIdx( EHangulExt ) ); |
|
182 } |
|
183 resourceFilename.Append(KResourceFileExtName); |
|
184 |
|
185 BaflUtils::NearestLanguageFile( coeEnv->FsSession(), resourceFilename ); |
|
186 iSpecialResId = coeEnv->AddResourceFileL( resourceFilename ); |
|
187 } |
|
188 } |
|
189 |
|
190 CGenericItutDataMgr::TMenuItem* CGenericItutDataMgr::GetMenuItem(TInt aCommand) |
|
191 { |
|
192 for (TInt i=0;i<iMenuItemList.Count();i++) |
|
193 { |
|
194 if ( iMenuItemList[i]->iCommand == aCommand ) |
|
195 return iMenuItemList[i]; |
|
196 } |
|
197 return NULL; |
|
198 } |
|
199 |
|
200 void CGenericItutDataMgr::AddSubscriber(MItutPropertySubscriber* aSubscriber) |
|
201 { |
|
202 if (aSubscriber) |
|
203 { |
|
204 const TInt index = iSubscriberList.Find(aSubscriber); |
|
205 |
|
206 if (index == KErrNotFound) |
|
207 { |
|
208 iSubscriberList.Append(aSubscriber); |
|
209 } |
|
210 } |
|
211 } |
|
212 |
|
213 void CGenericItutDataMgr::ReadLafInfoForPrtWest() |
|
214 { |
|
215 // Screen |
|
216 TRect rect; |
|
217 |
|
218 rect = AknLayoutScalable_Avkon::application_window(0).LayoutLine().Rect(); |
|
219 |
|
220 TAknWindowLineLayout mainWnd, bottomWnd, bottomPane; |
|
221 TAknLayoutRect mainWndRect, bottomwndtrect, bottompanerect; |
|
222 |
|
223 mainWnd = AknLayoutScalable_Avkon::main_fep_vtchi_ss_pane(0).LayoutLine(); |
|
224 mainWndRect.LayoutRect(rect, mainWnd); |
|
225 |
|
226 bottomWnd = AknLayoutScalable_Avkon::popup_fep_ituss_window(0).LayoutLine(); |
|
227 bottomwndtrect.LayoutRect(mainWndRect.Rect(), bottomWnd); |
|
228 |
|
229 bottomPane = AknLayoutScalable_Avkon::ituss_keypad_pane(0).LayoutLine(); |
|
230 bottompanerect.LayoutRect(bottomwndtrect.Rect(), bottomPane); |
|
231 |
|
232 iLayoutRectForPrtWest = mainWndRect.Rect(); |
|
233 iLayoutOffsetForPrtWest = mainWndRect.Rect().iTl; |
|
234 |
|
235 // ICF |
|
236 TAknWindowLineLayout icflayout, icflayoutbg, icflayoutpane; |
|
237 TAknLayoutRect icfRect, icfRectBg, icfRectPane; |
|
238 |
|
239 icflayoutpane = AknLayoutScalable_Avkon::popup_fep_vtchi_icf_pane(0).LayoutLine(); |
|
240 icfRectPane.LayoutRect( mainWndRect.Rect(), icflayoutpane ); |
|
241 |
|
242 icflayoutbg = AknLayoutScalable_Avkon::bg_icf_pane_cp01(0).LayoutLine(); |
|
243 icfRectBg.LayoutRect( icfRectPane.Rect(), icflayoutbg ); |
|
244 |
|
245 icflayout = AknLayoutScalable_Avkon::vtchi_icf_list_pane(0).LayoutLine(); |
|
246 icfRect.LayoutRect( icfRectBg.Rect(), icflayout ); |
|
247 |
|
248 iIcfRectForPrtWest = icfRect.Rect(); |
|
249 |
|
250 // icf indicator |
|
251 TAknWindowLineLayout icfIndiPaneWithText, icfIndiPaneWithoutText, |
|
252 indiIconWithText, indiIconWithoutText; |
|
253 TAknLayoutRect icfIndiPaneRectWithText, icfIndiPaneRectWithoutText, |
|
254 indiIconRectWithText, indiIconRectWithoutText; |
|
255 TAknTextLineLayout indiTextLayout; |
|
256 |
|
257 icfIndiPaneWithText = AknLayoutScalable_Avkon::icf_edit_indi_pane(1).LayoutLine(); |
|
258 icfIndiPaneRectWithText.LayoutRect(icfRect.Rect(), icfIndiPaneWithText); |
|
259 iIndiPaneRectWithTextForPrtWest = icfIndiPaneRectWithText.Rect(); |
|
260 |
|
261 icfIndiPaneWithoutText = AknLayoutScalable_Avkon::icf_edit_indi_pane(0).LayoutLine(); |
|
262 icfIndiPaneRectWithoutText.LayoutRect(icfRect.Rect(), icfIndiPaneWithoutText); |
|
263 iIndiPaneRectWithoutTextForPrtWest = icfIndiPaneRectWithoutText.Rect(); |
|
264 |
|
265 indiIconWithText = AknLayoutScalable_Avkon::icf_edit_indi_pane_g2(1).LayoutLine(); |
|
266 indiIconRectWithText.LayoutRect( icfIndiPaneRectWithText.Rect(), indiIconWithText ); |
|
267 iIndiIconRectWithTextForPrtWest = indiIconRectWithText.Rect(); |
|
268 |
|
269 indiIconWithoutText = AknLayoutScalable_Avkon::icf_edit_indi_pane_g2(0).LayoutLine(); |
|
270 indiIconRectWithoutText.LayoutRect( |
|
271 icfIndiPaneRectWithoutText.Rect(), indiIconWithoutText ); |
|
272 iIndiIconRectWithoutTextForPrtWest = indiIconRectWithoutText.Rect(); |
|
273 |
|
274 indiTextLayout = AknLayoutScalable_Avkon::icf_edit_indi_pane_t1(0).LayoutLine(); |
|
275 iIndiTextForPrtWest = indiTextLayout; |
|
276 |
|
277 // icf text |
|
278 TAknTextLineLayout icflefttext, icflefttext1; |
|
279 icflefttext = AknLayoutScalable_Avkon::vtchi_icf_list_pane_t1(0, 0, 0).LayoutLine(); |
|
280 icflefttext1 = AknLayoutScalable_Avkon::vtchi_icf_list_pane_t1(0, 0, 1).LayoutLine(); |
|
281 |
|
282 iIcfTextAlignmentForPrtWest = icflefttext.iJ; |
|
283 iIcfTextLeftMarginForPrtWest = icflefttext.il; |
|
284 //iIcfTextRightMarginForPrtWest = icflefttext.ir; |
|
285 iIcfTextRightMarginForPrtWest = iIcfTextLeftMarginForPrtWest; |
|
286 |
|
287 TAknLayoutText ctxt, ctxt1; |
|
288 ctxt.LayoutText( icfRect.Rect(), icflefttext ); |
|
289 ctxt1.LayoutText( icfRect.Rect(), icflefttext1 ); |
|
290 |
|
291 iIcfTextTopMarginForPrtWest = ctxt.TextRect().iTl.iY - icfRect.Rect().iTl.iY; |
|
292 iIcfTextLineSpaceMarginForPrtWest = ctxt1.TextRect().iTl.iY - ctxt.TextRect().iBr.iY; |
|
293 iIcfTextHeightForPrtWest = ctxt.TextRect().Height(); |
|
294 |
|
295 TInt maxRow = ( iIcfRectForPrtWest.Height() - iIcfTextTopMarginForPrtWest ) |
|
296 / ( iIcfTextHeightForPrtWest + iIcfTextLineSpaceMarginForPrtWest ); |
|
297 |
|
298 iIcfTextBottomMarginForPrtWest = |
|
299 iIcfRectForPrtWest.Height() - ( iIcfTextHeightForPrtWest + iIcfTextLineSpaceMarginForPrtWest ) |
|
300 * maxRow - iIcfTextTopMarginForPrtWest; |
|
301 |
|
302 iIcfFontForPrtWest = const_cast<CFont*>(AknLayoutUtils::FontFromId(icflefttext.iFont, NULL)); |
|
303 |
|
304 // Keypad |
|
305 TAknWindowLineLayout itucell, ituinnercell; |
|
306 TAknLayoutRect itucellrect, ituinnercellrect; |
|
307 |
|
308 iKeypadCellRectsForPrtWest.Reset(); |
|
309 |
|
310 itucell = AknLayoutScalable_Avkon::cell_ituss_key_pane(0).LayoutLine(); |
|
311 itucellrect.LayoutRect(bottompanerect.Rect(), itucell); |
|
312 ituinnercell = AknLayoutScalable_Avkon::bg_cell_ituss_key_g1(1).LayoutLine(); |
|
313 |
|
314 iKeypadRectForPrtWest = bottompanerect.Rect(); |
|
315 iKeypadRectForPrtWest.SetHeight(itucellrect.Rect().Height() * 4); |
|
316 iKeypadRectForPrtWest.Move(-iLayoutOffsetForPrtWest); |
|
317 |
|
318 TRect cellrect = itucellrect.Rect(); |
|
319 cellrect.Move(-iLayoutOffsetForPrtWest); |
|
320 cellrect.Move(-iKeypadRectForPrtWest.iTl); |
|
321 |
|
322 // keypad is 4 rows, 3 cols |
|
323 for (TInt i = 0; i < 4; i++) |
|
324 { |
|
325 for (TInt j = 0; j < 3; j++) |
|
326 { |
|
327 TRect keyrect = cellrect; |
|
328 keyrect.Move(itucellrect.Rect().Width() * j, itucellrect.Rect().Height() * i); |
|
329 |
|
330 ituinnercellrect.LayoutRect(keyrect, ituinnercell); |
|
331 iKeypadCellRectsForPrtWest.Append(ituinnercellrect.Rect()); |
|
332 |
|
333 // read shift icon rect |
|
334 if( i == 3 && j == 2 ) |
|
335 { |
|
336 TAknWindowLineLayout shiftIcon = AknLayoutScalable_Avkon:: |
|
337 cell_ituss_key_pane_g2( 0 ).LayoutLine(); |
|
338 TAknLayoutRect shiftIconRect; |
|
339 shiftIconRect.LayoutRect( keyrect, shiftIcon ); |
|
340 iShiftIconRectForPrtWest = shiftIconRect.Rect(); |
|
341 } |
|
342 |
|
343 // read star icon rect |
|
344 if( i == 3 && j == 0 ) |
|
345 { |
|
346 TAknWindowLineLayout starIcon = AknLayoutScalable_Avkon:: |
|
347 cell_ituss_key_pane_g2( 0 ).LayoutLine(); |
|
348 TAknLayoutRect starIconRect; |
|
349 starIconRect.LayoutRect( keyrect, starIcon ); |
|
350 iStarIconRectForPrtWest = starIconRect.Rect(); |
|
351 } |
|
352 |
|
353 } |
|
354 } |
|
355 |
|
356 |
|
357 // Num text row |
|
358 iVkBigNumTextForPrtWest = AknLayoutScalable_Avkon::cell_ituss_key_t1(4).LayoutLine(); |
|
359 iVkNumTextForPrtWest = AknLayoutScalable_Avkon::cell_ituss_key_t1(1).LayoutLine(); |
|
360 |
|
361 // Key text row 1 |
|
362 iVkAlphaText1ForPrtWest = AknLayoutScalable_Avkon::cell_ituss_key_t2(1).LayoutLine(); |
|
363 // Key text row 3 |
|
364 iVkAlphaText3ForPrtWest = AknLayoutScalable_Avkon::cell_ituss_key_t4(1).LayoutLine(); |
|
365 // Key text row 2 |
|
366 iVkAlphaText2ForPrtWest = AknLayoutScalable_Avkon::cell_ituss_key_t3(1).LayoutLine(); |
|
367 |
|
368 // Plus for Numberic Only keypad |
|
369 iVkTextPlusForNumbericOnlyForPrtWest = |
|
370 AknLayoutScalable_Avkon::cell_ituss_key_t5(0).LayoutLine(); |
|
371 |
|
372 // close button |
|
373 TAknWindowLineLayout funcbtn, funcbtnbg, funcbtninner; |
|
374 TAknLayoutRect funcrect, funcbgrect, funcinnerrect, arrowleftinnerrect, arrowrightinnerrect; |
|
375 TAknLayoutRect optioninnerrect, backspaceinnerrect; |
|
376 |
|
377 funcbtn = AknLayoutScalable_Avkon::cell_ituss_key_pane(1).LayoutLine(); |
|
378 funcrect.LayoutRect(bottompanerect.Rect(), funcbtn); |
|
379 |
|
380 funcbtnbg = AknLayoutScalable_Avkon::bg_cell_ituss_key_g1(1).LayoutLine(); |
|
381 funcbgrect.LayoutRect(funcrect.Rect(), funcbtnbg); |
|
382 |
|
383 funcbtninner = AknLayoutScalable_Avkon::cell_ituss_key_pane_g1(0).LayoutLine(); |
|
384 funcinnerrect.LayoutRect(funcrect.Rect(), funcbtninner); |
|
385 |
|
386 TInt btnWidth = funcrect.Rect().Width(); |
|
387 // close button |
|
388 iCloseRectForPrtWest = funcbgrect.Rect(); |
|
389 iCloseRectForPrtWest.Move(0, funcrect.Rect().Height() * 4); |
|
390 iCloseRectForPrtWest.Move(-iLayoutOffsetForPrtWest); |
|
391 |
|
392 iCloseInnerRectForPrtWest = funcinnerrect.Rect(); |
|
393 iCloseInnerRectForPrtWest.Move(0, funcrect.Rect().Height() * 4); |
|
394 iCloseInnerRectForPrtWest.Move(-iLayoutOffsetForPrtWest); |
|
395 |
|
396 // arrow left button |
|
397 iArrowLeftRectForPrtWest = iCloseRectForPrtWest; |
|
398 iArrowLeftRectForPrtWest.Move(btnWidth, 0); |
|
399 arrowleftinnerrect.LayoutRect(iArrowLeftRectForPrtWest, funcbtninner); |
|
400 iArrowLeftInnerRectForPrtWest = arrowleftinnerrect.Rect(); |
|
401 |
|
402 // option button |
|
403 iOptionsRectForPrtWest = iArrowLeftRectForPrtWest; |
|
404 iOptionsRectForPrtWest.Move(btnWidth, 0); |
|
405 optioninnerrect.LayoutRect(iOptionsRectForPrtWest, funcbtninner); |
|
406 iOptionInnerRectForPrtWest = optioninnerrect.Rect(); |
|
407 |
|
408 // arrow right button |
|
409 iArrowRightRectForPrtWest = iOptionsRectForPrtWest; |
|
410 iArrowRightRectForPrtWest.Move(btnWidth, 0); |
|
411 arrowrightinnerrect.LayoutRect(iArrowRightRectForPrtWest, funcbtninner); |
|
412 iArrowRightInnerRectForPrtWest = arrowrightinnerrect.Rect(); |
|
413 |
|
414 // backspace button |
|
415 iBackspaceRectForPrtWest = iArrowRightRectForPrtWest; |
|
416 iBackspaceRectForPrtWest.Move(btnWidth, 0); |
|
417 backspaceinnerrect.LayoutRect(iBackspaceRectForPrtWest, funcbtninner); |
|
418 iBackspaceInnerRectForPrtWest = backspaceinnerrect.Rect(); |
|
419 |
|
420 // preview popup window |
|
421 TAknWindowLineLayout previewWnd, previewBackground, previewWndInner; |
|
422 TAknLayoutRect previewWndRect, previewBackgroundRect, previewWndInnerRect; |
|
423 TAknLayoutText previewWndText; |
|
424 previewWnd = AknLayoutScalable_Avkon::popup_fshwr2_char_preview_window(0).LayoutLine(); |
|
425 |
|
426 previewWndRect.LayoutRect( iLayoutRectForPrtWest, previewWnd ); |
|
427 previewBackground = AknLayoutScalable_Avkon::bg_popup_fep_char_preview_window_cp01().LayoutLine(); |
|
428 previewBackgroundRect.LayoutRect( previewWndRect.Rect(), previewBackground ); |
|
429 iPreviewWndRectForPrtWest = previewBackgroundRect.Rect(); |
|
430 |
|
431 previewWndInner = AknLayoutScalable_Avkon::bg_popup_fep_char_preview_window_g9().LayoutLine(); |
|
432 previewWndInnerRect.LayoutRect( previewBackgroundRect.Rect(), previewWndInner ); |
|
433 |
|
434 iPreviewWndInnerRectForPrtWest = previewWndInnerRect.Rect(); |
|
435 iPreviewWndTextForPrtWest = |
|
436 AknLayoutScalable_Avkon::popup_fshwr2_char_preview_window_t1(0).LayoutLine(); |
|
437 previewWndText.LayoutText(previewWndRect.Rect(), iPreviewWndTextForPrtWest); |
|
438 iBubbleFontForPrtWest = const_cast<CFont*>(previewWndText.Font()); |
|
439 |
|
440 // LAF for spell mode |
|
441 TAknWindowLineLayout spellwnd; |
|
442 TAknLayoutRect okBtnRect, cancelBtnRect, spellwndtrect; |
|
443 |
|
444 iSpellQueryPaneRectForPrtWest = mainWndRect.Rect(); |
|
445 |
|
446 spellwnd = AknLayoutScalable_Avkon::popup_fep_ituss_window(1).LayoutLine(); |
|
447 spellwndtrect.LayoutRect( mainWndRect.Rect(), spellwnd ); |
|
448 |
|
449 TAknWindowLineLayout queryTopPane, queryICFPane, icfSpellIndiPane, |
|
450 middleInnerBtn, middleBtn, bottomInnerBtn; |
|
451 TAknLayoutRect queryTopPaneRect, queryICFPaneRect, icfSpellIndiPaneRect, |
|
452 bottomButton, bottomInnerRect, middleBtnRect; |
|
453 |
|
454 queryTopPane = AknLayoutScalable_Avkon::popup_fep_vtchi_icf_pane(1).LayoutLine(); |
|
455 queryTopPaneRect.LayoutRect( mainWndRect.Rect(), queryTopPane ); |
|
456 |
|
457 queryICFPane = AknLayoutScalable_Avkon::vtchi_query_pane(0).LayoutLine(); |
|
458 queryICFPaneRect.LayoutRect( queryTopPaneRect.Rect(), queryICFPane ); |
|
459 iSpellICFRectForPrtWest = queryICFPaneRect.Rect(); |
|
460 |
|
461 // Middle pane |
|
462 TRect middleButtonPaneRect = spellwndtrect.Rect(); |
|
463 TInt leftMargin = itucellrect.Rect().iTl.iX; |
|
464 middleButtonPaneRect.Move( leftMargin, 0 ); |
|
465 |
|
466 middleBtn = AknLayoutScalable_Avkon::cell_ituss_key_pane(3).LayoutLine(); |
|
467 middleBtnRect.LayoutRect( bottompanerect.Rect(), middleBtn ); |
|
468 middleInnerBtn = AknLayoutScalable_Avkon::bg_cell_ituss_key_g1(5).LayoutLine(); |
|
469 |
|
470 TRect cellMiddleRect; |
|
471 cellMiddleRect.iTl = middleButtonPaneRect.iTl; |
|
472 cellMiddleRect.SetHeight( middleBtnRect.Rect().Height()); |
|
473 cellMiddleRect.SetWidth( middleBtnRect.Rect().Width()); |
|
474 |
|
475 // OK button |
|
476 okBtnRect.LayoutRect( cellMiddleRect, middleInnerBtn ); |
|
477 iOKRectForPrtWest = okBtnRect.Rect(); |
|
478 |
|
479 // Cancel button |
|
480 cellMiddleRect.Move( middleBtnRect.Rect().Width(), 0 ); |
|
481 |
|
482 cancelBtnRect.LayoutRect( cellMiddleRect, middleInnerBtn ); |
|
483 iCancelRectForPrtWest = cancelBtnRect.Rect(); |
|
484 |
|
485 iBtnOKTextForPrtWest = AknLayoutScalable_Avkon::ituss_sks_pane_t1(0).LayoutLine(); |
|
486 iBtnCancelTextForPrtWest = AknLayoutScalable_Avkon::ituss_sks_pane_t2(0).LayoutLine(); |
|
487 |
|
488 iBtnOKTextForPrtWest.ir = 7; |
|
489 iBtnCancelTextForPrtWest.ir = 7; |
|
490 |
|
491 iBtnCancelTextForPrtWest = iBtnOKTextForPrtWest; |
|
492 |
|
493 // Bottom pane |
|
494 TRect cellSpellRect; |
|
495 cellSpellRect.iTl.iX = middleButtonPaneRect.iTl.iX; |
|
496 cellSpellRect.iTl.iY = middleButtonPaneRect.iTl.iY + |
|
497 itucellrect.Rect().Height() * 5 + 7; |
|
498 cellSpellRect.SetHeight( itucellrect.Rect().Height()); |
|
499 cellSpellRect.SetWidth( itucellrect.Rect().Width()); |
|
500 |
|
501 // Left |
|
502 bottomButton.LayoutRect( cellSpellRect, ituinnercell ); |
|
503 iSpellArrowLeftRectForPrtWest = bottomButton.Rect(); |
|
504 |
|
505 bottomInnerBtn = AknLayoutScalable_Avkon::cell_ituss_key_pane_g1(2).LayoutLine(); |
|
506 bottomInnerRect.LayoutRect( bottomButton.Rect(), bottomInnerBtn ); |
|
507 iSpellArrowLeftInnerRectForPrtWest = bottomInnerRect.Rect(); |
|
508 |
|
509 // Right |
|
510 cellSpellRect.Move( itucellrect.Rect().Width(), 0 ); |
|
511 bottomButton.LayoutRect( cellSpellRect, ituinnercell ); |
|
512 iSpellArrowRightRectForPrtWest = bottomButton.Rect(); |
|
513 |
|
514 bottomInnerRect.LayoutRect( bottomButton.Rect(), bottomInnerBtn ); |
|
515 iSpellArrowRightInnerRectForPrtWest = bottomInnerRect.Rect(); |
|
516 |
|
517 // BackSpace |
|
518 cellSpellRect.Move( itucellrect.Rect().Width(), 0 ); |
|
519 bottomButton.LayoutRect( cellSpellRect, ituinnercell ); |
|
520 iSpellICFBtnRectForPrtWest = bottomButton.Rect(); |
|
521 |
|
522 bottomInnerRect.LayoutRect( bottomButton.Rect(), bottomInnerBtn ); |
|
523 iSpellICFBtnInnerRectForPrtWest = bottomInnerRect.Rect(); |
|
524 |
|
525 //iSpellText1ForPrtWest = AknLayoutScalable_Avkon::vtchi_query_pane_t1(0).LayoutLine(); |
|
526 iSpellText1ForPrtWest = AknLayoutScalable_Avkon::vtchi_icf_list_pane_t1(0, 0, 0).LayoutLine(); |
|
527 //iSpellText2ForPrtWest = AknLayoutScalable_Avkon::vtchi_query_pane_t2(0).LayoutLine(); |
|
528 iSpellText2ForPrtWest = AknLayoutScalable_Avkon::vtchi_icf_list_pane_t1(0, 0, 1).LayoutLine(); |
|
529 iSpellText3ForPrtWest = AknLayoutScalable_Avkon::vtchi_query_pane_t3(0).LayoutLine(); |
|
530 |
|
531 iSpellIcfTextLeftMarginForPrtWest = iSpellText1ForPrtWest.il; |
|
532 iSpellIcfTextRightMarginForPrtWest = iSpellIcfTextLeftMarginForPrtWest; |
|
533 |
|
534 iSpellIcfFontForPrtWest = const_cast<CFont*>( |
|
535 AknLayoutUtils::FontFromId(iSpellText1ForPrtWest.iFont, NULL)); |
|
536 |
|
537 TAknLayoutText cSpelltxt1, cSpelltxt2; |
|
538 cSpelltxt1.LayoutText( queryICFPaneRect.Rect(), iSpellText1ForPrtWest ); |
|
539 cSpelltxt2.LayoutText( queryICFPaneRect.Rect(), iSpellText2ForPrtWest ); |
|
540 |
|
541 iSpellIcfTextTopMarginForPrtWest = |
|
542 cSpelltxt1.TextRect().iTl.iY - queryICFPaneRect.Rect().iTl.iY; |
|
543 |
|
544 iSpellIcfTextLineSpaceMarginForPrtWest = |
|
545 cSpelltxt2.TextRect().iTl.iY - cSpelltxt1.TextRect().iBr.iY; |
|
546 |
|
547 iSpellIcfTextHeightForPrtWest = cSpelltxt1.TextRect().Height(); |
|
548 |
|
549 TInt maxSpellRow = ( iSpellICFRectForPrtWest.Height() - iSpellIcfTextTopMarginForPrtWest ) |
|
550 / ( iSpellIcfTextHeightForPrtWest + iSpellIcfTextLineSpaceMarginForPrtWest ); |
|
551 |
|
552 iSpellIcfTextBottomMarginForPrtWest = |
|
553 iSpellICFRectForPrtWest.Height() - |
|
554 ( iSpellIcfTextHeightForPrtWest + iSpellIcfTextLineSpaceMarginForPrtWest ) |
|
555 * maxSpellRow - iSpellIcfTextTopMarginForPrtWest; |
|
556 |
|
557 icfSpellIndiPane = AknLayoutScalable_Avkon::icf_edit_indi_pane(0).LayoutLine(); |
|
558 icfSpellIndiPaneRect.LayoutRect(queryICFPaneRect.Rect(), icfSpellIndiPane); |
|
559 iSpellIndiPaneWithoutTextForPrtWest = icfSpellIndiPaneRect.Rect(); |
|
560 |
|
561 TAknWindowLineLayout spellIndiIcon; |
|
562 TAknLayoutRect spellIndiIconRect; |
|
563 spellIndiIcon = AknLayoutScalable_Avkon::icf_edit_indi_pane_g2(0).LayoutLine(); |
|
564 spellIndiIconRect.LayoutRect( icfSpellIndiPaneRect.Rect(), spellIndiIcon ); |
|
565 iSpellIndiIconWithoutTextForPrtWest = spellIndiIconRect.Rect(); |
|
566 } |
|
567 |
|
568 void CGenericItutDataMgr::ReadLafInfo() |
|
569 { |
|
570 // Screen |
|
571 TRect rect, rectcn; |
|
572 AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EScreen, rect); |
|
573 iScreenSize = rect.Size(); |
|
574 |
|
575 iLandScape = iScreenSize.iWidth < iScreenSize.iHeight ? EFalse : ETrue; |
|
576 |
|
577 ReadLafInfoForPrtWest(); |
|
578 AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EApplicationWindow, rect); |
|
579 |
|
580 // finger Layout |
|
581 TAknWindowLineLayout vitulayout; |
|
582 TAknLayoutRect viturect; |
|
583 |
|
584 if (iLandScape) |
|
585 { |
|
586 vitulayout = AknLayoutScalable_Apps::popup_vitu2_window(1).LayoutLine(); |
|
587 } |
|
588 else |
|
589 { |
|
590 vitulayout = AknLayoutScalable_Apps::popup_vitu2_window(0).LayoutLine(); |
|
591 } |
|
592 |
|
593 viturect.LayoutRect(rect, vitulayout); |
|
594 |
|
595 iLayoutRect = viturect.Rect(); |
|
596 iLayoutOffset = iLayoutRect.iTl; |
|
597 |
|
598 // ICF & Keypad |
|
599 TAknWindowLineLayout icflayoutlatin, icflayoutcn,itukeypad, itucell,icflayoutbgcn; |
|
600 TAknTextLineLayout icflefttext; |
|
601 TAknTextLineLayout icflefttext1, icflefttext2, icflefttext3; |
|
602 TAknLayoutRect icfrectlatin, icfrectcn, itukeypadrect, itucellrect,icfrectcnbg; |
|
603 |
|
604 if (iLandScape) |
|
605 { |
|
606 icflayoutlatin = AknLayoutScalable_Apps::field_vitu2_entry_pane(1).LayoutLine(); |
|
607 icflayoutcn = AknLayoutScalable_Apps::field_vitu2_entry_pane(3).LayoutLine(); |
|
608 } |
|
609 else |
|
610 { |
|
611 icflayoutlatin = AknLayoutScalable_Apps::field_vitu2_entry_pane(0).LayoutLine(); |
|
612 icflayoutcn = AknLayoutScalable_Apps::field_vitu2_entry_pane(2).LayoutLine(); |
|
613 } |
|
614 |
|
615 icfrectlatin.LayoutRect(viturect.Rect(), icflayoutlatin); |
|
616 icflayoutbgcn = AknLayoutScalable_Apps::bg_popup_call_pane_cp08(0).LayoutLine(); |
|
617 icfrectcn.LayoutRect(viturect.Rect(), icflayoutcn); |
|
618 icfrectcnbg.LayoutRect(icfrectcn.Rect(),icflayoutbgcn); |
|
619 |
|
620 TAknLayoutScalableParameterLimits entryPaneVariety = |
|
621 AknLayoutScalable_Apps::field_vitu2_entry_pane_t1_ParamLimits(2); |
|
622 // Calc the max row number |
|
623 TInt maxRow = entryPaneVariety.LastRow(); |
|
624 |
|
625 // latin ICF layout |
|
626 icflefttext = AknLayoutScalable_Apps::field_vitu2_entry_pane_t1(2, 0, 0).LayoutLine(); |
|
627 icflefttext1 = AknLayoutScalable_Apps::field_vitu2_entry_pane_t1(2, 0, 1).LayoutLine(); |
|
628 icflefttext2 = AknLayoutScalable_Apps::field_vitu2_entry_pane_t1(2, 0, 2).LayoutLine(); |
|
629 icflefttext3 = AknLayoutScalable_Apps::field_vitu2_entry_pane_t1(2, 0, maxRow).LayoutLine(); |
|
630 |
|
631 iIcfTextAlignment = icflefttext.iJ; |
|
632 iIcfTextLeftMargin = icflefttext.il; |
|
633 iIcfTextRightMargin = icflefttext.ir; |
|
634 |
|
635 TAknLayoutText ctxt, ctxt1, ctxt2, ctxt3; |
|
636 ctxt.LayoutText( icfrectlatin.Rect(), icflefttext ); |
|
637 ctxt1.LayoutText( icfrectlatin.Rect(), icflefttext1 ); |
|
638 ctxt2.LayoutText( icfrectlatin.Rect(), icflefttext2 ); |
|
639 ctxt3.LayoutText( icfrectlatin.Rect(), icflefttext3 ); |
|
640 |
|
641 |
|
642 iIcfTextTopMargin = ctxt.TextRect().iTl.iY - icfrectlatin.Rect().iTl.iY; |
|
643 iIcfTextLineSpaceMargin = ctxt1.TextRect().iTl.iY - ctxt.TextRect().iBr.iY; |
|
644 iIcfTextBottomMargin = icfrectlatin.Rect().iBr.iY - ctxt3.TextRect().iBr.iY |
|
645 - iIcfTextLineSpaceMargin; |
|
646 iIcfTextHeight = ctxt.TextRect().Height(); |
|
647 |
|
648 iIcfFont = const_cast<CFont*>(AknLayoutUtils::FontFromId(icflefttext.iFont, NULL)); |
|
649 |
|
650 // chinese ICF layout |
|
651 entryPaneVariety = AknLayoutScalable_Apps::field_vitu2_entry_pane_t1_ParamLimits(0); |
|
652 // Calc the max row number |
|
653 maxRow = entryPaneVariety.LastRow(); |
|
654 icflefttext = AknLayoutScalable_Apps::field_vitu2_entry_pane_t1(0, 0, 0).LayoutLine(); |
|
655 icflefttext1 = AknLayoutScalable_Apps::field_vitu2_entry_pane_t1(0, 0, 1).LayoutLine(); |
|
656 icflefttext3 = AknLayoutScalable_Apps::field_vitu2_entry_pane_t1(0, 0, maxRow).LayoutLine(); |
|
657 iIcfTextLeftMarginCn = icflefttext.il; |
|
658 iIcfTextRightMarginCn = icflefttext.ir; |
|
659 |
|
660 ctxt.LayoutText( icfrectcn.Rect(), icflefttext ); |
|
661 ctxt1.LayoutText( icfrectcn.Rect(), icflefttext1 ); |
|
662 ctxt3.LayoutText( icfrectcn.Rect(), icflefttext3 ); |
|
663 |
|
664 TInt topOffset = icfrectcnbg.Rect().iTl.iY - icfrectcn.Rect().iTl.iY; |
|
665 iIcfTextTopMarginCn = ctxt.TextRect().iTl.iY - icfrectcn.Rect().iTl.iY - topOffset; |
|
666 iIcfTextLineSpaceMarginCn = ctxt1.TextRect().iTl.iY - ctxt.TextRect().iBr.iY; |
|
667 iIcfTextBottomMarginCn = icfrectcn.Rect().iBr.iY - ctxt3.TextRect().iBr.iY |
|
668 - iIcfTextLineSpaceMarginCn; |
|
669 iIcfTextHeightCn = ctxt.TextRect().Height(); |
|
670 |
|
671 iIcfFontCn = const_cast<CFont*>(AknLayoutUtils::FontFromId(icflefttext.iFont, NULL)); |
|
672 |
|
673 rect = icfrectlatin.Rect(); |
|
674 rect.Move(-iLayoutOffset.iX, -iLayoutOffset.iY); |
|
675 iIcfWesRect = rect; |
|
676 |
|
677 rect = icfrectcnbg.Rect(); |
|
678 rect.Move(-iLayoutOffset.iX, -iLayoutOffset.iY); |
|
679 iIcfChnRect = rect; |
|
680 //iIcfChnRect.iTl.iY += 10; |
|
681 //#ifdef LAF_MODIFY |
|
682 //if(IsChinese()) |
|
683 // { |
|
684 // iIcfChnRect.Move(0,-iIcfChnRect.iTl.iY + 14); |
|
685 // } |
|
686 //#endif |
|
687 |
|
688 // Keypad |
|
689 TInt keypadvariety = iLandScape ? 1 : 0; |
|
690 itukeypad = AknLayoutScalable_Apps::grid_vitu2_itu_pane(keypadvariety).LayoutLine(); |
|
691 itukeypadrect.LayoutRect(viturect.Rect(), itukeypad); |
|
692 iKeypadRect = itukeypadrect.Rect(); |
|
693 iKeypadRect.Move(-iLayoutOffset.iX, -iLayoutOffset.iY); |
|
694 |
|
695 TInt cnParam = iLandScape ? 3 : 2; |
|
696 itukeypad = AknLayoutScalable_Apps::grid_vitu2_itu_pane(cnParam).LayoutLine(); |
|
697 itukeypadrect.LayoutRect(viturect.Rect(), itukeypad); |
|
698 iKeypadRectCn = itukeypadrect.Rect(); |
|
699 iKeypadRectCn.Move(-iLayoutOffset.iX, -iLayoutOffset.iY); |
|
700 |
|
701 TInt queryParam = iLandScape ? 5 : 4; |
|
702 itukeypad = AknLayoutScalable_Apps::grid_vitu2_itu_pane(queryParam).LayoutLine(); |
|
703 itukeypadrect.LayoutRect(viturect.Rect(), itukeypad); |
|
704 iKeypadRectQuery = itukeypadrect.Rect(); |
|
705 iKeypadRectQuery.Move(-iLayoutOffset.iX, -iLayoutOffset.iY); |
|
706 |
|
707 iKeypadCellRects.Reset(); |
|
708 iKeypadCellRectsCn.Reset(); |
|
709 iKeypadCellRectsQuery.Reset(); |
|
710 |
|
711 // keypad is 4 rows, 3 cols |
|
712 for (TInt i = 0; i < 4; i++) |
|
713 { |
|
714 for (TInt j = 0; j < 3; j++) |
|
715 { |
|
716 itucell = AknLayoutScalable_Apps::cell_vitu2_itu_pane(keypadvariety, |
|
717 j, |
|
718 i).LayoutLine(); |
|
719 itucellrect.LayoutRect(iKeypadRect, itucell); |
|
720 TRect cellrect = itucellrect.Rect(); |
|
721 cellrect.Move(-iKeypadRect.iTl.iX, -iKeypadRect.iTl.iY); |
|
722 iKeypadCellRects.Append(cellrect); |
|
723 |
|
724 // read shift icon rect |
|
725 if( i == 3 && j == 2 ) |
|
726 { |
|
727 TAknWindowLineLayout shiftIcon = AknLayoutScalable_Apps:: |
|
728 cell_vitu2_itu_pane_g1( keypadvariety ).LayoutLine(); |
|
729 TAknLayoutRect shiftIconRect; |
|
730 shiftIconRect.LayoutRect( cellrect, shiftIcon ); |
|
731 iShiftIconRect = shiftIconRect.Rect(); |
|
732 } |
|
733 itucellrect.LayoutRect(iKeypadRectCn, itucell); |
|
734 cellrect = itucellrect.Rect(); |
|
735 cellrect.Move(-iKeypadRectCn.iTl.iX, -iKeypadRectCn.iTl.iY); |
|
736 iKeypadCellRectsCn.Append(cellrect); |
|
737 |
|
738 itucellrect.LayoutRect(iKeypadRectQuery, itucell); |
|
739 cellrect = itucellrect.Rect(); |
|
740 cellrect.Move(-iKeypadRectQuery.iTl.iX, -iKeypadRectQuery.iTl.iY); |
|
741 iKeypadCellRectsQuery.Append(cellrect); |
|
742 } |
|
743 } |
|
744 |
|
745 iVkNumText = iLandScape ? AknLayoutScalable_Apps::cell_vitu2_itu_pane_t1(4).LayoutLine() : |
|
746 AknLayoutScalable_Apps::cell_vitu2_itu_pane_t1(0).LayoutLine(); |
|
747 // Key text row 1 |
|
748 iVkAlphaText1 = iLandScape ? AknLayoutScalable_Apps::cell_vitu2_itu_pane_t2(2).LayoutLine() : |
|
749 AknLayoutScalable_Apps::cell_vitu2_itu_pane_t2(0).LayoutLine(); |
|
750 iVkAlphaText3 = iLandScape ? AknLayoutScalable_Apps::cell_vitu2_itu_pane_t2(3).LayoutLine() : |
|
751 AknLayoutScalable_Apps::cell_vitu2_itu_pane_t2(1).LayoutLine(); |
|
752 iVkAlphaText3.iJ = 3; |
|
753 |
|
754 iVkAlphaText1ForThai = iLandScape ? AknLayoutScalable_Apps::cell_vitu2_itu_pane_t3(6).LayoutLine() : |
|
755 AknLayoutScalable_Apps::cell_vitu2_itu_pane_t2(7).LayoutLine(); |
|
756 iVkAlphaText3ForThai = iLandScape ? AknLayoutScalable_Apps::cell_vitu2_itu_pane_t2(10).LayoutLine() : |
|
757 AknLayoutScalable_Apps::cell_vitu2_itu_pane_t2(8).LayoutLine(); |
|
758 iVkAlphaText3ForThai.iJ = 3; |
|
759 |
|
760 // Key text row 2 |
|
761 iVkAlphaText2 = iLandScape ? AknLayoutScalable_Apps::cell_vitu2_itu_pane_t3(1).LayoutLine() : |
|
762 AknLayoutScalable_Apps::cell_vitu2_itu_pane_t3(0).LayoutLine(); |
|
763 iVkAlphaText2.iJ = 3; |
|
764 |
|
765 iVkAlphaText2ForThai = iLandScape ? AknLayoutScalable_Apps::cell_vitu2_itu_pane_t3(6).LayoutLine() : |
|
766 AknLayoutScalable_Apps::cell_vitu2_itu_pane_t3(5).LayoutLine(); |
|
767 iVkAlphaText2ForThai.iJ = 3; |
|
768 |
|
769 // backspace and switch button |
|
770 TAknWindowLineLayout funcbtn, funcclr, funcswitch, funcinner, funcinnercn, funcleft, funcright; |
|
771 TAknWindowLineLayout funcswitchcn, funcleftcn, funcrightcn, funcclrcn; |
|
772 TAknWindowLineLayout funcind, funcindcn, funcindinner, funcbtncn, funccell; |
|
773 TAknLayoutRect funcbtnrect, funcclrrect, funcswitchrect, funcbtncnrect; |
|
774 TAknLayoutRect funcindrect, funcindrectinner, funcindcnrect, funccellrect; |
|
775 TAknLayoutRect funcinnerrect, funcinnerrectcn, funcleftrect, funcrightrect; |
|
776 TAknLayoutRect funcclrcnrect, funcleftcnrect, funcrightcnrect, funcswitchcnrect; |
|
777 |
|
778 |
|
779 if (iLandScape) |
|
780 { |
|
781 funcbtn = AknLayoutScalable_Apps::grid_vitu2_function_pane(1).LayoutLine(); |
|
782 funcbtncn = AknLayoutScalable_Apps::grid_vitu2_function_pane(3).LayoutLine(); |
|
783 } |
|
784 else |
|
785 { |
|
786 funcbtn = AknLayoutScalable_Apps::grid_vitu2_function_pane(0).LayoutLine(); |
|
787 funcbtncn = AknLayoutScalable_Apps::grid_vitu2_function_pane(2).LayoutLine(); |
|
788 } |
|
789 |
|
790 funcclr = AknLayoutScalable_Apps::cell_vitu2_function_pane(0, 3, 0).LayoutLine(); |
|
791 funcswitch = AknLayoutScalable_Apps::cell_vitu2_function_pane(0, 0, 0).LayoutLine(); |
|
792 |
|
793 funcinner = AknLayoutScalable_Apps::cell_vitu2_function_pane_g1(0).LayoutLine(); |
|
794 |
|
795 funcbtnrect.LayoutRect(viturect.Rect(), funcbtn); |
|
796 funcbtncnrect.LayoutRect(viturect.Rect(), funcbtncn); |
|
797 rect = funcbtnrect.Rect(); |
|
798 rect.Move(-iLayoutOffset.iX, -iLayoutOffset.iY); |
|
799 funcclrrect.LayoutRect(rect, funcclr); |
|
800 funcswitchrect.LayoutRect(rect, funcswitch); |
|
801 |
|
802 // left and right button |
|
803 funcleft = AknLayoutScalable_Apps::cell_vitu2_function_pane(0, 1, 0).LayoutLine(); |
|
804 funcright = AknLayoutScalable_Apps::cell_vitu2_function_pane(0, 2, 0).LayoutLine(); |
|
805 funcleftrect.LayoutRect(rect, funcleft); |
|
806 funcrightrect.LayoutRect(rect, funcright); |
|
807 iArrowLeftRect = funcleftrect.Rect(); |
|
808 iArrowRightRect = funcrightrect.Rect(); |
|
809 funcinnerrect.LayoutRect(iArrowLeftRect, funcinner); |
|
810 iArrowLeftInnerRect = funcinnerrect.Rect(); |
|
811 funcinnerrect.LayoutRect(iArrowRightRect, funcinner); |
|
812 iArrowRightInnerRect = funcinnerrect.Rect(); |
|
813 |
|
814 // funcinnerrect |
|
815 iBackspaceRect = funcclrrect.Rect(); |
|
816 funcinnerrect.LayoutRect(iBackspaceRect, funcinner); |
|
817 iBackspaceInnerRect = funcinnerrect.Rect(); |
|
818 iSwitchRect = funcswitchrect.Rect(); |
|
819 funcinnerrect.LayoutRect( iSwitchRect, funcinner ); |
|
820 iSwitchInnerRect = funcinnerrect.Rect(); |
|
821 |
|
822 // Cursor button in Chinese input mode |
|
823 rect = funcbtncnrect.Rect(); |
|
824 rect.Move(-iLayoutOffset.iX, -iLayoutOffset.iY); |
|
825 funcinnercn = AknLayoutScalable_Apps::cell_vitu2_function_pane_g1(1).LayoutLine(); |
|
826 // 1. left arrow |
|
827 funccell = AknLayoutScalable_Apps::cell_vitu2_function_pane( 1, 1, 0 ).LayoutLine(); |
|
828 funccellrect.LayoutRect( rect, funccell ); |
|
829 iArrowLeftCnRect = funccellrect.Rect(); |
|
830 funcinnerrectcn.LayoutRect( funccellrect.Rect(), funcinnercn ); |
|
831 iArrowLeftInnerCnRect = funcinnerrectcn.Rect(); |
|
832 |
|
833 // 2, up arrow |
|
834 funccell = AknLayoutScalable_Apps::cell_vitu2_function_pane( 1, 0, 0 ).LayoutLine(); |
|
835 funccellrect.LayoutRect( rect, funccell ); |
|
836 iArrowUpRect = funccellrect.Rect(); |
|
837 funcinnerrectcn.LayoutRect( funccellrect.Rect(), funcinnercn ); |
|
838 iArrowUpInnerRect = funcinnerrectcn.Rect(); |
|
839 |
|
840 // 3. right arrow |
|
841 funccell = AknLayoutScalable_Apps::cell_vitu2_function_pane( 1, 2, 0 ).LayoutLine(); |
|
842 funccellrect.LayoutRect( rect, funccell ); |
|
843 iArrowRightCnRect = funccellrect.Rect(); |
|
844 funcinnerrectcn.LayoutRect( funccellrect.Rect(), funcinnercn ); |
|
845 iArrowRightInnerCnRect = funcinnerrectcn.Rect(); |
|
846 |
|
847 // 4. down arrow |
|
848 funccell = AknLayoutScalable_Apps::cell_vitu2_function_pane( 1, 0, 1 ).LayoutLine(); |
|
849 funccellrect.LayoutRect( rect, funccell ); |
|
850 iArrowDownRect = funccellrect.Rect(); |
|
851 funcinnerrectcn.LayoutRect( funccellrect.Rect(), funcinnercn ); |
|
852 iArrowDownInnerRect = funcinnerrectcn.Rect(); |
|
853 #ifdef LAF_MODIFY |
|
854 //indicator bar rect |
|
855 funccell = AknLayoutScalable_Apps::cell_vitu2_function_pane( 1, 1, 1 ).LayoutLine(); |
|
856 funccellrect.LayoutRect( rect, funccell ); |
|
857 iImIndiOuterRectCn = funccellrect.Rect(); |
|
858 funccell = AknLayoutScalable_Apps::cell_vitu2_function_pane( 1, 2, 1 ).LayoutLine(); |
|
859 funccellrect.LayoutRect(rect,funccell); |
|
860 iImIndiOuterRectCn.iBr = funccellrect.Rect().iBr; |
|
861 |
|
862 iImIndicatorChnRect = iImIndiOuterRectCn; |
|
863 iImIndicatorChnRect.Shrink( 24, 12 ); |
|
864 |
|
865 #endif |
|
866 |
|
867 // candidate list |
|
868 TAknWindowLineLayout candlist, candlistpane, charpane, listctrl; |
|
869 TAknLayoutRect candlistrect, candlistpanerect, charpanerect1, charpanerect2; |
|
870 TAknLayoutRect charpanerect3, listctrlrect; |
|
871 |
|
872 if (iLandScape) |
|
873 { |
|
874 candlist = AknLayoutScalable_Apps::popup_vitu2_dropdown_list_window(1). |
|
875 LayoutLine(); |
|
876 } |
|
877 else |
|
878 { |
|
879 candlist = AknLayoutScalable_Apps::popup_vitu2_dropdown_list_window(0). |
|
880 LayoutLine(); |
|
881 } |
|
882 candlistrect.LayoutRect( viturect.Rect(), candlist ); |
|
883 rect = candlistrect.Rect(); |
|
884 rect.Move(-iLayoutOffset.iX, -iLayoutOffset.iY); |
|
885 candlistpane = AknLayoutScalable_Apps::grid_vitu2_dropdown_list_pane(). |
|
886 LayoutLine(); |
|
887 candlistpanerect.LayoutRect( rect, candlistpane ); |
|
888 |
|
889 charpane = AknLayoutScalable_Apps::cell_vitu2_dropdown_list_char_pane( 0 , 0 , 0 ). |
|
890 LayoutLine(); |
|
891 charpanerect1.LayoutRect( candlistpanerect.Rect(), charpane ); |
|
892 charpane = AknLayoutScalable_Apps::cell_vitu2_dropdown_list_char_pane( 0 , 1 , 0 ). |
|
893 LayoutLine(); |
|
894 charpanerect2.LayoutRect( candlistpanerect.Rect(), charpane ); |
|
895 charpane = AknLayoutScalable_Apps::cell_vitu2_dropdown_list_char_pane( 0 , 0 , 1 ). |
|
896 LayoutLine(); |
|
897 charpanerect3.LayoutRect( candlistpanerect.Rect(), charpane ); |
|
898 listctrl = AknLayoutScalable_Apps::cell_vitu2_dropdown_list_ctrl_pane( 0, 0, 0 ). |
|
899 LayoutLine(); |
|
900 listctrlrect.LayoutRect( candlistpanerect.Rect(), listctrl ); |
|
901 |
|
902 iCandsHorizontalMargin = charpanerect2.Rect().iTl.iX - charpanerect1.Rect().iBr.iX; |
|
903 iCandsVerticalMargin = charpanerect3.Rect().iTl.iY - charpanerect1.Rect().iBr.iY; |
|
904 iCandsNaviWidth = listctrlrect.Rect().Width(); |
|
905 |
|
906 iCandsUnitWidth = charpanerect1.Rect().Width(); |
|
907 iCandsUnitHeight = charpanerect1.Rect().Height() ; |
|
908 |
|
909 iCandsSpinBtnHeight = listctrlrect.Rect().Height(); |
|
910 iCandsSpellLTPos = charpanerect1.Rect().iTl; |
|
911 iCandsLTPos = charpanerect3.Rect().iTl; |
|
912 iCandsPuncLTPos = iCandsSpellLTPos; |
|
913 |
|
914 TAknTextLineLayout candstxtlayout = |
|
915 AknLayoutScalable_Apps::cell_vitu2_dropdown_list_char_pane_t1().LayoutLine(); |
|
916 TAknLayoutText candstxt; |
|
917 candstxt.LayoutText( charpanerect1.Rect(), candstxtlayout ); |
|
918 iCandsFont = const_cast<CFont*>( AknLayoutUtils::FontFromId( candstxtlayout.iFont, NULL ) ); |
|
919 iCandsTextMargin = candstxt.TextRect().iTl.iX - charpanerect1.Rect().iTl.iX; |
|
920 iCandsTextColor = candstxt.Color(); |
|
921 |
|
922 //extra adjustment |
|
923 // No reason to add the iCandsTextMargin and KCandsAdjustment |
|
924 iCandsUnitWidth += KCandsAdjustment; |
|
925 iCandsNaviWidth += iCandsTextMargin; |
|
926 |
|
927 TPtrC ptr(reinterpret_cast<TText*>(&iLandScape), sizeof(iLandScape)/sizeof(TText)); |
|
928 NotifySubscriber(MItutPropertySubscriber::EItutPropertyLandscape, ptr); |
|
929 |
|
930 TSize spellSize( iCandsUnitWidth * 6 + iCandsHorizontalMargin * 7, iCandsUnitHeight ); |
|
931 iSpellRect = TRect( iCandsSpellLTPos, spellSize ); |
|
932 iSpellFont = const_cast<CFont*>( AknLayoutUtils::FontFromId( candstxtlayout.iFont, NULL ) ); |
|
933 iSpellTextColor = candstxt.Color(); |
|
934 |
|
935 |
|
936 |
|
937 // Navi buttons |
|
938 TAknWindowLineLayout toppane, toppanecn, btnup, btndown, btnopt, btncls, btnback; |
|
939 TAknLayoutRect toppanerect, toppanerectcn, btnuprect, btndownrect, |
|
940 btnoptrect, btnoptrectcn, btnclsrect, btnclsrectcn, btnbackrectcn; |
|
941 TAknWindowLineLayout upinner, downinner, optinner, clsinner; |
|
942 TAknLayoutRect upinrect, downinrect, optinrect, optinrectcn, clsinrect, clsinrectcn; |
|
943 if (iLandScape) |
|
944 { |
|
945 toppane = AknLayoutScalable_Apps::grid_vitu2_function_top_pane(1).LayoutLine(); |
|
946 toppanecn = AknLayoutScalable_Apps::grid_vitu2_function_top_pane(3).LayoutLine(); |
|
947 } |
|
948 else |
|
949 { |
|
950 toppane = AknLayoutScalable_Apps::grid_vitu2_function_top_pane(0).LayoutLine(); |
|
951 toppanecn = AknLayoutScalable_Apps::grid_vitu2_function_top_pane(2).LayoutLine(); |
|
952 } |
|
953 toppanerect.LayoutRect( viturect.Rect(), toppane ); |
|
954 toppanerectcn.LayoutRect(viturect.Rect(), toppanecn); |
|
955 rect = toppanerect.Rect(); |
|
956 rectcn = toppanerectcn.Rect(); |
|
957 rect.Move(-iLayoutOffset.iX, -iLayoutOffset.iY); |
|
958 rectcn.Move(-iLayoutOffset.iX, -iLayoutOffset.iY); |
|
959 |
|
960 // Chinese input mode |
|
961 funcswitchcn = AknLayoutScalable_Apps::cell_vitu2_function_top_pane( 0, 2, 0 ).LayoutLine(); |
|
962 funcswitchcnrect.LayoutRect( rectcn, funcswitchcn ); |
|
963 iSwitchCnRect = funcswitchcnrect.Rect(); |
|
964 funcinnercn = AknLayoutScalable_Apps::cell_vitu2_function_top_pane_g1(0).LayoutLine(); |
|
965 funcinnerrectcn.LayoutRect( funcswitchcnrect.Rect(), funcinnercn ); |
|
966 iSwitchInnerCnRect = funcinnerrectcn.Rect(); |
|
967 |
|
968 btnopt= AknLayoutScalable_Apps::cell_vitu2_function_top_pane( 0, 1, 0 ).LayoutLine(); |
|
969 btnoptrect.LayoutRect( rect, btnopt ); |
|
970 btnoptrectcn.LayoutRect(rectcn, btnopt); |
|
971 optinner = AknLayoutScalable_Apps::cell_vitu2_function_top_pane_g1(1).LayoutLine(); |
|
972 optinrect.LayoutRect( btnoptrect.Rect(), optinner ); |
|
973 optinner = AknLayoutScalable_Apps::cell_vitu2_function_top_pane_g1(0).LayoutLine(); |
|
974 optinrectcn.LayoutRect(btnoptrectcn.Rect(), optinner); |
|
975 iOptionInnerRect = optinrect.Rect(); |
|
976 #ifdef LAF_MODIFY |
|
977 iOptionInnerRectCn = optinrectcn.Rect(); |
|
978 #endif |
|
979 btncls= AknLayoutScalable_Apps::cell_vitu2_function_top_pane( 0, 0, 0 ).LayoutLine(); |
|
980 btnclsrect.LayoutRect( rect, btncls ); |
|
981 btnclsrectcn.LayoutRect(rectcn, btncls); |
|
982 clsinner = AknLayoutScalable_Apps::cell_vitu2_function_top_pane_g1(1).LayoutLine(); |
|
983 clsinrect.LayoutRect( btnclsrect.Rect(), clsinner ); |
|
984 clsinner = AknLayoutScalable_Apps::cell_vitu2_function_top_pane_g1(0).LayoutLine(); |
|
985 clsinrectcn.LayoutRect(btnclsrectcn.Rect(), clsinner); |
|
986 iCloseInnerRect = clsinrect.Rect(); |
|
987 #ifdef LAF_MODIFY |
|
988 iCloseInnerRectCn = clsinrectcn.Rect(); |
|
989 #endif |
|
990 btnback= AknLayoutScalable_Apps::cell_vitu2_function_top_pane( 0, 3, 0 ).LayoutLine(); |
|
991 btnbackrectcn.LayoutRect(rectcn, btnback); |
|
992 iBackspaceCnRect = btnbackrectcn.Rect(); |
|
993 funcinner = AknLayoutScalable_Apps::cell_vitu2_function_top_pane_g1(0).LayoutLine(); |
|
994 funcinnerrect.LayoutRect( btnbackrectcn.Rect(), funcinner ); |
|
995 iBackspaceInnerCnRect = funcinnerrect.Rect(); |
|
996 |
|
997 |
|
998 iOptionsRect = btnoptrect.Rect(); |
|
999 iOptionsRectCn = btnoptrectcn.Rect(); |
|
1000 iCloseRect = btnclsrect.Rect(); |
|
1001 iCloseRectCn = btnclsrectcn.Rect(); |
|
1002 |
|
1003 // input mode indicator, should use laf data in the future |
|
1004 #ifndef LAF_MODIFY |
|
1005 funcindcn = AknLayoutScalable_Apps::field_vitu2_entry_pane_g1().LayoutLine(); |
|
1006 funcindcnrect.LayoutRect( icfrectcn.Rect(), funcindcn ); |
|
1007 #endif |
|
1008 funcind = AknLayoutScalable_Apps::cell_vitu2_function_top_wide_pane(1).LayoutLine(); |
|
1009 funcindrect.LayoutRect(rect, funcind); |
|
1010 |
|
1011 funcindinner = AknLayoutScalable_Apps::cell_vitu2_function_top_wide_pane_g1(2).LayoutLine(); |
|
1012 funcindrectinner.LayoutRect(funcindrect.Rect(), funcindinner); |
|
1013 //iBackspaceCnRect = funcindcnrect.Rect(); |
|
1014 |
|
1015 iImIndicatorWesRect = funcindrectinner.Rect(); |
|
1016 iImIndiOuterRect = funcindrect.Rect(); |
|
1017 #ifndef LAF_MODIFY |
|
1018 funcindinner = AknLayoutScalable_Apps::cell_vitu2_function_top_wide_pane_g1(1).LayoutLine(); |
|
1019 funcindrectinner.LayoutRect(funcindrect.Rect(), funcindinner); |
|
1020 iImIndicatorChnRect = funcindrectinner.Rect(); |
|
1021 #endif |
|
1022 // match selection list |
|
1023 TAknWindowLineLayout matchlist, listpane, itempane1, itempane2, scrollpane; |
|
1024 TAknLayoutRect matchlistrect, listpanerect, itempanerect1, itempanerect2, scrollpanerect; |
|
1025 TAknWindowLineLayout arrowup, arrowdown, arrowupinner, arrowdowninner; |
|
1026 TAknLayoutRect arrowuprect, arrowdownrect, arrowupinnerRect, arrowdowninnerRect; |
|
1027 |
|
1028 if( iLandScape ) |
|
1029 { |
|
1030 matchlist = AknLayoutScalable_Apps::popup_vitu2_match_list_window(3).LayoutLine(); |
|
1031 listpane = AknLayoutScalable_Apps::list_vitu2_match_list_pane(1).LayoutLine(); |
|
1032 scrollpane = AknLayoutScalable_Apps::vitu2_page_scroll_pane(1).LayoutLine(); |
|
1033 } |
|
1034 else |
|
1035 { |
|
1036 matchlist = AknLayoutScalable_Apps::popup_vitu2_match_list_window(2).LayoutLine(); |
|
1037 listpane = AknLayoutScalable_Apps::list_vitu2_match_list_pane(0).LayoutLine(); |
|
1038 scrollpane = AknLayoutScalable_Apps::vitu2_page_scroll_pane(0).LayoutLine(); |
|
1039 } |
|
1040 |
|
1041 matchlistrect.LayoutRect( viturect.Rect(), matchlist ); |
|
1042 rect = matchlistrect.Rect(); |
|
1043 rect.Move(-iLayoutOffset.iX, -iLayoutOffset.iY); |
|
1044 |
|
1045 listpanerect.LayoutRect( rect, listpane ); |
|
1046 scrollpanerect.LayoutRect( rect, scrollpane ); |
|
1047 itempane1 = AknLayoutScalable_Apps::list_vitu2_match_list_item_pane( 0, 0, 0 ).LayoutLine(); |
|
1048 itempanerect1.LayoutRect( listpanerect.Rect(), itempane1 ); |
|
1049 itempane2 = AknLayoutScalable_Apps::list_vitu2_match_list_item_pane( 0, 0, 1 ).LayoutLine(); |
|
1050 itempanerect2.LayoutRect( listpanerect.Rect(), itempane2 ); |
|
1051 |
|
1052 arrowupinner= AknLayoutScalable_Apps::vitu2_page_scroll_pane_g1().LayoutLine(); |
|
1053 arrowdowninner = AknLayoutScalable_Apps::vitu2_page_scroll_pane_g2().LayoutLine(); |
|
1054 arrowup = AknLayoutScalable_Apps::bg_button_pane_cp023().LayoutLine(); |
|
1055 arrowdown= AknLayoutScalable_Apps::bg_button_pane_cp024().LayoutLine(); |
|
1056 arrowuprect.LayoutRect( scrollpanerect.Rect(), arrowup ); |
|
1057 arrowdownrect.LayoutRect( scrollpanerect.Rect(), arrowdown ); |
|
1058 arrowupinnerRect.LayoutRect( scrollpanerect.Rect(), arrowupinner ); |
|
1059 arrowdowninnerRect.LayoutRect( scrollpanerect.Rect(), arrowdowninner ); |
|
1060 |
|
1061 //iSelectionTl = rect.iTl; |
|
1062 iSelectionHorMargin = listpanerect.Rect().iTl.iX; |
|
1063 iSelectionVerMargin = listpanerect.Rect().iTl.iY; |
|
1064 iSelectionTl = TPoint(iIcfWesRect.iTl.iX + 10, iIcfWesRect.iTl.iY + 10); |
|
1065 iSelectionItemSize = itempanerect1.Rect().Size(); |
|
1066 iSelectionItemMargin = itempanerect1.Rect().iBr.iY - itempanerect2.Rect().iTl.iY; |
|
1067 iSelectionNaviSize = arrowuprect.Rect().Size(); |
|
1068 iSelectionNaviInnerSize = arrowupinnerRect.Rect().Size(); |
|
1069 iSelectionTextLine = AknLayoutScalable_Apps::list_vitu2_match_list_item_pane_t1().LayoutLine(); |
|
1070 iSelectionPageTextLine = AknLayoutScalable_Apps::vitu2_page_scroll_pane_t1().LayoutLine(); |
|
1071 |
|
1072 // read spell popup window laf |
|
1073 TAknWindowLineLayout queryPane, btnOK, btnCancle, ICFArea, btnClr, btnClrInner; |
|
1074 TAknWindowLineLayout editIndicator; |
|
1075 TAknLayoutRect queryPaneRect, btnOKRect, btnCancleRect, ICFAreaRect, btnClrRect; |
|
1076 TAknLayoutRect btnClrInnerRect, editIndicatorRect; |
|
1077 TAknTextLineLayout btnOKText, btnCancleText; |
|
1078 if( iLandScape ) |
|
1079 { |
|
1080 queryPane = AknLayoutScalable_Apps::popup_vitu2_query_window(1).LayoutLine(); |
|
1081 } |
|
1082 else |
|
1083 { |
|
1084 queryPane = AknLayoutScalable_Apps::popup_vitu2_query_window(0).LayoutLine(); |
|
1085 } |
|
1086 queryPaneRect.LayoutRect( viturect.Rect(), queryPane ); |
|
1087 btnOK = AknLayoutScalable_Apps::bg_button_pane_cp016().LayoutLine(); |
|
1088 btnOKRect.LayoutRect( queryPaneRect.Rect(), btnOK ); |
|
1089 btnCancle = AknLayoutScalable_Apps::bg_button_pane_cp017().LayoutLine(); |
|
1090 btnCancleRect.LayoutRect( queryPaneRect.Rect(), btnCancle ); |
|
1091 btnOKText = AknLayoutScalable_Apps::popup_vitu2_query_window_t4(0).LayoutLine(); |
|
1092 btnCancleText = AknLayoutScalable_Apps::popup_vitu2_query_window_t5(0).LayoutLine(); |
|
1093 |
|
1094 editIndicator = AknLayoutScalable_Apps::popup_vitu2_query_window_g1().LayoutLine(); |
|
1095 editIndicatorRect.LayoutRect( queryPaneRect.Rect(), editIndicator ); |
|
1096 |
|
1097 ICFArea = AknLayoutScalable_Apps::input_focus_pane_cp08().LayoutLine(); |
|
1098 ICFAreaRect.LayoutRect( queryPaneRect.Rect(), ICFArea ); |
|
1099 |
|
1100 btnClr = AknLayoutScalable_Apps::bg_button_pane_cp015().LayoutLine(); |
|
1101 btnClrRect.LayoutRect( queryPaneRect.Rect(), btnClr ); |
|
1102 btnClrInner = AknLayoutScalable_Apps::popup_vitu2_query_window_g2().LayoutLine(); |
|
1103 btnClrInnerRect.LayoutRect( queryPaneRect.Rect(), btnClrInner ); |
|
1104 |
|
1105 iSpellQueryPaneRect = queryPaneRect.Rect(); |
|
1106 iSpellEditIndicator = editIndicatorRect.Rect(); |
|
1107 iOkRect = btnOKRect.Rect(); |
|
1108 iCancelRect = btnCancleRect.Rect(); |
|
1109 iSpellICFRect = ICFAreaRect.Rect(); |
|
1110 iSpellClrRect = btnClrRect.Rect(); |
|
1111 iSpellClrInnerRect = btnClrInnerRect.Rect(); |
|
1112 |
|
1113 //iBtnTextFormat = iVkAlphaText1;//btnOKText; |
|
1114 //iBtnTextFormat1 = iVkAlphaText1;//btnCancleText; |
|
1115 iBtnTextFormat = AknLayoutScalable_Apps::popup_vitu2_query_button_pane_t1(0).LayoutLine(); |
|
1116 iBtnTextFormat1 = AknLayoutScalable_Apps::popup_vitu2_query_button_pane_t1(0).LayoutLine(); |
|
1117 |
|
1118 |
|
1119 // just test if there is size change of added ctrls |
|
1120 iSendRect = iArrowLeftRect; |
|
1121 iDisconnRect = iArrowRightRect; |
|
1122 // end test |
|
1123 |
|
1124 // preview popup window |
|
1125 TAknWindowLineLayout previewWnd, previewBackground, previewWndInner; |
|
1126 TAknLayoutRect previewWndRect, previewBackgroundRect, previewWndInnerRect; |
|
1127 TAknLayoutText previewWndText; |
|
1128 previewWnd = AknLayoutScalable_Avkon::popup_fshwr2_char_preview_window(0).LayoutLine(); |
|
1129 |
|
1130 previewWndRect.LayoutRect( iLayoutRect, previewWnd ); |
|
1131 previewBackground = AknLayoutScalable_Avkon::bg_popup_fep_char_preview_window_cp01().LayoutLine(); |
|
1132 previewBackgroundRect.LayoutRect( previewWndRect.Rect(), previewBackground ); |
|
1133 iPreviewWndRect = previewBackgroundRect.Rect(); |
|
1134 |
|
1135 previewWndInner = AknLayoutScalable_Avkon::bg_popup_fep_char_preview_window_g9().LayoutLine(); |
|
1136 previewWndInnerRect.LayoutRect( previewBackgroundRect.Rect(), previewWndInner ); |
|
1137 |
|
1138 iPreviewWndInnerRect = previewWndInnerRect.Rect(); |
|
1139 iPreviewWndText = |
|
1140 AknLayoutScalable_Avkon::popup_fshwr2_char_preview_window_t1(0).LayoutLine(); |
|
1141 previewWndText.LayoutText(previewWndRect.Rect(), iPreviewWndText); |
|
1142 iBubbleFont = const_cast<CFont*>(previewWndText.Font()); |
|
1143 } |
|
1144 |
|
1145 void CGenericItutDataMgr::SetTextAlignment() |
|
1146 { |
|
1147 CFepLayoutMultiLineIcf* icffield = static_cast<CFepLayoutMultiLineIcf*>(iLayoutContext->Control(ECtrlIdICF)); |
|
1148 |
|
1149 if (icffield && InputLanguage() != ELangNone) |
|
1150 { |
|
1151 if ( IsPortraitWest()) |
|
1152 { |
|
1153 TRAP_IGNORE(icffield->SetTextAlignmentL( |
|
1154 iIcfTextAlignmentForPrtWest, InputLanguage())); |
|
1155 } |
|
1156 else |
|
1157 { |
|
1158 TRAP_IGNORE(icffield->SetTextAlignmentL( |
|
1159 iIcfTextAlignment, InputLanguage())); |
|
1160 } |
|
1161 } |
|
1162 } |
|
1163 |
|
1164 void CGenericItutDataMgr::SetIcfTextAlignment(TInt aAlignment) |
|
1165 { |
|
1166 if ( IsPortraitWest()) |
|
1167 { |
|
1168 iIcfTextAlignmentForPrtWest = aAlignment; |
|
1169 } |
|
1170 else |
|
1171 { |
|
1172 iIcfTextAlignment = aAlignment; |
|
1173 } |
|
1174 } |
|
1175 |
|
1176 void CGenericItutDataMgr::SetLanguageL(TInt aLanguage) |
|
1177 { |
|
1178 ASSERT( IsValidLanguage( aLanguage ) ); |
|
1179 |
|
1180 if (iLanguage != aLanguage) |
|
1181 { |
|
1182 if( IsValidLanguage( iLanguage ) ) |
|
1183 iIsLangDirectionSwitch = IsRtoLLanguage( aLanguage ) ^ IsRtoLLanguage( iLanguage ); |
|
1184 else |
|
1185 //Check mirroring is needed when first setting language |
|
1186 iIsLangDirectionSwitch = IsRtoLLanguage( aLanguage ); |
|
1187 |
|
1188 iLanguage = aLanguage; |
|
1189 iInputMode = KInvalidImMode; |
|
1190 |
|
1191 //SetTextAlignment(); |
|
1192 |
|
1193 TInt scriptIdx = GetConfigResFileName(aLanguage); |
|
1194 |
|
1195 if (scriptIdx != iCurrentScriptIdx) |
|
1196 { |
|
1197 iCurrentScriptIdx = scriptIdx; |
|
1198 |
|
1199 CCoeEnv* coeEnv = CCoeEnv::Static(); |
|
1200 |
|
1201 // Remove the resource file of previous input language. |
|
1202 // The previous resource file should be removed first, |
|
1203 // Because there are some same keypad ids in the resource file |
|
1204 // of latin, Cyrillic, and etc. |
|
1205 if ( iConfigResId ) |
|
1206 { |
|
1207 coeEnv->DeleteResourceFile( iConfigResId ); |
|
1208 } |
|
1209 |
|
1210 // Add the resource file of current input language |
|
1211 TFileName resourceConfigName( iResourceFilename ); |
|
1212 BaflUtils::NearestLanguageFile( coeEnv->FsSession(), resourceConfigName ); |
|
1213 iConfigResId = coeEnv->AddResourceFileL( resourceConfigName ); |
|
1214 |
|
1215 if (IsChinese()) |
|
1216 { |
|
1217 iLayoutContext->UiManager()->CreateChineseSpecificCtrlsIfNeededL(); |
|
1218 } |
|
1219 |
|
1220 if( IsKorean()) |
|
1221 { |
|
1222 iLayoutContext->UiManager()->CreateKoreanSpecificCtrlsIfNeededL(); |
|
1223 } |
|
1224 |
|
1225 NotifyChangeControlLayout(MItutPropertySubscriber::EItutPropertyKeypadResourceId, |
|
1226 KeypadResourceId()); |
|
1227 } |
|
1228 } |
|
1229 } |
|
1230 |
|
1231 void CGenericItutDataMgr::SetCase(TInt aCase) |
|
1232 { |
|
1233 if (iCase != aCase || iInputMode == ELatin) |
|
1234 { |
|
1235 iCase = aCase; |
|
1236 NotifyChangeControlLayout(MItutPropertySubscriber::EItutPropertyKeypadResourceId, |
|
1237 KeypadResourceId()); |
|
1238 } |
|
1239 } |
|
1240 |
|
1241 void CGenericItutDataMgr::SetInputModeL(TInt aMode) |
|
1242 { |
|
1243 TInt engineMode = KInvalidImMode; |
|
1244 |
|
1245 switch (aMode) |
|
1246 { |
|
1247 case EPinyin: |
|
1248 { |
|
1249 engineMode = EPtiEnginePinyinByPhrase; |
|
1250 } |
|
1251 break; |
|
1252 case EStroke: |
|
1253 { |
|
1254 engineMode = EPtiEngineStrokeByPhrase; |
|
1255 } |
|
1256 break; |
|
1257 case EZhuyin: |
|
1258 { |
|
1259 engineMode = EPtiEngineZhuyinByPhrase; |
|
1260 } |
|
1261 break; |
|
1262 case ELatin: |
|
1263 case EHindi: |
|
1264 case ENumber: |
|
1265 case EHangul: |
|
1266 case ENativeNumber: |
|
1267 { |
|
1268 iInputMode = aMode; |
|
1269 NotifyChangeControlLayout(MItutPropertySubscriber::EItutPropertyKeypadResourceId, |
|
1270 KeypadResourceId()); |
|
1271 } |
|
1272 break; |
|
1273 case EZhuyinFind: |
|
1274 { |
|
1275 iInputMode = EZhuyin; |
|
1276 |
|
1277 return; |
|
1278 } |
|
1279 case EStrokeFind: |
|
1280 { |
|
1281 iInputMode = EStroke; |
|
1282 |
|
1283 return; |
|
1284 } |
|
1285 default: |
|
1286 return; |
|
1287 } |
|
1288 |
|
1289 if (IsChinese()) |
|
1290 { |
|
1291 TInt err = iPtiEngine->ActivateLanguageL(iLanguage, TPtiEngineInputMode(engineMode)); |
|
1292 if (err == KErrNone) |
|
1293 { |
|
1294 iPtiEngine->SetCandidatePageLength(KOnePageCandidateCount); |
|
1295 iInputMode = aMode; |
|
1296 } |
|
1297 } |
|
1298 } |
|
1299 |
|
1300 |
|
1301 |
|
1302 |
|
1303 void CGenericItutDataMgr::SetChineseSpellFlag( TBool aFlag ) |
|
1304 { |
|
1305 iIsChineseSpell = aFlag; |
|
1306 } |
|
1307 |
|
1308 TBool CGenericItutDataMgr::IsChineseSpellMode() |
|
1309 { |
|
1310 return iIsChineseSpell; |
|
1311 } |
|
1312 |
|
1313 TAny* CGenericItutDataMgr::RequestDataForPortraitWestUIAndChineseSpellUI(TInt aDataType) |
|
1314 { |
|
1315 switch ( aDataType ) |
|
1316 { |
|
1317 case EScreenSize: |
|
1318 { |
|
1319 return &iScreenSize; |
|
1320 } |
|
1321 case ELayoutOffset: |
|
1322 { |
|
1323 return &iLayoutOffsetForPrtWest; |
|
1324 } |
|
1325 case ELayoutRect: |
|
1326 { |
|
1327 return &iLayoutRectForPrtWest; |
|
1328 } |
|
1329 case EIcfRect: |
|
1330 { |
|
1331 return &iIcfRectForPrtWest; |
|
1332 } |
|
1333 case EIcfFont: |
|
1334 { |
|
1335 if ( IsChineseSpellMode()) |
|
1336 { |
|
1337 return reinterpret_cast<TAny*>(iIcfFont); |
|
1338 } |
|
1339 else |
|
1340 { |
|
1341 return reinterpret_cast<TAny*>(iIcfFontForPrtWest); |
|
1342 } |
|
1343 } |
|
1344 case EBackspaceRect: |
|
1345 case EItutPosClear: |
|
1346 { |
|
1347 return &iBackspaceRectForPrtWest; |
|
1348 } |
|
1349 case EKeypadRect: |
|
1350 { |
|
1351 if ( IsChineseSpellMode()) |
|
1352 { |
|
1353 return &iKeypadRect; |
|
1354 } |
|
1355 else |
|
1356 { |
|
1357 return &iKeypadRectForPrtWest; |
|
1358 } |
|
1359 } |
|
1360 case EKeypadCellRects: |
|
1361 { |
|
1362 if ( IsChineseSpellMode()) |
|
1363 { |
|
1364 return &iKeypadCellRects; |
|
1365 } |
|
1366 else |
|
1367 { |
|
1368 return &iKeypadCellRectsForPrtWest; |
|
1369 } |
|
1370 } |
|
1371 case EKeypadLeftTextLine: |
|
1372 { |
|
1373 if ( IsChineseSpellMode()) |
|
1374 { |
|
1375 return &iVkNumText; |
|
1376 } |
|
1377 else |
|
1378 { |
|
1379 // Modify new begin |
|
1380 if ( iInputMode == ENumber || iInputMode == ENativeNumber ) |
|
1381 { |
|
1382 return &iVkBigNumTextForPrtWest; |
|
1383 } |
|
1384 else |
|
1385 { |
|
1386 return &iVkNumTextForPrtWest; |
|
1387 } |
|
1388 // Modify new end |
|
1389 } |
|
1390 } |
|
1391 case EKeypadRightTextLine1: |
|
1392 { |
|
1393 if ( IsChineseSpellMode()) |
|
1394 { |
|
1395 return IsThai() ? &iVkAlphaText1ForThai : &iVkAlphaText1; |
|
1396 } |
|
1397 else |
|
1398 { |
|
1399 if ( iInputMode == ENumber || iInputMode == ENativeNumber ) |
|
1400 { |
|
1401 return &iVkTextPlusForNumbericOnlyForPrtWest; |
|
1402 } |
|
1403 else |
|
1404 { |
|
1405 return &iVkAlphaText1ForPrtWest; |
|
1406 } |
|
1407 } |
|
1408 } |
|
1409 case EKeypadRightTextLine2: |
|
1410 { |
|
1411 if ( IsChineseSpellMode()) |
|
1412 { |
|
1413 return IsThai() ? &iVkAlphaText2ForThai : &iVkAlphaText2; |
|
1414 } |
|
1415 else |
|
1416 { |
|
1417 return &iVkAlphaText2ForPrtWest; |
|
1418 } |
|
1419 } |
|
1420 case EKeypadRightTextLine3: |
|
1421 { |
|
1422 if ( IsChineseSpellMode()) |
|
1423 { |
|
1424 return IsThai() ? &iVkAlphaText3ForThai : &iVkAlphaText3; |
|
1425 } |
|
1426 else |
|
1427 { |
|
1428 return &iVkAlphaText3ForPrtWest; |
|
1429 } |
|
1430 } |
|
1431 case EDropdownlistUnitWidth: |
|
1432 { |
|
1433 return &iCandsUnitWidth; |
|
1434 } |
|
1435 case EDropdownlistUnitHeight: |
|
1436 { |
|
1437 return &iCandsUnitHeight; |
|
1438 } |
|
1439 case EDropdownlistHorizontalMargin: |
|
1440 { |
|
1441 return &iCandsHorizontalMargin; |
|
1442 } |
|
1443 case EDropdownlistVerticalMargin: |
|
1444 { |
|
1445 return &iCandsVerticalMargin; |
|
1446 } |
|
1447 case EDropdownListNaviWidth: |
|
1448 { |
|
1449 return &iCandsNaviWidth; |
|
1450 } |
|
1451 case EDropdownListSpinBtnHeight: |
|
1452 { |
|
1453 return &iCandsSpinBtnHeight; |
|
1454 } |
|
1455 case EDropdownListSpellLTPos: |
|
1456 { |
|
1457 return &iCandsSpellLTPos; |
|
1458 } |
|
1459 case EDropdownListCandsLTPos: |
|
1460 { |
|
1461 return &iCandsLTPos; |
|
1462 } |
|
1463 case EDropdownListPuncLTPos: |
|
1464 { |
|
1465 return &iCandsPuncLTPos; |
|
1466 } |
|
1467 case EDropdownListFont: |
|
1468 { |
|
1469 return reinterpret_cast<TAny*>(iCandsFont); |
|
1470 } |
|
1471 case EDropdownListTextMargin: |
|
1472 { |
|
1473 return &iCandsTextMargin; |
|
1474 } |
|
1475 case EDropdownListTextColor: |
|
1476 { |
|
1477 return &iCandsTextColor; |
|
1478 } |
|
1479 case ESpellRect: |
|
1480 { |
|
1481 return &iSpellRect; |
|
1482 } |
|
1483 case ESpellFont: |
|
1484 { |
|
1485 return reinterpret_cast<TAny*>(iSpellIcfFontForPrtWest); |
|
1486 } |
|
1487 case ESpellTextColor: |
|
1488 { |
|
1489 return &iSpellTextColor; |
|
1490 } |
|
1491 case ELanguage: |
|
1492 { |
|
1493 return &iLanguage; |
|
1494 } |
|
1495 case EInputMode: |
|
1496 { |
|
1497 return &iInputMode; |
|
1498 } |
|
1499 case ECase: |
|
1500 { |
|
1501 return &iCase; |
|
1502 } |
|
1503 case EChnCandidates: |
|
1504 { |
|
1505 return &iCandidates; |
|
1506 } |
|
1507 case EChnPuncCandidates: |
|
1508 { |
|
1509 return &iPuncCandidates; |
|
1510 } |
|
1511 case EArrowLeftRect: |
|
1512 case EItutPosArrowLeft: |
|
1513 { |
|
1514 return &iArrowLeftRectForPrtWest; |
|
1515 } |
|
1516 case EArrowRightRect: |
|
1517 case EItutPosArrowRight: |
|
1518 { |
|
1519 return &iArrowRightRectForPrtWest; |
|
1520 } |
|
1521 case EArrowUpRect: |
|
1522 case EItutPosArrowUp: |
|
1523 { |
|
1524 return &iArrowUpRect; |
|
1525 } |
|
1526 case EArrowDownRect: |
|
1527 case EItutPosArrowDown: |
|
1528 { |
|
1529 return &iArrowDownRect; |
|
1530 } |
|
1531 case EItutPosSend: |
|
1532 { |
|
1533 return &iSendRect; |
|
1534 } |
|
1535 case EItutPosDisconn: |
|
1536 { |
|
1537 return &iDisconnRect; |
|
1538 } |
|
1539 case EMatchSelectionTlPos: |
|
1540 { |
|
1541 return &iSelectionTl; |
|
1542 } |
|
1543 case EMatchSelectionItemSize: |
|
1544 { |
|
1545 return &iSelectionItemSize; |
|
1546 } |
|
1547 case EMatchSelectionItemMargin: |
|
1548 { |
|
1549 return &iSelectionItemMargin; |
|
1550 } |
|
1551 case EMatchSelectionTextLine: |
|
1552 { |
|
1553 return &iSelectionTextLine; |
|
1554 } |
|
1555 case EOptionsRect: |
|
1556 { |
|
1557 return &iOptionsRectForPrtWest; |
|
1558 } |
|
1559 case ECloseRect: |
|
1560 { |
|
1561 return &iCloseRectForPrtWest; |
|
1562 } |
|
1563 case ELeftInnerRect: |
|
1564 { |
|
1565 return &iArrowLeftInnerRectForPrtWest; |
|
1566 } |
|
1567 case ERightInnerRect: |
|
1568 { |
|
1569 return &iArrowRightInnerRectForPrtWest; |
|
1570 } |
|
1571 case EUpInnerRect: |
|
1572 { |
|
1573 return &iArrowUpInnerRect; |
|
1574 } |
|
1575 case EDownInnerRect: |
|
1576 { |
|
1577 return &iArrowDownInnerRect; |
|
1578 } |
|
1579 case EBackspaceInnerRect: |
|
1580 { |
|
1581 return &iBackspaceInnerRectForPrtWest; |
|
1582 } |
|
1583 case ECloseInnerRect: |
|
1584 { |
|
1585 return &iCloseInnerRectForPrtWest; |
|
1586 } |
|
1587 case EOptionInnerRect: |
|
1588 { |
|
1589 return &iOptionInnerRectForPrtWest; |
|
1590 } |
|
1591 case EItutPosOk: |
|
1592 { |
|
1593 if ( IsChineseSpellMode()) |
|
1594 { |
|
1595 return &iOkRect; |
|
1596 } |
|
1597 else |
|
1598 { |
|
1599 return &iOKRectForPrtWest; |
|
1600 } |
|
1601 } |
|
1602 case EItutPosCancel: |
|
1603 { |
|
1604 if ( IsChineseSpellMode()) |
|
1605 { |
|
1606 return &iCancelRect; |
|
1607 } |
|
1608 else |
|
1609 { |
|
1610 return &iCancelRectForPrtWest; |
|
1611 } |
|
1612 } |
|
1613 case EBtnTextLine: |
|
1614 { |
|
1615 if ( IsChineseSpellMode()) |
|
1616 { |
|
1617 return &iBtnTextFormat; |
|
1618 } |
|
1619 else |
|
1620 { |
|
1621 return &iBtnOKTextForPrtWest; |
|
1622 } |
|
1623 } |
|
1624 case ESpellTextCancle: |
|
1625 { |
|
1626 if ( IsChineseSpellMode()) |
|
1627 { |
|
1628 return &iBtnTextFormat1; |
|
1629 } |
|
1630 else |
|
1631 { |
|
1632 return &iBtnCancelTextForPrtWest; |
|
1633 } |
|
1634 } |
|
1635 case ESpellICFRect: |
|
1636 { |
|
1637 if ( IsChineseSpellMode()) |
|
1638 { |
|
1639 return &iSpellICFRect; |
|
1640 } |
|
1641 else |
|
1642 { |
|
1643 return &iSpellICFRectForPrtWest; |
|
1644 } |
|
1645 } |
|
1646 case ESpellClrRect: |
|
1647 { |
|
1648 if ( IsChineseSpellMode()) |
|
1649 { |
|
1650 return &iSpellClrRect; |
|
1651 } |
|
1652 else |
|
1653 { |
|
1654 return &iSpellICFBtnRectForPrtWest; |
|
1655 } |
|
1656 } |
|
1657 case ESpellClrInnerRect: |
|
1658 { |
|
1659 if ( IsChineseSpellMode()) |
|
1660 { |
|
1661 return &iSpellClrInnerRect; |
|
1662 } |
|
1663 else |
|
1664 { |
|
1665 return &iSpellICFBtnInnerRectForPrtWest; |
|
1666 } |
|
1667 } |
|
1668 case ESpellEditIndicatorRect: |
|
1669 { |
|
1670 return &iSpellEditIndicator; |
|
1671 } |
|
1672 case ESpellQueryPaneRect: |
|
1673 { |
|
1674 if ( IsChineseSpellMode()) |
|
1675 { |
|
1676 return &iSpellQueryPaneRect; |
|
1677 } |
|
1678 else |
|
1679 { |
|
1680 return &iSpellQueryPaneRectForPrtWest; |
|
1681 } |
|
1682 } |
|
1683 case ELatinOnly: |
|
1684 { |
|
1685 return &iLatinOnly; |
|
1686 } |
|
1687 case EPreviewBubbleRect: |
|
1688 { |
|
1689 return &iPreviewWndRectForPrtWest; |
|
1690 } |
|
1691 case EPreviewBubbleInnerRect: |
|
1692 { |
|
1693 return &iPreviewWndInnerRectForPrtWest; |
|
1694 } |
|
1695 case EPreviewBubbleTextlayout: |
|
1696 { |
|
1697 return &iPreviewWndTextForPrtWest; |
|
1698 } |
|
1699 case EPreviewBubbleFont: |
|
1700 { |
|
1701 return reinterpret_cast<TAny*>(iBubbleFontForPrtWest); |
|
1702 } |
|
1703 case EImIndicatorRect: |
|
1704 { |
|
1705 if (iSpellMode) |
|
1706 { |
|
1707 return &iSpellEditIndicator; |
|
1708 } |
|
1709 |
|
1710 CalWesternIndicator(); |
|
1711 return &iCalindwesternRect; |
|
1712 } |
|
1713 case EImIndicatorOuterRect: |
|
1714 { |
|
1715 return &iImIndiOuterRect; |
|
1716 } |
|
1717 case EIndiPaneWithTextRect: |
|
1718 { |
|
1719 return &iIndiPaneRectWithTextForPrtWest; |
|
1720 } |
|
1721 case EIndiPaneWithoutTextRect: |
|
1722 { |
|
1723 return &iIndiPaneRectWithoutTextForPrtWest; |
|
1724 } |
|
1725 case EIndiIconWithTextRect: |
|
1726 { |
|
1727 return &iIndiIconRectWithTextForPrtWest; |
|
1728 } |
|
1729 case EIndiIconWithoutTextRect: |
|
1730 { |
|
1731 return &iIndiIconRectWithoutTextForPrtWest; |
|
1732 } |
|
1733 case EIndiTextLine: |
|
1734 { |
|
1735 return &iIndiTextForPrtWest; |
|
1736 } |
|
1737 case ESpellIndiPaneWithoutTextRect: |
|
1738 { |
|
1739 return &iSpellIndiPaneWithoutTextForPrtWest; |
|
1740 } |
|
1741 case ESpellIndiIconWithoutTextRect: |
|
1742 { |
|
1743 return &iSpellIndiIconWithoutTextForPrtWest; |
|
1744 } |
|
1745 case ESpellArrowLeft: |
|
1746 { |
|
1747 return &iSpellArrowLeftRectForPrtWest; |
|
1748 } |
|
1749 case ESpellArrowLeftInner: |
|
1750 { |
|
1751 return &iSpellArrowLeftInnerRectForPrtWest; |
|
1752 } |
|
1753 case ESpellArrowRight: |
|
1754 { |
|
1755 return &iSpellArrowRightRectForPrtWest; |
|
1756 } |
|
1757 case ESpellArrowRightInner: |
|
1758 { |
|
1759 return &iSpellArrowRightInnerRectForPrtWest; |
|
1760 } |
|
1761 default: |
|
1762 break; |
|
1763 } |
|
1764 |
|
1765 return NULL; |
|
1766 } |
|
1767 TAny* CGenericItutDataMgr::RequestData(TInt aDataType) |
|
1768 { |
|
1769 if ( IsPortraitWest()) |
|
1770 { |
|
1771 return RequestDataForPortraitWestUIAndChineseSpellUI( aDataType ); |
|
1772 } |
|
1773 switch ( aDataType ) |
|
1774 { |
|
1775 case EScreenSize: |
|
1776 return &iScreenSize; |
|
1777 case ELayoutOffset: |
|
1778 return &iLayoutOffset; |
|
1779 case ELayoutRect: |
|
1780 return &iLayoutRect; |
|
1781 case EIcfRect: |
|
1782 return IsChinese() ? &iIcfChnRect : & iIcfWesRect; |
|
1783 case EIcfFont: |
|
1784 return IsChinese() ? reinterpret_cast<TAny*>(iIcfFontCn) : |
|
1785 reinterpret_cast<TAny*>(iIcfFont); |
|
1786 case EBackspaceRect: |
|
1787 case EItutPosClear: |
|
1788 return IsChinese() ? &iBackspaceCnRect : &iBackspaceRect; |
|
1789 case ESwitchRect: |
|
1790 case EItutPosSwitchLayout: |
|
1791 return IsChinese() ? &iSwitchCnRect : &iSwitchRect; |
|
1792 case EImIndicatorRect: |
|
1793 if (iSpellMode) |
|
1794 { |
|
1795 return &iSpellEditIndicator; |
|
1796 } |
|
1797 |
|
1798 if (IsChinese()) |
|
1799 { |
|
1800 return &iImIndicatorChnRect; |
|
1801 } |
|
1802 CalWesternIndicator(); |
|
1803 return &iCalindwesternRect; |
|
1804 case EImIndicatorOuterRect: |
|
1805 if(IsChinese()) |
|
1806 { |
|
1807 return &iImIndiOuterRectCn; |
|
1808 } |
|
1809 else |
|
1810 { |
|
1811 return &iImIndiOuterRect; |
|
1812 } |
|
1813 case EKeypadRect: |
|
1814 return IsChinese() ? &iKeypadRectCn : &iKeypadRect; |
|
1815 case EKeypadCellRects: |
|
1816 return IsChinese() ? &iKeypadCellRectsCn : &iKeypadCellRects; |
|
1817 case EKeypadLeftTextLine: |
|
1818 return &iVkNumText; |
|
1819 case EKeypadRightTextLine1: |
|
1820 return IsThai() ? &iVkAlphaText1ForThai : &iVkAlphaText1; |
|
1821 case EKeypadRightTextLine2: |
|
1822 return IsThai() ? &iVkAlphaText2ForThai : &iVkAlphaText2; |
|
1823 case EKeypadRightTextLine3: |
|
1824 return IsThai() ? &iVkAlphaText3ForThai : &iVkAlphaText3; |
|
1825 case EDropdownlistUnitWidth: |
|
1826 return &iCandsUnitWidth; |
|
1827 case EDropdownlistUnitHeight: |
|
1828 return &iCandsUnitHeight; |
|
1829 case EDropdownlistHorizontalMargin: |
|
1830 return &iCandsHorizontalMargin; |
|
1831 case EDropdownlistVerticalMargin: |
|
1832 return &iCandsVerticalMargin; |
|
1833 case EDropdownListNaviWidth: |
|
1834 return &iCandsNaviWidth; |
|
1835 case EDropdownListSpinBtnHeight: |
|
1836 return &iCandsSpinBtnHeight; |
|
1837 case EDropdownListSpellLTPos: |
|
1838 return &iCandsSpellLTPos; |
|
1839 case EDropdownListCandsLTPos: |
|
1840 return &iCandsLTPos; |
|
1841 case EDropdownListPuncLTPos: |
|
1842 return &iCandsPuncLTPos; |
|
1843 case EDropdownListFont: |
|
1844 return reinterpret_cast<TAny*>(iCandsFont); |
|
1845 case EDropdownListTextMargin: |
|
1846 return &iCandsTextMargin; |
|
1847 case EDropdownListTextColor: |
|
1848 return &iCandsTextColor; |
|
1849 case ESpellRect: |
|
1850 return &iSpellRect; |
|
1851 case ESpellFont: |
|
1852 return reinterpret_cast<TAny*>(iSpellFont); |
|
1853 case ESpellTextColor: |
|
1854 return &iSpellTextColor; |
|
1855 case ELanguage: |
|
1856 return &iLanguage; |
|
1857 case EInputMode: |
|
1858 return &iInputMode; |
|
1859 case ECase: |
|
1860 return &iCase; |
|
1861 case EChnCandidates: |
|
1862 return &iCandidates; |
|
1863 case EChnPuncCandidates: |
|
1864 return &iPuncCandidates; |
|
1865 case EArrowLeftRect: |
|
1866 case EItutPosArrowLeft: |
|
1867 return IsChinese() ? &iArrowLeftCnRect : &iArrowLeftRect; |
|
1868 case EArrowRightRect: |
|
1869 case EItutPosArrowRight: |
|
1870 return IsChinese() ? &iArrowRightCnRect : &iArrowRightRect; |
|
1871 case EArrowUpRect: |
|
1872 case EItutPosArrowUp: |
|
1873 return &iArrowUpRect; |
|
1874 case EArrowDownRect: |
|
1875 case EItutPosArrowDown: |
|
1876 return &iArrowDownRect; |
|
1877 case EItutPosSend: |
|
1878 return &iSendRect; |
|
1879 case EItutPosDisconn: |
|
1880 return &iDisconnRect; |
|
1881 case EMatchSelectionTlPos: |
|
1882 return &iSelectionTl; |
|
1883 case EMatchSelectionItemSize: |
|
1884 return &iSelectionItemSize; |
|
1885 case EMatchSelectionItemMargin: |
|
1886 return &iSelectionItemMargin; |
|
1887 case EMatchSelectionTextLine: |
|
1888 return &iSelectionTextLine; |
|
1889 case EOptionsRect: |
|
1890 #ifdef LAF_MODIFY |
|
1891 return IsChinese() ? &iOptionsRectCn : &iOptionsRect; |
|
1892 #else |
|
1893 return &iOptionsRect; |
|
1894 #endif |
|
1895 case ECloseRect: |
|
1896 #ifdef LAF_MODIFY |
|
1897 return IsChinese() ? &iCloseRectCn : &iCloseRect; |
|
1898 #else |
|
1899 return &iCloseRect; |
|
1900 #endif |
|
1901 case ESwitchInnerRect: |
|
1902 return IsChinese() ? &iSwitchInnerCnRect : &iSwitchInnerRect; |
|
1903 case ELeftInnerRect: |
|
1904 return IsChinese() ? &iArrowLeftInnerCnRect : &iArrowLeftInnerRect; |
|
1905 case ERightInnerRect: |
|
1906 return IsChinese() ? &iArrowRightInnerCnRect : &iArrowRightInnerRect; |
|
1907 case EBackspaceInnerRect: |
|
1908 return IsChinese() ? &iBackspaceInnerCnRect : &iBackspaceInnerRect; |
|
1909 case EUpInnerRect: |
|
1910 return &iArrowUpInnerRect; |
|
1911 case EDownInnerRect: |
|
1912 return &iArrowDownInnerRect; |
|
1913 case ECloseInnerRect: |
|
1914 #ifdef LAF_MODIFY |
|
1915 return IsChinese() ? &iCloseInnerRectCn : &iCloseInnerRect; |
|
1916 #else |
|
1917 return &iCloseInnerRect; |
|
1918 #endif |
|
1919 case EOptionInnerRect: |
|
1920 #ifdef LAF_MODIFY |
|
1921 return IsChinese() ? &iOptionInnerRectCn : &iOptionInnerRect; |
|
1922 #else |
|
1923 return &iOptionInnerRect; |
|
1924 #endif |
|
1925 case EItutPosOk: |
|
1926 return &iOkRect; |
|
1927 case EItutPosCancel: |
|
1928 return &iCancelRect; |
|
1929 case EBtnTextLine: |
|
1930 return &iBtnTextFormat; |
|
1931 case ESpellTextCancle: |
|
1932 return &iBtnTextFormat1; |
|
1933 case ESpellICFRect: |
|
1934 return &iSpellICFRect; |
|
1935 case ESpellClrRect: |
|
1936 return &iSpellClrRect; |
|
1937 case ESpellClrInnerRect: |
|
1938 return &iSpellClrInnerRect; |
|
1939 case ESpellEditIndicatorRect: |
|
1940 return &iSpellEditIndicator; |
|
1941 case ESpellQueryPaneRect: |
|
1942 return &iSpellQueryPaneRect; |
|
1943 case ELatinOnly: |
|
1944 return &iLatinOnly; |
|
1945 case EPreviewBubbleRect: |
|
1946 return &iPreviewWndRect; |
|
1947 case EPreviewBubbleInnerRect: |
|
1948 return &iPreviewWndInnerRect; |
|
1949 case EPreviewBubbleTextlayout: |
|
1950 return &iPreviewWndText; |
|
1951 case EPreviewBubbleFont: |
|
1952 return reinterpret_cast<TAny*>(iBubbleFont); |
|
1953 default: |
|
1954 break; |
|
1955 } |
|
1956 |
|
1957 return NULL; |
|
1958 } |
|
1959 |
|
1960 CGenericItutDataMgr::CGenericItutDataMgr(MItutLayoutContext* aLayoutContext, |
|
1961 CPtiEngine* aPtiEngine) |
|
1962 : |
|
1963 iPtiEngine( aPtiEngine ), |
|
1964 iLanguage(ELangNone), |
|
1965 iInputMode(KInvalidImMode), |
|
1966 iCase(EAknEditorUpperCase), |
|
1967 iIsChineseSpell( EFalse ), |
|
1968 iLayoutContext(aLayoutContext), |
|
1969 iCurrentScriptIdx(KInvalidIndex), |
|
1970 iLandScape(EFalse), |
|
1971 iSpellMode(EFalse) |
|
1972 { |
|
1973 } |
|
1974 |
|
1975 void CGenericItutDataMgr::NotifySubscriber(MItutPropertySubscriber::TItutProperty aPropertyName, |
|
1976 const TDesC& aValue) |
|
1977 { |
|
1978 for (TInt i = 0; i < iSubscriberList.Count(); i++) |
|
1979 { |
|
1980 TRAP_IGNORE(iSubscriberList[i]->SetPropertyL(aPropertyName, aValue)); |
|
1981 } |
|
1982 } |
|
1983 |
|
1984 void CGenericItutDataMgr::NotifyChangeControlLayout( |
|
1985 MItutPropertySubscriber::TItutProperty aPropertyName, TInt aCtrlResId) |
|
1986 { |
|
1987 TInt ctrlResId = KInvalidResId; |
|
1988 |
|
1989 switch (aPropertyName) |
|
1990 { |
|
1991 case MItutPropertySubscriber::EItutPropertyKeypadResourceId: |
|
1992 { |
|
1993 ctrlResId = iLayoutContext->Control(ECtrlIdStdItut)->ResourceId(); |
|
1994 } |
|
1995 break; |
|
1996 case MItutPropertySubscriber::EItutPropertyCandidateListResourceId: |
|
1997 { |
|
1998 ctrlResId = iLayoutContext->Control(ECtrlIdStdCandsList)->ResourceId(); |
|
1999 } |
|
2000 break; |
|
2001 default: |
|
2002 break; |
|
2003 } |
|
2004 |
|
2005 // since keypad resource divided by script, so maybe ctrlResId unchanged, |
|
2006 // but it is actually changed in different script |
|
2007 if ((ctrlResId != aCtrlResId) || |
|
2008 (aPropertyName == MItutPropertySubscriber::EItutPropertyKeypadResourceId)) |
|
2009 { |
|
2010 TPtrC ptr(reinterpret_cast<TText*>(&aCtrlResId), sizeof(aCtrlResId)/sizeof(TText)); |
|
2011 |
|
2012 NotifySubscriber(aPropertyName, ptr); |
|
2013 } |
|
2014 } |
|
2015 |
|
2016 TInt CGenericItutDataMgr::GetNextPageCandidateL(RPointerArray<HBufC>& aList) |
|
2017 { |
|
2018 if (iPtiEngine && (iPtiEngine->NextCandidatePage())) |
|
2019 { |
|
2020 TItutDataConverter::ConvertChnPhraseCandidateL(iPtiEngine->CandidatePage(), aList); |
|
2021 |
|
2022 return KErrNone; |
|
2023 } |
|
2024 |
|
2025 return KErrNotSupported; |
|
2026 } |
|
2027 |
|
2028 TBool CGenericItutDataMgr::NextPageCandidateExist() |
|
2029 { |
|
2030 if (iPtiEngine) |
|
2031 { |
|
2032 return iPtiEngine->MoreCandidatePages(); |
|
2033 } |
|
2034 |
|
2035 return EFalse; |
|
2036 } |
|
2037 |
|
2038 TInt CGenericItutDataMgr::KeypadResourceId() |
|
2039 { |
|
2040 if (iInputMode == ENumber ) |
|
2041 { |
|
2042 if( IsExistPlusChar() ) |
|
2043 return R_FINGER_INPUT_KEYPAD_NUMBER_WITH_PLUS; |
|
2044 else |
|
2045 return R_FINGER_INPUT_KEYPAD_NUMBER; |
|
2046 } |
|
2047 if( iInputMode == ENativeNumber ) |
|
2048 { |
|
2049 if( IsExistPlusChar() ) |
|
2050 return R_FINGER_INPUT_KEYPAD_NATIVE_NUMBER_WITH_PLUS; |
|
2051 else |
|
2052 return R_FINGER_INPUT_KEYPAD_NATIVE_NUMBER; |
|
2053 } |
|
2054 |
|
2055 if ( iLatinOnly ) |
|
2056 { |
|
2057 if ( iCase == EAknEditorTextCase || iCase == EAknEditorUpperCase ) |
|
2058 { |
|
2059 return R_FINGER_INPUT_KEYPAD_LATINONLY_UPPERCASE; |
|
2060 } |
|
2061 return R_FINGER_INPUT_KEYPAD_LATINONLY_LOWERCASE; |
|
2062 } |
|
2063 |
|
2064 if (!iLangCaseSensitive ) |
|
2065 { |
|
2066 return R_FINGER_INPUT_KEYPAD_ABC; |
|
2067 } |
|
2068 if ( IsChinese() ) |
|
2069 { |
|
2070 return ChineseKeypadResourceId(); |
|
2071 } |
|
2072 if ( IsHindi() ) |
|
2073 { |
|
2074 return HindiKeypadResourceId(); |
|
2075 } |
|
2076 |
|
2077 if ( IsKorean() ) |
|
2078 { |
|
2079 return KoreanKeypadResourceId(); |
|
2080 } |
|
2081 if (iCase == EAknEditorTextCase || iCase == EAknEditorUpperCase) |
|
2082 { |
|
2083 return R_FINGER_INPUT_KEYPAD_ABC_UPPERCASE; |
|
2084 } |
|
2085 else |
|
2086 { |
|
2087 return R_FINGER_INPUT_KEYPAD_ABC_LOWERCASE; |
|
2088 } |
|
2089 } |
|
2090 |
|
2091 TInt CGenericItutDataMgr::ChineseKeypadResourceId() |
|
2092 { |
|
2093 |
|
2094 if (iInputMode == EZhuyin) |
|
2095 { |
|
2096 return R_FINGER_INPUT_KEYPAD_ZHUYIN_STANDBY_PREDICT; |
|
2097 } |
|
2098 if (iInputMode == EPinyin) |
|
2099 { |
|
2100 return R_FINGER_INPUT_KEYPAD_PINYIN_STANDBY_PREDICT; |
|
2101 } |
|
2102 if (iInputMode == EStroke) |
|
2103 { |
|
2104 TInt resID; |
|
2105 if (InputLanguage() == ELangPrcChinese) |
|
2106 { |
|
2107 resID = R_FINGER_INPUT_KEYPAD_STROKE_STANDBY_PREDICT_PRC; |
|
2108 } |
|
2109 else |
|
2110 { |
|
2111 resID = R_FINGER_INPUT_KEYPAD_STROKE_STANDBY_PREDICT_TRA; |
|
2112 } |
|
2113 return resID; |
|
2114 } |
|
2115 |
|
2116 if (iCase == EAknEditorTextCase || iCase == EAknEditorUpperCase) |
|
2117 { |
|
2118 return R_FINGER_INPUT_KEYPAD_ABC_UPPERCASE_CHN; |
|
2119 } |
|
2120 else |
|
2121 { |
|
2122 return R_FINGER_INPUT_KEYPAD_ABC_LOWERCASE_CHN; |
|
2123 } |
|
2124 } |
|
2125 |
|
2126 TInt CGenericItutDataMgr::HindiKeypadResourceId() |
|
2127 { |
|
2128 if ( iInputMode == EHindi ) |
|
2129 { |
|
2130 return R_FINGER_INPUT_KEYPAD_ABC; |
|
2131 } |
|
2132 |
|
2133 if (iCase == EAknEditorTextCase || iCase == EAknEditorUpperCase) |
|
2134 { |
|
2135 return R_FINGER_INPUT_KEYPAD_LATINONLY_UPPERCASE; |
|
2136 } |
|
2137 else |
|
2138 { |
|
2139 return R_FINGER_INPUT_KEYPAD_LATINONLY_LOWERCASE; |
|
2140 } |
|
2141 } |
|
2142 |
|
2143 TInt CGenericItutDataMgr::KoreanKeypadResourceId() |
|
2144 { |
|
2145 if ( iInputMode == EHangul ) |
|
2146 { |
|
2147 return R_FINGER_INPUT_KEYPAD_KOREAN; |
|
2148 } |
|
2149 |
|
2150 if (iCase == EAknEditorTextCase || iCase == EAknEditorUpperCase) |
|
2151 { |
|
2152 return R_FINGER_INPUT_KEYPAD_LATINONLY_UPPERCASE; |
|
2153 } |
|
2154 else |
|
2155 { |
|
2156 return R_FINGER_INPUT_KEYPAD_LATINONLY_LOWERCASE; |
|
2157 } |
|
2158 } |
|
2159 |
|
2160 |
|
2161 TInt CGenericItutDataMgr::GetConfigResFileName(TInt aLang) |
|
2162 { |
|
2163 iResourceFilename.Zero(); |
|
2164 iResourceFilename = KConfigResourceFile(); |
|
2165 |
|
2166 for (TInt i = 0; i < sizeof(TScriptMapping) / sizeof(TScriptMapping[0]); i++) |
|
2167 { |
|
2168 TScriptInfo script = TScriptMapping[i]; |
|
2169 |
|
2170 if (FindLang(&(LangsArr[script.iStartIdx]), script.iEndIdx - script.iStartIdx, aLang) != |
|
2171 KErrNotFound) |
|
2172 { |
|
2173 iResourceFilename.Append(ResFileExtByScriptIdx(script.iScriptExt)); |
|
2174 iResourceFilename.Append(KResourceFileExtName); |
|
2175 iLangCaseSensitive = script.iCaseSensitive; |
|
2176 return i; |
|
2177 } |
|
2178 } |
|
2179 |
|
2180 // default resource file is latin |
|
2181 iResourceFilename.Append(ResFileExtByScriptIdx(TScriptMapping[0].iScriptExt)); |
|
2182 iResourceFilename.Append(KResourceFileExtName); |
|
2183 iLangCaseSensitive = TScriptMapping[0].iCaseSensitive; |
|
2184 return 0; |
|
2185 } |
|
2186 |
|
2187 TInt CGenericItutDataMgr::FindLang(const TInt* aArray, |
|
2188 TInt aEndIdx, |
|
2189 TInt aLang) |
|
2190 { |
|
2191 for (TInt i = 0; i <= aEndIdx; i++) |
|
2192 { |
|
2193 if (aLang == *aArray) |
|
2194 { |
|
2195 return i; |
|
2196 } |
|
2197 |
|
2198 aArray++; |
|
2199 } |
|
2200 |
|
2201 return KErrNotFound; |
|
2202 } |
|
2203 |
|
2204 TBool CGenericItutDataMgr::IsChinese() |
|
2205 { |
|
2206 return (iLanguage == ELangPrcChinese || iLanguage == ELangHongKongChinese |
|
2207 || iLanguage == ELangTaiwanChinese); |
|
2208 } |
|
2209 |
|
2210 // tp teleca addon |
|
2211 TBool CGenericItutDataMgr::IsKorean() |
|
2212 { |
|
2213 return ( iLanguage == ELangKorean ); |
|
2214 } |
|
2215 |
|
2216 TBool CGenericItutDataMgr::IsHindi() |
|
2217 { |
|
2218 return ( iLanguage == ELangHindi ); |
|
2219 } |
|
2220 |
|
2221 TBool CGenericItutDataMgr::IsThai() |
|
2222 { |
|
2223 return ( iLanguage == ELangThai ); |
|
2224 } |
|
2225 |
|
2226 TBool CGenericItutDataMgr::IsRtoLLanguage() |
|
2227 { |
|
2228 return ( iLanguage == ELangArabic || |
|
2229 iLanguage == ELangHebrew || |
|
2230 iLanguage == ELangFarsi || |
|
2231 iLanguage == ELangUrdu ); |
|
2232 } |
|
2233 |
|
2234 TBool CGenericItutDataMgr::IsRtoLLanguage( TInt aLanguage ) |
|
2235 { |
|
2236 return ( aLanguage == ELangArabic || |
|
2237 aLanguage == ELangHebrew || |
|
2238 aLanguage == ELangFarsi || |
|
2239 aLanguage == ELangUrdu ); |
|
2240 } |
|
2241 |
|
2242 TBool CGenericItutDataMgr::IsLangDirectionSwitch() const |
|
2243 { |
|
2244 return iIsLangDirectionSwitch; |
|
2245 } |
|
2246 |
|
2247 const TDesC& CGenericItutDataMgr::ResFileExtByScriptIdx(const TScriptExtIndex aIndex) |
|
2248 { |
|
2249 switch (aIndex) |
|
2250 { |
|
2251 case ELatinExt: |
|
2252 return KLatinExt; |
|
2253 case ECyrillicExt: |
|
2254 return KCyrillicExt; |
|
2255 case EGreekExt: |
|
2256 return KGreekExt; |
|
2257 case EHebrewExt: |
|
2258 return KHebrewExt; |
|
2259 case EArabicExt: |
|
2260 return KArabicExt; |
|
2261 case EFarsiExt: |
|
2262 return KFarsiExt; |
|
2263 case EUrduExt: |
|
2264 return KUrduExt; |
|
2265 case EThaiExt: |
|
2266 return KThaiExt; |
|
2267 case EChnExt: |
|
2268 return KChnExt; |
|
2269 case EDevanagiriExt: |
|
2270 return KDevanagiriExt; |
|
2271 case EHangulExt: |
|
2272 return KHangulExt; |
|
2273 default: |
|
2274 break; |
|
2275 } |
|
2276 |
|
2277 return KNullDesC; |
|
2278 } |
|
2279 |
|
2280 void CGenericItutDataMgr::SetUpdate(TBool aNeedUpdate) |
|
2281 { |
|
2282 iNeedUpdate = aNeedUpdate; |
|
2283 } |
|
2284 |
|
2285 TBool CGenericItutDataMgr::IsUpdate() const |
|
2286 { |
|
2287 return iNeedUpdate; |
|
2288 } |
|
2289 |
|
2290 void CGenericItutDataMgr::CalWesternIndicator() |
|
2291 { |
|
2292 TSize indSize(iImIndicatorWesRect.Width() * 5 / 6, iImIndicatorWesRect.Height() * 5 / 6); |
|
2293 |
|
2294 TInt offsetX = ( iImIndicatorWesRect.Width() - indSize.iWidth ) / 2; |
|
2295 TInt offsetY = ( iImIndicatorWesRect.Height() - indSize.iHeight ) / 2; |
|
2296 |
|
2297 TInt x = iImIndicatorWesRect.iTl.iX + offsetX; |
|
2298 TInt y = iImIndicatorWesRect.iTl.iY + offsetY; |
|
2299 |
|
2300 iCalindwesternRect.SetRect(TPoint(x,y) , indSize); |
|
2301 } |
|
2302 |
|
2303 void CGenericItutDataMgr::SetNumericKeymap( const TInt aKeymap ) |
|
2304 { |
|
2305 iNumericKeymap = aKeymap; |
|
2306 } |
|
2307 |
|
2308 void CGenericItutDataMgr::SetNumericKeymapData( TInt* aKeymapData ) |
|
2309 { |
|
2310 delete iNumericKeymapData; |
|
2311 TInt* len = (TInt*)((TUint8*)aKeymapData - 4); |
|
2312 TPtrC16 keymapRes((const TUint16*)aKeymapData, *len/2); |
|
2313 iNumericKeymapData = keymapRes.Alloc(); |
|
2314 } |
|
2315 |
|
2316 TBool CGenericItutDataMgr::IsExistPlusChar() |
|
2317 { |
|
2318 if( !IsNumericOnly() ) |
|
2319 { |
|
2320 return EFalse; |
|
2321 } |
|
2322 if ( iNumericKeymap == EKeymapFromResource ) |
|
2323 { |
|
2324 HBufC* keyRes = iNumericKeymapData; |
|
2325 if( keyRes != NULL && keyRes->Locate( TChar( KPlusChar ) ) != KErrNotFound ) |
|
2326 { |
|
2327 return ETrue; |
|
2328 } |
|
2329 } |
|
2330 else if ( iNumericKeymap == EAknEditorStandardNumberModeKeymap |
|
2331 || iNumericKeymap == EAknEditorConverterNumberModeKeymap |
|
2332 || iNumericKeymap == EAknEditorCalculatorNumberModeKeymap |
|
2333 || iNumericKeymap == EAknEditorToFieldNumberModeKeymap |
|
2334 || iNumericKeymap == EAknEditorFixedDiallingNumberModeKeymap |
|
2335 || iNumericKeymap == EAknEditorSATNumberModeKeymap ) |
|
2336 { |
|
2337 return ETrue; |
|
2338 } |
|
2339 return EFalse; |
|
2340 } |
|
2341 |
|
2342 // End Of File |