textinput/peninputgenericitut/src/peninputgenericitutdatamgr.cpp
branchRCL_3
changeset 12 4eb1ae11334f
parent 10 6defe5d1bd39
child 14 e6a39382bb9c
equal deleted inserted replaced
10:6defe5d1bd39 12:4eb1ae11334f
   180 void CGenericItutDataMgr::ReadLafInfoForPrtWest()
   180 void CGenericItutDataMgr::ReadLafInfoForPrtWest()
   181 	{
   181 	{
   182 	// Screen
   182 	// Screen
   183 	TRect rect;
   183 	TRect rect;
   184 
   184 
   185 	AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EApplicationWindow, rect);
   185 	rect = AknLayoutScalable_Avkon::application_window(0).LayoutLine().Rect();
   186 
   186 
   187 	TAknWindowLineLayout mainWnd, bottomWnd, bottomPane;
   187 	TAknWindowLineLayout mainWnd, bottomWnd, bottomPane;
   188 	TAknLayoutRect mainWndRect, bottomwndtrect, bottompanerect;
   188 	TAknLayoutRect mainWndRect, bottomwndtrect, bottompanerect;
   189 
   189 
   190 	mainWnd = AknLayoutScalable_Avkon::main_fep_vtchi_ss_pane(0).LayoutLine();
   190 	mainWnd = AknLayoutScalable_Avkon::main_fep_vtchi_ss_pane(0).LayoutLine();
   297 								cell_ituss_key_pane_g2( 0 ).LayoutLine();
   297 								cell_ituss_key_pane_g2( 0 ).LayoutLine();
   298 				TAknLayoutRect shiftIconRect;
   298 				TAknLayoutRect shiftIconRect;
   299 				shiftIconRect.LayoutRect( keyrect, shiftIcon );                
   299 				shiftIconRect.LayoutRect( keyrect, shiftIcon );                
   300 				iShiftIconRectForPrtWest = shiftIconRect.Rect();          
   300 				iShiftIconRectForPrtWest = shiftIconRect.Rect();          
   301 				}    
   301 				}    
       
   302 
       
   303 			// read star icon rect
       
   304 			if( i == 3 &&  j == 0 )
       
   305 				{
       
   306 				TAknWindowLineLayout starIcon =  AknLayoutScalable_Avkon::
       
   307 								cell_ituss_key_pane_g2( 0 ).LayoutLine();
       
   308 				TAknLayoutRect starIconRect;
       
   309 				starIconRect.LayoutRect( keyrect, starIcon );                
       
   310 				iStarIconRectForPrtWest = starIconRect.Rect();          
       
   311 				}			
       
   312 			
   302 			}
   313 			}
   303 		} 
   314 		} 
   304 	 
   315 	 
   305 
   316 
   306 	// Num text row
   317 	// Num text row
   307 	iVkBigNumTextForPrtWest = AknLayoutScalable_Avkon::cell_ituss_key_t1(0).LayoutLine(); 
   318 	iVkBigNumTextForPrtWest = AknLayoutScalable_Avkon::cell_ituss_key_t1(4).LayoutLine(); 
   308 	iVkNumTextForPrtWest = AknLayoutScalable_Avkon::cell_ituss_key_t1(1).LayoutLine();
   319 	iVkNumTextForPrtWest = AknLayoutScalable_Avkon::cell_ituss_key_t1(1).LayoutLine();
   309 	
   320 	
   310 	// Key text row 1                               
   321 	// Key text row 1                               
   311 	iVkAlphaText1ForPrtWest = AknLayoutScalable_Avkon::cell_ituss_key_t2(1).LayoutLine();
   322 	iVkAlphaText1ForPrtWest = AknLayoutScalable_Avkon::cell_ituss_key_t2(1).LayoutLine();
   312 	// Key text row 3
   323 	// Key text row 3
   381 		AknLayoutScalable_Avkon::popup_fshwr2_char_preview_window_t1(0).LayoutLine();
   392 		AknLayoutScalable_Avkon::popup_fshwr2_char_preview_window_t1(0).LayoutLine();
   382 	previewWndText.LayoutText(previewWndRect.Rect(), iPreviewWndTextForPrtWest);
   393 	previewWndText.LayoutText(previewWndRect.Rect(), iPreviewWndTextForPrtWest);
   383 	iBubbleFontForPrtWest = const_cast<CFont*>(previewWndText.Font());	
   394 	iBubbleFontForPrtWest = const_cast<CFont*>(previewWndText.Font());	
   384 	
   395 	
   385 	// LAF for spell mode
   396 	// LAF for spell mode
   386 	TAknWindowLineLayout btnPaneWnd, okBtnWnd, cancelBtnWnd, spellwnd;
   397 	TAknWindowLineLayout spellwnd;
   387 	TAknLayoutRect btnPaneRect, okBtnRect, cancelBtnRect, spellwndtrect;
   398 	TAknLayoutRect okBtnRect, cancelBtnRect, spellwndtrect;
   388 	
   399 	
   389 	iSpellQueryPaneRectForPrtWest = mainWndRect.Rect();
   400 	iSpellQueryPaneRectForPrtWest = mainWndRect.Rect();
   390 	
   401 	
   391     spellwnd = AknLayoutScalable_Avkon::popup_fep_ituss_window(1).LayoutLine();
   402     spellwnd = AknLayoutScalable_Avkon::popup_fep_ituss_window(1).LayoutLine();
   392     spellwndtrect.LayoutRect( mainWndRect.Rect(), spellwnd ); 
   403     spellwndtrect.LayoutRect( mainWndRect.Rect(), spellwnd ); 
   393     
   404 	
   394 	btnPaneWnd = AknLayoutScalable_Avkon::ituss_sks_pane(0).LayoutLine();
   405 	TAknWindowLineLayout queryTopPane, queryICFPane, icfSpellIndiPane, 
   395 	btnPaneRect.LayoutRect( spellwndtrect.Rect(), btnPaneWnd );
   406 		middleInnerBtn, middleBtn, bottomInnerBtn;
   396 	
       
   397 	okBtnWnd = AknLayoutScalable_Avkon::ituss_sks_pane_g1(0).LayoutLine();
       
   398 	okBtnRect.LayoutRect( btnPaneRect.Rect(), okBtnWnd );
       
   399 	iOKRectForPrtWest = okBtnRect.Rect();
       
   400 	
       
   401 	cancelBtnWnd = AknLayoutScalable_Avkon::ituss_sks_pane_g2(0).LayoutLine();
       
   402 	cancelBtnRect.LayoutRect( btnPaneRect.Rect(), cancelBtnWnd );
       
   403 	iCancelRectForPrtWest = cancelBtnRect.Rect();
       
   404 	
       
   405 	iBtnOKTextForPrtWest = AknLayoutScalable_Avkon::ituss_sks_pane_t1(0).LayoutLine();
       
   406 	iBtnCancelTextForPrtWest = AknLayoutScalable_Avkon::ituss_sks_pane_t2(0).LayoutLine();
       
   407 	
       
   408 	iBtnOKTextForPrtWest.ir = 7;
       
   409 	iBtnCancelTextForPrtWest.ir = 7;
       
   410 	
       
   411 	iBtnCancelTextForPrtWest = iBtnOKTextForPrtWest;
       
   412 	
       
   413 	TAknWindowLineLayout queryTopPane, queryICFPane, icfSpellIndiPane, middleInnerBtn;
       
   414 	TAknLayoutRect queryTopPaneRect, queryICFPaneRect, icfSpellIndiPaneRect, 
   407 	TAknLayoutRect queryTopPaneRect, queryICFPaneRect, icfSpellIndiPaneRect, 
   415 		middleButton, middleInnerRect;
   408 		bottomButton, bottomInnerRect, middleBtnRect;
   416 	
   409 	
   417 	queryTopPane = AknLayoutScalable_Avkon::popup_fep_vtchi_icf_pane(1).LayoutLine();
   410 	queryTopPane = AknLayoutScalable_Avkon::popup_fep_vtchi_icf_pane(1).LayoutLine();
   418 	queryTopPaneRect.LayoutRect( mainWndRect.Rect(), queryTopPane );
   411 	queryTopPaneRect.LayoutRect( mainWndRect.Rect(), queryTopPane );
   419 	
   412 	
   420 	queryICFPane = AknLayoutScalable_Avkon::vtchi_query_pane(0).LayoutLine();
   413 	queryICFPane = AknLayoutScalable_Avkon::vtchi_query_pane(0).LayoutLine();
   421 	queryICFPaneRect.LayoutRect( queryTopPaneRect.Rect(), queryICFPane );
   414 	queryICFPaneRect.LayoutRect( queryTopPaneRect.Rect(), queryICFPane );
   422 	iSpellICFRectForPrtWest = queryICFPaneRect.Rect();
   415 	iSpellICFRectForPrtWest = queryICFPaneRect.Rect();
   423 	
   416 	
       
   417 	// Middle pane
   424 	TRect middleButtonPaneRect = spellwndtrect.Rect();
   418 	TRect middleButtonPaneRect = spellwndtrect.Rect();
   425 	middleButtonPaneRect.Move( 5, 3 );
   419 	middleButtonPaneRect.Move( 5, 2 );
   426 	
   420 	
       
   421 	middleBtn = AknLayoutScalable_Avkon::cell_ituss_key_pane(3).LayoutLine();
       
   422 	middleBtnRect.LayoutRect( bottompanerect.Rect(), middleBtn );
       
   423 	middleInnerBtn = AknLayoutScalable_Avkon::bg_cell_ituss_key_g1(5).LayoutLine();
       
   424 	
       
   425 	TRect cellMiddleRect;
       
   426 	cellMiddleRect.iTl = middleButtonPaneRect.iTl;
       
   427 	cellMiddleRect.SetHeight( middleBtnRect.Rect().Height());
       
   428 	cellMiddleRect.SetWidth( middleBtnRect.Rect().Width());
       
   429 	
       
   430 	// OK button
       
   431 	okBtnRect.LayoutRect( cellMiddleRect, middleInnerBtn );
       
   432 	iOKRectForPrtWest = okBtnRect.Rect();
       
   433 	
       
   434 	// Cancel button
       
   435 	cellMiddleRect.Move( middleBtnRect.Rect().Width(), 0 );
       
   436 	
       
   437 	cancelBtnRect.LayoutRect( cellMiddleRect, middleInnerBtn );
       
   438 	iCancelRectForPrtWest = cancelBtnRect.Rect();
       
   439 	
       
   440 	iBtnOKTextForPrtWest = AknLayoutScalable_Avkon::ituss_sks_pane_t1(0).LayoutLine();
       
   441 	iBtnCancelTextForPrtWest = AknLayoutScalable_Avkon::ituss_sks_pane_t2(0).LayoutLine();
       
   442 	
       
   443 	iBtnOKTextForPrtWest.ir = 7;
       
   444 	iBtnCancelTextForPrtWest.ir = 7;
       
   445 	
       
   446 	iBtnCancelTextForPrtWest = iBtnOKTextForPrtWest;
       
   447 	
       
   448 	// Bottom pane
   427 	TRect cellSpellRect;
   449 	TRect cellSpellRect;
   428 	cellSpellRect.iTl = middleButtonPaneRect.iTl;
   450 	cellSpellRect.iTl.iX = middleButtonPaneRect.iTl.iX;
       
   451 	cellSpellRect.iTl.iY = middleButtonPaneRect.iTl.iY + 
       
   452 			itucellrect.Rect().Height() * 5 + 10;
   429 	cellSpellRect.SetHeight( itucellrect.Rect().Height());
   453 	cellSpellRect.SetHeight( itucellrect.Rect().Height());
   430 	cellSpellRect.SetWidth( itucellrect.Rect().Width());
   454 	cellSpellRect.SetWidth( itucellrect.Rect().Width());
   431 
   455 		
   432 	// Left
   456 	// Left
   433 	middleButton.LayoutRect( cellSpellRect, ituinnercell );
   457 	bottomButton.LayoutRect( cellSpellRect, ituinnercell );
   434 	iSpellArrowLeftRectForPrtWest = middleButton.Rect();
   458 	iSpellArrowLeftRectForPrtWest = bottomButton.Rect();
   435 	
   459 	
   436 	middleInnerBtn = AknLayoutScalable_Avkon::cell_ituss_key_pane_g1(2).LayoutLine();
   460 	bottomInnerBtn = AknLayoutScalable_Avkon::cell_ituss_key_pane_g1(2).LayoutLine();
   437 	middleInnerRect.LayoutRect( middleButton.Rect(), middleInnerBtn );
   461 	bottomInnerRect.LayoutRect( bottomButton.Rect(), bottomInnerBtn );
   438 	iSpellArrowLeftInnerRectForPrtWest = middleInnerRect.Rect();
   462 	iSpellArrowLeftInnerRectForPrtWest = bottomInnerRect.Rect();
   439 	
   463 	
   440 	// Right
   464 	// Right
   441 	cellSpellRect.Move( itucellrect.Rect().Width(), 0 );
   465 	cellSpellRect.Move( itucellrect.Rect().Width(), 0 );
   442 	middleButton.LayoutRect( cellSpellRect, ituinnercell );
   466 	bottomButton.LayoutRect( cellSpellRect, ituinnercell );
   443 	iSpellArrowRightRectForPrtWest = middleButton.Rect();
   467 	iSpellArrowRightRectForPrtWest = bottomButton.Rect();
   444 	
   468 	
   445 	middleInnerRect.LayoutRect( middleButton.Rect(), middleInnerBtn );
   469 	bottomInnerRect.LayoutRect( bottomButton.Rect(), bottomInnerBtn );
   446 	iSpellArrowRightInnerRectForPrtWest = middleInnerRect.Rect();
   470 	iSpellArrowRightInnerRectForPrtWest = bottomInnerRect.Rect();
   447 	
   471 	
   448 	// BackSpace
   472 	// BackSpace
   449 	cellSpellRect.Move( itucellrect.Rect().Width(), 0 );
   473 	cellSpellRect.Move( itucellrect.Rect().Width(), 0 );
   450 	middleButton.LayoutRect( cellSpellRect, ituinnercell );
   474 	bottomButton.LayoutRect( cellSpellRect, ituinnercell );
   451 	iSpellICFBtnRectForPrtWest = middleButton.Rect();
   475 	iSpellICFBtnRectForPrtWest = bottomButton.Rect();
   452 	
   476 	
   453 	middleInnerRect.LayoutRect( middleButton.Rect(), middleInnerBtn );
   477 	bottomInnerRect.LayoutRect( bottomButton.Rect(), bottomInnerBtn );
   454 	iSpellICFBtnInnerRectForPrtWest = middleInnerRect.Rect();
   478 	iSpellICFBtnInnerRectForPrtWest = bottomInnerRect.Rect();
   455 	
   479 	
   456 	iSpellText1ForPrtWest = AknLayoutScalable_Avkon::vtchi_query_pane_t1(0).LayoutLine();
   480 	//iSpellText1ForPrtWest = AknLayoutScalable_Avkon::vtchi_query_pane_t1(0).LayoutLine();
   457 	iSpellText2ForPrtWest = AknLayoutScalable_Avkon::vtchi_query_pane_t2(0).LayoutLine();
   481 	iSpellText1ForPrtWest = AknLayoutScalable_Avkon::vtchi_icf_list_pane_t1(0, 0, 0).LayoutLine();
       
   482 	//iSpellText2ForPrtWest = AknLayoutScalable_Avkon::vtchi_query_pane_t2(0).LayoutLine();
       
   483 	iSpellText2ForPrtWest = AknLayoutScalable_Avkon::vtchi_icf_list_pane_t1(0, 0, 1).LayoutLine();
   458 	iSpellText3ForPrtWest = AknLayoutScalable_Avkon::vtchi_query_pane_t3(0).LayoutLine();
   484 	iSpellText3ForPrtWest = AknLayoutScalable_Avkon::vtchi_query_pane_t3(0).LayoutLine();
       
   485 	
       
   486 	iSpellIcfTextLeftMarginForPrtWest = iSpellText1ForPrtWest.il;
       
   487 	iSpellIcfTextRightMarginForPrtWest = iSpellIcfTextLeftMarginForPrtWest;
   459 	
   488 	
   460 	iSpellIcfFontForPrtWest = const_cast<CFont*>(
   489 	iSpellIcfFontForPrtWest = const_cast<CFont*>(
   461 	        AknLayoutUtils::FontFromId(iSpellText1ForPrtWest.iFont, NULL));
   490 	        AknLayoutUtils::FontFromId(iSpellText1ForPrtWest.iFont, NULL));
   462 	
   491 	
   463 	TAknLayoutText cSpelltxt1;
   492 	TAknLayoutText cSpelltxt1, cSpelltxt2;
   464 	cSpelltxt1.LayoutText( queryICFPaneRect.Rect(), iSpellText1ForPrtWest );
   493 	cSpelltxt1.LayoutText( queryICFPaneRect.Rect(), iSpellText1ForPrtWest );
       
   494 	cSpelltxt2.LayoutText( queryICFPaneRect.Rect(), iSpellText2ForPrtWest );
       
   495 	
       
   496 	iSpellIcfTextTopMarginForPrtWest = 
       
   497 			cSpelltxt1.TextRect().iTl.iY - queryICFPaneRect.Rect().iTl.iY;
       
   498 	
       
   499 	iSpellIcfTextLineSpaceMarginForPrtWest = 
       
   500 			cSpelltxt2.TextRect().iTl.iY - cSpelltxt1.TextRect().iBr.iY;
       
   501 	
   465 	iSpellIcfTextHeightForPrtWest = cSpelltxt1.TextRect().Height();
   502 	iSpellIcfTextHeightForPrtWest = cSpelltxt1.TextRect().Height();
   466 	
   503 	
       
   504 	TInt maxSpellRow = ( iSpellICFRectForPrtWest.Height() - iSpellIcfTextTopMarginForPrtWest ) 
       
   505 	        / ( iSpellIcfTextHeightForPrtWest + iSpellIcfTextLineSpaceMarginForPrtWest );
       
   506 	
       
   507 	iSpellIcfTextBottomMarginForPrtWest = 
       
   508 			iSpellICFRectForPrtWest.Height() - 
       
   509 			( iSpellIcfTextHeightForPrtWest + iSpellIcfTextLineSpaceMarginForPrtWest ) 
       
   510 	        * maxSpellRow - iSpellIcfTextTopMarginForPrtWest;
   467 	
   511 	
   468 	icfSpellIndiPane = AknLayoutScalable_Avkon::icf_edit_indi_pane(0).LayoutLine();
   512 	icfSpellIndiPane = AknLayoutScalable_Avkon::icf_edit_indi_pane(0).LayoutLine();
   469 	icfSpellIndiPaneRect.LayoutRect(queryICFPaneRect.Rect(), icfSpellIndiPane);
   513 	icfSpellIndiPaneRect.LayoutRect(queryICFPaneRect.Rect(), icfSpellIndiPane);
   470 	iSpellIndiPaneWithoutTextForPrtWest = icfSpellIndiPaneRect.Rect();
   514 	iSpellIndiPaneWithoutTextForPrtWest = icfSpellIndiPaneRect.Rect();
   471 	iSpellIndiIconWithoutTextForPrtWest = TRect( 0, 0, 50, 17 );
   515 	iSpellIndiIconWithoutTextForPrtWest = TRect( 0, 0, 50, 17 );
   472 	}
   516 	}
       
   517 
   473 void CGenericItutDataMgr::ReadLafInfo()
   518 void CGenericItutDataMgr::ReadLafInfo()
   474     {
   519     {
   475     // Screen
   520     // Screen
   476     TRect rect, rectcn;
   521     TRect rect, rectcn;
   477     AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EScreen, rect);
   522     AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EScreen, rect);
  1125             
  1170             
  1126             if (IsChinese())
  1171             if (IsChinese())
  1127                 {
  1172                 {
  1128                 iLayoutContext->UiManager()->CreateChineseSpecificCtrlsIfNeededL();
  1173                 iLayoutContext->UiManager()->CreateChineseSpecificCtrlsIfNeededL();
  1129                 }
  1174                 }
       
  1175             
       
  1176             if( IsKorean())
       
  1177             	{
       
  1178                 iLayoutContext->UiManager()->CreateKoreanSpecificCtrlsIfNeededL();
       
  1179             	}
  1130 
  1180 
  1131             NotifyChangeControlLayout(MItutPropertySubscriber::EItutPropertyKeypadResourceId, 
  1181             NotifyChangeControlLayout(MItutPropertySubscriber::EItutPropertyKeypadResourceId, 
  1132                                       KeypadResourceId());  
  1182                                       KeypadResourceId());  
  1133             }
  1183             }
  1134         }
  1184         }