textinput/peninputsplititut/src/peninputsplititutdatamgr.cpp
branchRCL_3
changeset 12 4eb1ae11334f
parent 7 a47de9135b21
child 14 e6a39382bb9c
equal deleted inserted replaced
10:6defe5d1bd39 12:4eb1ae11334f
   147 // ---------------------------------------------------------------------------
   147 // ---------------------------------------------------------------------------
   148 //
   148 //
   149 void CSplitItutDataMgr::ReadLafInfo()
   149 void CSplitItutDataMgr::ReadLafInfo()
   150     {
   150     {
   151     // Screen
   151     // Screen
   152     TRect rect, rectcn;
   152     TRect rect;
   153     AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EScreen, rect);
   153 	rect = AknLayoutScalable_Avkon::application_window(0).LayoutLine().Rect();
   154     iScreenSize = rect.Size();
   154     iScreenSize = rect.Size();
   155 
       
   156     AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EApplicationWindow, rect);
       
   157 
   155 
   158     // finger Layout
   156     // finger Layout
   159     TAknWindowLineLayout splitwnd, splitpane;
   157     TAknWindowLineLayout splitwnd, splitpane;
   160     TAknLayoutRect spliwndtrect, splitpanerect;
   158     TAknLayoutRect spliwndtrect, splitpanerect;
   161 
   159 
   210                 TAknWindowLineLayout shiftIcon =  AknLayoutScalable_Avkon::
   208                 TAknWindowLineLayout shiftIcon =  AknLayoutScalable_Avkon::
   211                                 cell_ituss_key_pane_g2( 0 ).LayoutLine();
   209                                 cell_ituss_key_pane_g2( 0 ).LayoutLine();
   212                 TAknLayoutRect shiftIconRect;
   210                 TAknLayoutRect shiftIconRect;
   213                 shiftIconRect.LayoutRect( keyrect, shiftIcon );                
   211                 shiftIconRect.LayoutRect( keyrect, shiftIcon );                
   214                 iShiftIconRect = shiftIconRect.Rect();          
   212                 iShiftIconRect = shiftIconRect.Rect();          
   215                 }    
   213                 }
       
   214             
       
   215             // read star icon rect
       
   216             if( i == 3 &&  j == 2 )
       
   217                 {
       
   218                 TAknWindowLineLayout starIcon =  AknLayoutScalable_Avkon::
       
   219                                 cell_ituss_key_pane_g2( 0 ).LayoutLine();
       
   220                 TAknLayoutRect starIconRect;
       
   221                 starIconRect.LayoutRect( keyrect, starIcon );                
       
   222                 iStarIconRect = starIconRect.Rect();          
       
   223                 }            
       
   224             
   216             }
   225             }
   217         } 
   226         } 
   218      
   227      
   219 
   228 
   220     iVkNumText = AknLayoutScalable_Avkon::cell_ituss_key_t1(0).LayoutLine(); 
   229     iVkBigNumTextForPrtWest = AknLayoutScalable_Avkon::cell_ituss_key_t1(4).LayoutLine(); 
       
   230     
       
   231     iVkNumText = AknLayoutScalable_Avkon::cell_ituss_key_t1(1).LayoutLine(); 
   221     // Key text row 1                               
   232     // Key text row 1                               
   222     iVkAlphaText1 = AknLayoutScalable_Avkon::cell_ituss_key_t2(0).LayoutLine();
   233     iVkAlphaText1 = AknLayoutScalable_Avkon::cell_ituss_key_t2(1).LayoutLine();
   223     iVkAlphaText3 = AknLayoutScalable_Avkon::cell_ituss_key_t4(0).LayoutLine();                                                              
   234     iVkAlphaText3 = AknLayoutScalable_Avkon::cell_ituss_key_t4(1).LayoutLine();                                                              
   224     // Key text row 2                               
   235     // Key text row 2                               
   225     iVkAlphaText2 = AknLayoutScalable_Avkon::cell_ituss_key_t3(0).LayoutLine();
   236     iVkAlphaText2 = AknLayoutScalable_Avkon::cell_ituss_key_t3(1).LayoutLine();
   226     
   237     
   227     // close button
   238     // close button
   228     TAknWindowLineLayout funcbtn, funcbtnbg, funcbtninner;
   239     TAknWindowLineLayout funcbtn, funcbtnbg, funcbtninner;
   229     TAknLayoutRect funcrect, funcbgrect, funcinnerrect, arrowleftinnerrect, arrowrightinnerrect;
   240     TAknLayoutRect funcrect, funcbgrect, funcinnerrect, arrowleftinnerrect, arrowrightinnerrect;
   230     TAknLayoutRect optioninnerrect, backspaceinnerrect;
   241     TAknLayoutRect optioninnerrect, backspaceinnerrect;
   292         AknLayoutScalable_Avkon::popup_fshwr2_char_preview_window_t1(0).LayoutLine();
   303         AknLayoutScalable_Avkon::popup_fshwr2_char_preview_window_t1(0).LayoutLine();
   293     previewWndText.LayoutText(previewWndRect.Rect(), iPreviewWndText);
   304     previewWndText.LayoutText(previewWndRect.Rect(), iPreviewWndText);
   294     iBubbleFont = const_cast<CFont*>(previewWndText.Font());
   305     iBubbleFont = const_cast<CFont*>(previewWndText.Font());
   295     
   306     
   296     // for spell window
   307     // for spell window
   297     // OK and Cancel button
   308     TAknWindowLineLayout spellwnd;
   298     TAknWindowLineLayout spellwnd, softkeypane, okkeypane, cancelkeypane  ;
   309     TAknLayoutRect spellwndtrect;
   299     TAknLayoutRect spellwndtrect, softkeypanerect, okkeyRect, cancelkeyRect  ;
       
   300 
   310 
   301     spellwnd = AknLayoutScalable_Avkon::popup_fep_ituss_window(1).LayoutLine();
   311     spellwnd = AknLayoutScalable_Avkon::popup_fep_ituss_window(1).LayoutLine();
   302     spellwndtrect.LayoutRect(rect, spellwnd);    
   312     spellwndtrect.LayoutRect(rect, spellwnd);    
   303     
   313     
   304     softkeypane = AknLayoutScalable_Avkon::ituss_sks_pane().LayoutLine();
       
   305     softkeypanerect.LayoutRect(spellwndtrect.Rect(), softkeypane);
       
   306     
       
   307     okkeypane = AknLayoutScalable_Avkon::ituss_sks_pane_g1().LayoutLine();
       
   308     okkeyRect.LayoutRect(softkeypanerect.Rect(), okkeypane);
       
   309     iOkRect = okkeyRect.Rect();
       
   310     
       
   311     iSpellBtnTextFormat = AknLayoutScalable_Avkon::ituss_sks_pane_t1().LayoutLine();
       
   312     iSpellBtnTextFormat.ir = 7;
       
   313     
       
   314     cancelkeypane = AknLayoutScalable_Avkon::ituss_sks_pane_g2().LayoutLine();
       
   315     cancelkeyRect.LayoutRect(softkeypanerect.Rect(), cancelkeypane);
       
   316     iCancelRect = cancelkeyRect.Rect();
       
   317     
       
   318     // icf in spell mode
   314     // icf in spell mode
   319     TAknWindowLineLayout icfpane, querypane, focuspane, backkeyInnerpane, backkeypane,
   315     TAknWindowLineLayout icfpane, querypane, focuspane, 
   320                          middleInnerBtn;
   316 		bottomInnerBtn, middleInnerBtn, middleBtn;
   321     TAknLayoutRect icfpaneRect, querypaneRect, focuspaneRect, backInnerRect, backkeyRect,
   317     TAknLayoutRect icfpaneRect, querypaneRect, focuspaneRect, 
   322                    middleButton, middleInnerRect;
   318 		bottomButton, bottomInnerRect, middleBtnRect, okBtnRect, cancelBtnRect;
   323     
   319     
   324     icfpane = AknLayoutScalable_Avkon::popup_fep_vtchi_icf_pane(1).LayoutLine();
   320     icfpane = AknLayoutScalable_Avkon::popup_fep_vtchi_icf_pane(1).LayoutLine();
   325     icfpaneRect.LayoutRect(rect, icfpane);
   321     icfpaneRect.LayoutRect(rect, icfpane);
   326     
   322     
   327     querypane = AknLayoutScalable_Avkon::vtchi_query_pane().LayoutLine();
   323     querypane = AknLayoutScalable_Avkon::vtchi_query_pane().LayoutLine();
   329         
   325         
   330     focuspane = AknLayoutScalable_Avkon::vtchi_query_pane(0).LayoutLine();
   326     focuspane = AknLayoutScalable_Avkon::vtchi_query_pane(0).LayoutLine();
   331     focuspaneRect.LayoutRect(querypaneRect.Rect(), focuspane);
   327     focuspaneRect.LayoutRect(querypaneRect.Rect(), focuspane);
   332     iSpellICFRect = focuspaneRect.Rect();
   328     iSpellICFRect = focuspaneRect.Rect();
   333     
   329     
       
   330     // Middle pane
   334 	TRect middleButtonPaneRect = spellwndtrect.Rect();
   331 	TRect middleButtonPaneRect = spellwndtrect.Rect();
   335 	middleButtonPaneRect.Move( 5, 3 );
   332 	middleButtonPaneRect.Move( 5, 2 );
   336 	
   333 	
       
   334 	middleBtn = AknLayoutScalable_Avkon::cell_ituss_key_pane(3).LayoutLine();
       
   335 	middleBtnRect.LayoutRect( splitpanerect.Rect(), middleBtn );
       
   336 	middleInnerBtn = AknLayoutScalable_Avkon::bg_cell_ituss_key_g1(5).LayoutLine();
       
   337 	
       
   338 	TRect cellMiddleRect;
       
   339 	cellMiddleRect.iTl = middleButtonPaneRect.iTl;
       
   340 	cellMiddleRect.SetHeight( middleBtnRect.Rect().Height());
       
   341 	cellMiddleRect.SetWidth( middleBtnRect.Rect().Width());
       
   342 	
       
   343 	// OK button
       
   344 	okBtnRect.LayoutRect( cellMiddleRect, middleInnerBtn );
       
   345     iOkRect = okBtnRect.Rect();
       
   346     
       
   347     // Cancel button
       
   348 	cellMiddleRect.Move( middleBtnRect.Rect().Width(), 0 );
       
   349 	
       
   350 	cancelBtnRect.LayoutRect( cellMiddleRect, middleInnerBtn );
       
   351 	iCancelRect = cancelBtnRect.Rect();
       
   352 	
       
   353     iSpellBtnTextFormat = AknLayoutScalable_Avkon::ituss_sks_pane_t1().LayoutLine();
       
   354     iSpellBtnTextFormat.ir = 7;
       
   355     
       
   356     // Bottom pane
   337 	TRect cellSpellRect;
   357 	TRect cellSpellRect;
   338 	cellSpellRect.iTl = middleButtonPaneRect.iTl;
   358 	cellSpellRect.iTl.iX = middleButtonPaneRect.iTl.iX;
       
   359 	cellSpellRect.iTl.iY = middleButtonPaneRect.iTl.iY + 
       
   360 			itucellrect.Rect().Height() * 5 + 10;
   339 	cellSpellRect.SetHeight( itucellrect.Rect().Height());
   361 	cellSpellRect.SetHeight( itucellrect.Rect().Height());
   340 	cellSpellRect.SetWidth( itucellrect.Rect().Width());
   362 	cellSpellRect.SetWidth( itucellrect.Rect().Width());
   341 
   363 
   342 	// Left
   364 	// Left
   343 	middleButton.LayoutRect( cellSpellRect, ituinnercell );
   365 	bottomButton.LayoutRect( cellSpellRect, ituinnercell );
   344 	iSpellArrowLeftRect = middleButton.Rect();
   366 	iSpellArrowLeftRect = bottomButton.Rect();
   345 	
   367 	
   346 	middleInnerBtn = AknLayoutScalable_Avkon::cell_ituss_key_pane_g1(2).LayoutLine();
   368 	bottomInnerBtn = AknLayoutScalable_Avkon::cell_ituss_key_pane_g1(2).LayoutLine();
   347 	middleInnerRect.LayoutRect( middleButton.Rect(), middleInnerBtn );
   369 	bottomInnerRect.LayoutRect( bottomButton.Rect(), bottomInnerBtn );
   348 	iSpellArrowLeftRectInner = middleInnerRect.Rect();
   370 	iSpellArrowLeftRectInner = bottomInnerRect.Rect();
   349 	
   371 	
   350 	// Right
   372 	// Right
   351 	cellSpellRect.Move( itucellrect.Rect().Width(), 0 );
   373 	cellSpellRect.Move( itucellrect.Rect().Width(), 0 );
   352 	middleButton.LayoutRect( cellSpellRect, ituinnercell );
   374 	bottomButton.LayoutRect( cellSpellRect, ituinnercell );
   353 	iSpellArrowRightRect = middleButton.Rect();
   375 	iSpellArrowRightRect = bottomButton.Rect();
   354 	
   376 	
   355 	middleInnerRect.LayoutRect( middleButton.Rect(), middleInnerBtn );
   377 	bottomInnerRect.LayoutRect( bottomButton.Rect(), bottomInnerBtn );
   356 	iSpellArrowRightRectInner = middleInnerRect.Rect();
   378 	iSpellArrowRightRectInner = bottomInnerRect.Rect();
   357 
   379 
   358     
   380     // backspace in spell mode	
   359     // backspace in spell mode
   381 	cellSpellRect.Move( itucellrect.Rect().Width(), 0 );
       
   382 	bottomButton.LayoutRect( cellSpellRect, ituinnercell );
       
   383 	iSpellBackSpcace = bottomButton.Rect();
   360 	
   384 	
   361 	cellSpellRect.Move( itucellrect.Rect().Width(), 0 );
   385 	bottomInnerRect.LayoutRect( bottomButton.Rect(), bottomInnerBtn );
   362 	middleButton.LayoutRect( cellSpellRect, ituinnercell );
   386 	iSpellBackSpcaceInner = bottomInnerRect.Rect();
   363 	iSpellBackSpcace = middleButton.Rect();
       
   364 	
       
   365 	middleInnerRect.LayoutRect( middleButton.Rect(), middleInnerBtn );
       
   366 	iSpellBackSpcaceInner = middleInnerRect.Rect();
       
   367 
       
   368 
       
   369     
   387     
   370 	// icf indicator
   388 	// icf indicator
   371 	TAknWindowLineLayout icfIndiPaneWithoutText, indiIcon, indiText;
   389 	TAknWindowLineLayout icfIndiPaneWithoutText, indiIcon, indiText;
   372 	TAknLayoutRect icfIndiPaneRectWithoutText, indiIconRect, indiTextRect;
   390 	TAknLayoutRect icfIndiPaneRectWithoutText, indiIconRect, indiTextRect;
   373 	TAknTextLineLayout indiTextLayout;
   391 	TAknTextLineLayout indiTextLayout;
   374 	
   392 	
   375 
       
   376 	
       
   377 	icfIndiPaneWithoutText = AknLayoutScalable_Avkon::icf_edit_indi_pane(0).LayoutLine();
   393 	icfIndiPaneWithoutText = AknLayoutScalable_Avkon::icf_edit_indi_pane(0).LayoutLine();
   378 	icfIndiPaneRectWithoutText.LayoutRect(icfpaneRect.Rect(), icfIndiPaneWithoutText);
   394 	icfIndiPaneRectWithoutText.LayoutRect(icfpaneRect.Rect(), icfIndiPaneWithoutText);
   379 	iIndiPaneRectWithoutTextForPrtWest = icfIndiPaneRectWithoutText.Rect();
   395 	iIndiPaneRectWithoutTextForPrtWest = icfIndiPaneRectWithoutText.Rect();
   380 	
   396 	
   381 
       
   382 	iIndiIconRectWithoutTextForPrtWest = TRect( 0, 0, 60, 20 );
   397 	iIndiIconRectWithoutTextForPrtWest = TRect( 0, 0, 60, 20 );
   383 	
   398 	
   384 	indiTextLayout = AknLayoutScalable_Avkon::icf_edit_indi_pane_t1(0).LayoutLine();
   399 	indiTextLayout = AknLayoutScalable_Avkon::icf_edit_indi_pane_t1(0).LayoutLine();
   385 	iIndiTextForPrtWest = indiTextLayout;  
   400 	iIndiTextForPrtWest = indiTextLayout;  
   386     
   401     
   579        // 	return IsChinese() ? &iKeypadRectCn : &iKeypadRect;	        	
   594        // 	return IsChinese() ? &iKeypadRectCn : &iKeypadRect;	        	
   580         case EKeypadCellRects:
   595         case EKeypadCellRects:
   581             return &iKeypadCellRects;
   596             return &iKeypadCellRects;
   582        // 	return IsChinese() ? &iKeypadCellRectsCn : &iKeypadCellRects;	
   597        // 	return IsChinese() ? &iKeypadCellRectsCn : &iKeypadCellRects;	
   583         case EKeypadLeftTextLine:
   598         case EKeypadLeftTextLine:
   584             return &iVkNumText;
   599         	if ( iInputMode == ENumber || iInputMode == ENativeNumber )
       
   600 				{
       
   601 				return &iVkBigNumTextForPrtWest;
       
   602 				}
       
   603         	else
       
   604         		{
       
   605 				return &iVkNumText;
       
   606         		}
   585         case EKeypadRightTextLine1:
   607         case EKeypadRightTextLine1:
   586             return &iVkAlphaText1;
   608             return &iVkAlphaText1;
   587         case EKeypadRightTextLine2:
   609         case EKeypadRightTextLine2:
   588             return &iVkAlphaText2;
   610             return &iVkAlphaText2;
   589         case EKeypadRightTextLine3:
   611         case EKeypadRightTextLine3: