textinput/peninputsplititut/src/peninputsplititutdatamgr.cpp
branchRCL_3
changeset 5 a47de9135b21
parent 0 eb1f2e154e89
child 8 4eb1ae11334f
equal deleted inserted replaced
3:f5a1e66df979 5:a47de9135b21
   165 
   165 
   166     splitpane = AknLayoutScalable_Avkon::ituss_keypad_pane(0).LayoutLine();
   166     splitpane = AknLayoutScalable_Avkon::ituss_keypad_pane(0).LayoutLine();
   167     splitpanerect.LayoutRect(spliwndtrect.Rect(), splitpane);   
   167     splitpanerect.LayoutRect(spliwndtrect.Rect(), splitpane);   
   168     
   168     
   169     iLayoutRect = spliwndtrect.Rect();
   169     iLayoutRect = spliwndtrect.Rect();
       
   170     // spell layout rect
       
   171     iLayoutRectSpell = rect;
   170     iLayoutOffset = spliwndtrect.Rect().iTl;
   172     iLayoutOffset = spliwndtrect.Rect().iTl;
   171     iBackgroundRect = iLayoutRect;
   173     iBackgroundRect = iLayoutRect;
   172     iBackgroundRect.Move(-iLayoutOffset);
   174     iBackgroundRect.Move(-iLayoutOffset);
   173     
   175     
   174 
   176 
   288     iPreviewWndInnerRect = previewWndInnerRect.Rect();
   290     iPreviewWndInnerRect = previewWndInnerRect.Rect();
   289     iPreviewWndText = 
   291     iPreviewWndText = 
   290         AknLayoutScalable_Avkon::popup_fshwr2_char_preview_window_t1(0).LayoutLine();
   292         AknLayoutScalable_Avkon::popup_fshwr2_char_preview_window_t1(0).LayoutLine();
   291     previewWndText.LayoutText(previewWndRect.Rect(), iPreviewWndText);
   293     previewWndText.LayoutText(previewWndRect.Rect(), iPreviewWndText);
   292     iBubbleFont = const_cast<CFont*>(previewWndText.Font());
   294     iBubbleFont = const_cast<CFont*>(previewWndText.Font());
       
   295     
       
   296     // for spell window
       
   297     // OK and Cancel button
       
   298     TAknWindowLineLayout spellwnd, softkeypane, okkeypane, cancelkeypane  ;
       
   299     TAknLayoutRect spellwndtrect, softkeypanerect, okkeyRect, cancelkeyRect  ;
       
   300 
       
   301     spellwnd = AknLayoutScalable_Avkon::popup_fep_ituss_window(1).LayoutLine();
       
   302     spellwndtrect.LayoutRect(rect, spellwnd);    
       
   303     
       
   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
       
   319     TAknWindowLineLayout icfpane, querypane, focuspane, backkeyInnerpane, backkeypane,
       
   320                          middleInnerBtn;
       
   321     TAknLayoutRect icfpaneRect, querypaneRect, focuspaneRect, backInnerRect, backkeyRect,
       
   322                    middleButton, middleInnerRect;
       
   323     
       
   324     icfpane = AknLayoutScalable_Avkon::popup_fep_vtchi_icf_pane(1).LayoutLine();
       
   325     icfpaneRect.LayoutRect(rect, icfpane);
       
   326     
       
   327     querypane = AknLayoutScalable_Avkon::vtchi_query_pane().LayoutLine();
       
   328     querypaneRect.LayoutRect(icfpaneRect.Rect(), querypane);
       
   329         
       
   330     focuspane = AknLayoutScalable_Avkon::vtchi_query_pane(0).LayoutLine();
       
   331     focuspaneRect.LayoutRect(querypaneRect.Rect(), focuspane);
       
   332     iSpellICFRect = focuspaneRect.Rect();
       
   333     
       
   334 	TRect middleButtonPaneRect = spellwndtrect.Rect();
       
   335 	middleButtonPaneRect.Move( 5, 3 );
       
   336 	
       
   337 	TRect cellSpellRect;
       
   338 	cellSpellRect.iTl = middleButtonPaneRect.iTl;
       
   339 	cellSpellRect.SetHeight( itucellrect.Rect().Height());
       
   340 	cellSpellRect.SetWidth( itucellrect.Rect().Width());
       
   341 
       
   342 	// Left
       
   343 	middleButton.LayoutRect( cellSpellRect, ituinnercell );
       
   344 	iSpellArrowLeftRect = middleButton.Rect();
       
   345 	
       
   346 	middleInnerBtn = AknLayoutScalable_Avkon::cell_ituss_key_pane_g1(2).LayoutLine();
       
   347 	middleInnerRect.LayoutRect( middleButton.Rect(), middleInnerBtn );
       
   348 	iSpellArrowLeftRectInner = middleInnerRect.Rect();
       
   349 	
       
   350 	// Right
       
   351 	cellSpellRect.Move( itucellrect.Rect().Width(), 0 );
       
   352 	middleButton.LayoutRect( cellSpellRect, ituinnercell );
       
   353 	iSpellArrowRightRect = middleButton.Rect();
       
   354 	
       
   355 	middleInnerRect.LayoutRect( middleButton.Rect(), middleInnerBtn );
       
   356 	iSpellArrowRightRectInner = middleInnerRect.Rect();
       
   357 
       
   358     
       
   359     // backspace in spell mode
       
   360 	
       
   361 	cellSpellRect.Move( itucellrect.Rect().Width(), 0 );
       
   362 	middleButton.LayoutRect( cellSpellRect, ituinnercell );
       
   363 	iSpellBackSpcace = middleButton.Rect();
       
   364 	
       
   365 	middleInnerRect.LayoutRect( middleButton.Rect(), middleInnerBtn );
       
   366 	iSpellBackSpcaceInner = middleInnerRect.Rect();
       
   367 
       
   368 
       
   369     
       
   370 	// icf indicator
       
   371 	TAknWindowLineLayout icfIndiPaneWithoutText, indiIcon, indiText;
       
   372 	TAknLayoutRect icfIndiPaneRectWithoutText, indiIconRect, indiTextRect;
       
   373 	TAknTextLineLayout indiTextLayout;
       
   374 	
       
   375 
       
   376 	
       
   377 	icfIndiPaneWithoutText = AknLayoutScalable_Avkon::icf_edit_indi_pane(0).LayoutLine();
       
   378 	icfIndiPaneRectWithoutText.LayoutRect(icfpaneRect.Rect(), icfIndiPaneWithoutText);
       
   379 	iIndiPaneRectWithoutTextForPrtWest = icfIndiPaneRectWithoutText.Rect();
       
   380 	
       
   381 
       
   382 	iIndiIconRectWithoutTextForPrtWest = TRect( 0, 0, 60, 20 );
       
   383 	
       
   384 	indiTextLayout = AknLayoutScalable_Avkon::icf_edit_indi_pane_t1(0).LayoutLine();
       
   385 	iIndiTextForPrtWest = indiTextLayout;  
       
   386     
       
   387 	// ICF text line info
       
   388     TAknTextLineLayout icftextT1, icftextT2, icftextT3;    
       
   389     icftextT1 = AknLayoutScalable_Avkon::vtchi_query_pane_t1(0).LayoutLine();
       
   390     icftextT2 = AknLayoutScalable_Avkon::vtchi_query_pane_t2(0).LayoutLine();
       
   391     icftextT3 = AknLayoutScalable_Avkon::vtchi_query_pane_t3(0).LayoutLine();
       
   392     
       
   393     iIcfTextAlignment = icftextT1.iJ;
       
   394     iIcfTextLeftMargin = icftextT1.il;
       
   395     iIcfTextRightMargin = icftextT1.ir;
       
   396 
       
   397     TAknLayoutText ctxt1, ctxt2, ctxt3;
       
   398     ctxt1.LayoutText( focuspaneRect.Rect(), icftextT1 );
       
   399     ctxt2.LayoutText( focuspaneRect.Rect(), icftextT2 );
       
   400     ctxt3.LayoutText( focuspaneRect.Rect(), icftextT3 );
       
   401 
       
   402     iIcfTextTopMargin = ctxt1.TextRect().iTl.iY - focuspaneRect.Rect().iTl.iY;
       
   403     iIcfTextLineSpaceMargin = ctxt2.TextRect().iTl.iY - ctxt1.TextRect().iBr.iY;
       
   404     iIcfTextBottomMargin = focuspaneRect.Rect().iBr.iY - ctxt3.TextRect().iBr.iY 
       
   405                                                       - iIcfTextLineSpaceMargin;  
       
   406     iIcfTextHeight = ctxt1.TextRect().Height();
       
   407     
       
   408     iIcfFont = const_cast<CFont*>(AknLayoutUtils::FontFromId(icftextT1.iFont, NULL));
   293     }   
   409     }   
   294 
   410 
   295 // ---------------------------------------------------------------------------
   411 // ---------------------------------------------------------------------------
   296 // CSplitItutDataMgr::ReadLafInfo
   412 // CSplitItutDataMgr::ReadLafInfo
   297 // (other items were commented in a header)
   413 // (other items were commented in a header)
   451         case EScreenSize:
   567         case EScreenSize:
   452             return &iScreenSize;
   568             return &iScreenSize;
   453         case ELayoutOffset:
   569         case ELayoutOffset:
   454             return &iLayoutOffset;
   570             return &iLayoutOffset;
   455         case ELayoutRect:
   571         case ELayoutRect:
   456             return &iLayoutRect;
   572             return iSpellMode ? &iLayoutRectSpell : &iLayoutRect;
   457         case EBackgroundRect:
   573         case EBackgroundRect:
   458             return &iBackgroundRect;
   574             return iSpellMode ? &iLayoutRectSpell : &iBackgroundRect;
   459         case EBackspaceRect:
   575         case EBackspaceRect:
   460             return IsChinese() ? &iBackspaceCnRect : &iBackspaceRect;
   576             return IsChinese() ? &iBackspaceCnRect : &iBackspaceRect;
   461         case EKeypadRect:
   577         case EKeypadRect:
   462             return &iKeypadRect;
   578             return &iKeypadRect;
   463        // 	return IsChinese() ? &iKeypadRectCn : &iKeypadRect;	        	
   579        // 	return IsChinese() ? &iKeypadRectCn : &iKeypadRect;	        	
   510             return &iCandidates;
   626             return &iCandidates;
   511         case EChnPuncCandidates:
   627         case EChnPuncCandidates:
   512             return &iPuncCandidates;
   628             return &iPuncCandidates;
   513         */
   629         */
   514         case EArrowLeftRect:
   630         case EArrowLeftRect:
   515  //       case EItutPosArrowLeft:
   631         	if( iSpellMode )
   516             return IsChinese() ? &iArrowLeftCnRect : &iArrowLeftRect;
   632         		{
       
   633         	    return &iSpellArrowLeftRect;
       
   634         		}
       
   635         	else
       
   636         		{
       
   637                 return IsChinese() ? &iArrowLeftCnRect : &iArrowLeftRect;
       
   638         		}
   517         case EArrowRightRect:
   639         case EArrowRightRect:
   518 //        case EItutPosArrowRight:
   640         	if( iSpellMode )
   519             return IsChinese() ? &iArrowRightCnRect : &iArrowRightRect;
   641            		{
       
   642         	    return &iSpellArrowRightRect;
       
   643            		}
       
   644         	else
       
   645         		{
       
   646                 return IsChinese() ? &iArrowRightCnRect : &iArrowRightRect;
       
   647         		}
   520         case EArrowUpRect:
   648         case EArrowUpRect:
   521 //        case EItutPosArrowUp:
   649 //        case EItutPosArrowUp:
   522             return &iArrowUpRect;
   650             return &iArrowUpRect;
   523         case EArrowDownRect:
   651         case EArrowDownRect:
   524 //        case EItutPosArrowDown:
   652 //        case EItutPosArrowDown:
   534         	return IsChinese() ? &iCloseRectCn : &iCloseRect;
   662         	return IsChinese() ? &iCloseRectCn : &iCloseRect;
   535 #else        	
   663 #else        	
   536             return &iCloseRect;
   664             return &iCloseRect;
   537 #endif            
   665 #endif            
   538         case ELeftInnerRect:
   666         case ELeftInnerRect:
   539         	return IsChinese() ? &iArrowLeftInnerCnRect : &iArrowLeftInnerRect;
   667         	if( iSpellMode )
       
   668            		{
       
   669         	    return &iSpellArrowLeftRectInner;
       
   670            		}
       
   671         	else
       
   672         		{
       
   673         	    return IsChinese() ? &iArrowLeftInnerCnRect : &iArrowLeftInnerRect;
       
   674         		}
   540         case ERightInnerRect:
   675         case ERightInnerRect:
   541         	return IsChinese() ? &iArrowRightInnerCnRect : &iArrowRightInnerRect;
   676         	if( iSpellMode )
       
   677         		{
       
   678         	    return &iSpellArrowRightRectInner;
       
   679         	    }
       
   680         	else
       
   681         		{
       
   682         	    return IsChinese() ? &iArrowRightInnerCnRect : &iArrowRightInnerRect;
       
   683         		}
   542         case EBackspaceInnerRect:
   684         case EBackspaceInnerRect:
   543         	return IsChinese() ? &iBackspaceInnerCnRect : &iBackspaceInnerRect;
   685         	return IsChinese() ? &iBackspaceInnerCnRect : &iBackspaceInnerRect;
   544        	case EUpInnerRect:
   686        	case EUpInnerRect:
   545         	return &iArrowUpInnerRect;
   687         	return &iArrowUpInnerRect;
   546         case EDownInnerRect:
   688         case EDownInnerRect:
   565             return &iPreviewWndInnerRect;
   707             return &iPreviewWndInnerRect;
   566         case EPreviewBubbleTextlayout:
   708         case EPreviewBubbleTextlayout:
   567             return &iPreviewWndText;
   709             return &iPreviewWndText;
   568         case EPreviewBubbleFont:
   710         case EPreviewBubbleFont:
   569             return reinterpret_cast<TAny*>(iBubbleFont);    
   711             return reinterpret_cast<TAny*>(iBubbleFont);    
       
   712         case EItutPosOk:
       
   713             return &iOkRect;
       
   714         case EItutPosCancel:
       
   715             return &iCancelRect;
       
   716         case EBtnTextLine:
       
   717             return &iSpellBtnTextFormat;            
       
   718         case ESpellICFRect:
       
   719             return &iSpellICFRect;
       
   720         case ESpellEditIndicatorRect:
       
   721             return &iSpellEditIndicator;
       
   722         case EIcfFont:
       
   723             return reinterpret_cast<TAny*>(iIcfFont);      
       
   724         case EImIndicatorRect:
       
   725         	return &iSpellEditIndicator;
       
   726         case ESpellBackSpcae:
       
   727         	return &iSpellBackSpcace;
       
   728         case ESpellBackSpcaeInner:
       
   729         	return &iSpellBackSpcaceInner;
       
   730         case EIndiPaneWithoutTextRect:
       
   731             return &iIndiPaneRectWithoutTextForPrtWest;
       
   732         case EIndiIconWithoutTextRect:
       
   733             return &iIndiIconRectWithoutTextForPrtWest;
       
   734         case EIndiTextLine:
       
   735             return &iIndiTextForPrtWest;
   570         default:
   736         default:
   571             break;
   737             break;
   572         }
   738         }
   573 
   739 
   574     return NULL;
   740     return NULL;
   586                                          iLanguage(ELangNone),
   752                                          iLanguage(ELangNone),
   587                                          iInputMode(KInvalidImMode),
   753                                          iInputMode(KInvalidImMode),
   588                                          iCase(EAknEditorUpperCase),
   754                                          iCase(EAknEditorUpperCase),
   589                                          iConfigResId(0),
   755                                          iConfigResId(0),
   590                                          iLayoutContext(aLayoutContext),
   756                                          iLayoutContext(aLayoutContext),
   591                                          iCurrentScriptIdx(KInvalidIndex)
   757                                          iCurrentScriptIdx(KInvalidIndex),
       
   758                                          iSpellMode(EFalse)
   592     {
   759     {
   593     }
   760     }
   594 
   761 
   595 
   762 
   596 
   763