textinput/peninputfingerhwr/src/peninputfingerhwrlafmanager.cpp
branchRCL_3
changeset 21 ecbabf52600f
equal deleted inserted replaced
20:ebd48d2de13c 21:ecbabf52600f
       
     1 /*
       
     2 * Copyright (c) 2009 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:  Implementation of LAF manager.
       
    15 *
       
    16 */
       
    17 
       
    18 // INCLUDES
       
    19 #include <aknlayoutscalable_avkon.cdl.h>
       
    20 #include <AknUtils.h>
       
    21 
       
    22 #include "peninputfingerhwrlafmanager.h"
       
    23 #include "peninputfingerhwrcontrolid.h"
       
    24 
       
    25 #define LAF_MODIFY 1
       
    26  
       
    27 
       
    28 // ---------------------------------------------------------------------------
       
    29 // Symbian Constructor
       
    30 // ---------------------------------------------------------------------------
       
    31 //
       
    32 CPeninputFingerHwrLAFManager* CPeninputFingerHwrLAFManager::NewL()
       
    33     {
       
    34     CPeninputFingerHwrLAFManager* self = CPeninputFingerHwrLAFManager::NewLC();
       
    35     CleanupStack::Pop(); // self;
       
    36     return self;   
       
    37     }
       
    38 
       
    39 // ---------------------------------------------------------------------------
       
    40 // Symbian Constructor
       
    41 // ---------------------------------------------------------------------------
       
    42 //
       
    43 CPeninputFingerHwrLAFManager* CPeninputFingerHwrLAFManager::NewLC()
       
    44     {
       
    45     CPeninputFingerHwrLAFManager* self = new( ELeave ) CPeninputFingerHwrLAFManager();
       
    46     CleanupStack::PushL( self );
       
    47     self->ConstructL();
       
    48     return self;
       
    49     }
       
    50 
       
    51 // ---------------------------------------------------------------------------
       
    52 // c++ destructor
       
    53 // ---------------------------------------------------------------------------
       
    54 //
       
    55 CPeninputFingerHwrLAFManager::~CPeninputFingerHwrLAFManager()
       
    56     {
       
    57     //nothing
       
    58     iSCTrectArray.Reset();
       
    59     iSCTrectArray.Close();
       
    60     }
       
    61 
       
    62 
       
    63 // ---------------------------------------------------------------------------
       
    64 // read laf data.
       
    65 // ---------------------------------------------------------------------------
       
    66 //
       
    67 void CPeninputFingerHwrLAFManager::ReadLafInfo()
       
    68     {
       
    69     // Screen
       
    70     TRect rect;
       
    71     AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EScreen, rect);
       
    72     iScreenSize = rect.Size();
       
    73 
       
    74     iIsLandscape = iScreenSize.iWidth < iScreenSize.iHeight ? EFalse : ETrue;
       
    75     
       
    76     AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EApplicationWindow, rect);
       
    77 
       
    78     // finger Layout
       
    79     TAknWindowLineLayout fshwrlayout;
       
    80     TAknLayoutRect fshwrRect;
       
    81         
       
    82     fshwrlayout = AknLayoutScalable_Avkon::main_fep_fshwr2_pane(0).LayoutLine();
       
    83     fshwrRect.LayoutRect(rect, fshwrlayout);
       
    84 
       
    85     iLayoutRect = fshwrRect.Rect();
       
    86     iLayoutOffset = iLayoutRect.iTl;
       
    87 
       
    88     // ICF & Keypad
       
    89     TAknWindowLineLayout icflayoutcn,icflayoutbgcn;
       
    90     TAknTextLineLayout icflefttext;    
       
    91     TAknTextLineLayout icflefttext1, icflefttext2, icflefttext3; 
       
    92     TAknLayoutRect icfrectlatin, icfrectcn;
       
    93 
       
    94     icflayoutcn = AknLayoutScalable_Avkon::fshwr2_icf_pane(0).LayoutLine();
       
    95     
       
    96     icfrectcn.LayoutRect(fshwrRect.Rect(), icflayoutcn);
       
    97 	
       
    98     TAknLayoutScalableParameterLimits entryPaneVariety = 
       
    99                 AknLayoutScalable_Avkon::fshwr2_icf_pane_t1_ParamLimits(0);
       
   100     TInt maxRow = entryPaneVariety.LastRow();
       
   101     
       
   102     icflefttext = AknLayoutScalable_Avkon::fshwr2_icf_pane_t1(0, 0, 0).LayoutLine();
       
   103     
       
   104     icflefttext1 = AknLayoutScalable_Avkon::fshwr2_icf_pane_t1(0, 0, 1).LayoutLine();
       
   105     icflefttext2 = AknLayoutScalable_Avkon::fshwr2_icf_pane_t1(0, 0, 2).LayoutLine();
       
   106     icflefttext3 = AknLayoutScalable_Avkon::fshwr2_icf_pane_t1(0, 0, maxRow).LayoutLine();
       
   107     iIcfTextLeftMarginCn = icflefttext.il;
       
   108     iIcfTextRightMarginCn = iIcfTextLeftMarginCn;
       
   109     
       
   110     TAknLayoutText ctxt, ctxt1, ctxt2, ctxt3;
       
   111     ctxt.LayoutText( icfrectcn.Rect(), icflefttext );
       
   112     ctxt1.LayoutText( icfrectcn.Rect(), icflefttext1 );
       
   113     ctxt2.LayoutText( icfrectcn.Rect(), icflefttext2 );
       
   114     ctxt3.LayoutText( icfrectcn.Rect(), icflefttext3 );
       
   115 	
       
   116     iIcfTextTopMarginCn = ctxt.TextRect().iTl.iY - icfrectcn.Rect().iTl.iY;
       
   117     iIcfTextLineSpaceMarginCn = ctxt1.TextRect().iTl.iY - ctxt.TextRect().iBr.iY;
       
   118     iIcfTextBottomMarginCn = icfrectcn.Rect().iBr.iY - ctxt3.TextRect().iBr.iY 
       
   119                                                      - iIcfTextLineSpaceMarginCn;
       
   120     iIcfTextHeightCn = ctxt.TextRect().Height();    
       
   121  	
       
   122     iIcfFont = const_cast<CFont*>(AknLayoutUtils::FontFromId(icflefttext.iFont, NULL));
       
   123 
       
   124     iRectIcf = icfrectcn.Rect();
       
   125     
       
   126 	// candidate list
       
   127     TAknWindowLineLayout candrowpane, candrowpane2, candlistpane, cellpane, candbgpane;
       
   128     TAknLayoutRect candpaneRect, candrowpaneRect, candrowpaneRect2, cellpaneRect1, cellpaneRect2;
       
   129     TAknLayoutRect cellpaneRect3, cellpaneRect;
       
   130 
       
   131     candlistpane = AknLayoutScalable_Avkon::fshwr2_func_candi_pane(0).
       
   132 										LayoutLine();
       
   133 
       
   134     candpaneRect.LayoutRect( fshwrRect.Rect(), candlistpane );
       
   135     rect = candpaneRect.Rect();
       
   136     candrowpane = AknLayoutScalable_Avkon::fshwr2_func_candi_row_pane(0, 0, 1).
       
   137 										LayoutLine();
       
   138     candrowpaneRect.LayoutRect( rect, candrowpane );
       
   139     
       
   140     candrowpane2 = AknLayoutScalable_Avkon::fshwr2_func_candi_row_pane(0, 0, 2).
       
   141 										LayoutLine();
       
   142     candrowpaneRect2.LayoutRect( rect, candrowpane2 );
       
   143      
       
   144 	
       
   145     cellpane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_pane( 3 , 0 , 0 ).
       
   146 										LayoutLine();
       
   147     cellpaneRect.LayoutRect( candrowpaneRect.Rect(), cellpane );
       
   148     
       
   149     candbgpane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_bg_pane(3).LayoutLine();
       
   150     cellpaneRect1.LayoutRect( cellpaneRect.Rect(), candbgpane );   
       
   151     
       
   152     cellpane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_pane( 3 , 1 , 0 ).
       
   153 										LayoutLine();
       
   154     cellpaneRect.LayoutRect( candrowpaneRect.Rect(), cellpane );
       
   155     
       
   156     candbgpane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_bg_pane(3).LayoutLine();
       
   157     cellpaneRect2.LayoutRect( cellpaneRect.Rect(), candbgpane );   
       
   158     
       
   159     
       
   160     
       
   161     cellpane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_pane( 3 , 0 , 1 ).
       
   162 										LayoutLine();
       
   163     cellpaneRect.LayoutRect( candrowpaneRect2.Rect(), cellpane );
       
   164     
       
   165     candbgpane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_bg_pane(3).LayoutLine();
       
   166     cellpaneRect3.LayoutRect( cellpaneRect.Rect(), candbgpane );   
       
   167     
       
   168 									
       
   169     iCandsHorizontalMargin = cellpaneRect2.Rect().iTl.iX - cellpaneRect1.Rect().iBr.iX;
       
   170     iCandsVerticalMargin = cellpaneRect3.Rect().iTl.iY - cellpaneRect1.Rect().iBr.iY;
       
   171 	
       
   172     iCandsUnitWidth = cellpaneRect1.Rect().Width();
       
   173     iCandsUnitHeight = cellpaneRect1.Rect().Height() ;
       
   174     
       
   175     iCandsNaviHeight = cellpaneRect1.Rect().Height();
       
   176     iCandidateLTPos = candrowpaneRect.Rect().iTl;
       
   177     iPredictiveLTPos = candrowpaneRect2.Rect().iTl;
       
   178     
       
   179     TAknTextLineLayout candstxtlayout = 
       
   180                      AknLayoutScalable_Avkon::fshwr2_func_candi_cell_pane_t1(3).LayoutLine();
       
   181     TAknLayoutText candstxt;
       
   182     candstxt.LayoutText( cellpaneRect1.Rect(), candstxtlayout );
       
   183     iCandsFont = const_cast<CFont*>( AknLayoutUtils::FontFromId( candstxtlayout.iFont, NULL ) );
       
   184     iCandsTextMargin = candstxt.TextRect().iTl.iX - cellpaneRect1.Rect().iTl.iX;
       
   185     
       
   186     
       
   187     TAknWindowLineLayout btnrowpane, btnpane, btnbgpane;
       
   188     TAknLayoutRect btnrowRect, btnRect, btnbgRect;
       
   189     
       
   190     // Get the first row rect *************************************************
       
   191     btnrowpane = AknLayoutScalable_Avkon::fshwr2_func_candi_row_pane(0, 0, 0).
       
   192                                             LayoutLine();
       
   193     btnrowRect.LayoutRect(candpaneRect.Rect(), btnrowpane);
       
   194     // Close Button
       
   195     btnpane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_pane( 2 , 0 , 0 ).
       
   196 										LayoutLine();    
       
   197     btnRect.LayoutRect(btnrowRect.Rect(), btnpane);
       
   198     btnbgpane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_bg_pane(2).
       
   199 										LayoutLine();
       
   200     btnbgRect.LayoutRect(btnRect.Rect(), btnbgpane); 
       
   201     iRectBtnClose = btnbgRect.Rect();
       
   202     
       
   203     // Range Button with mark
       
   204     btnpane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_pane( 2 , 1 , 0 ).
       
   205 										LayoutLine();
       
   206     btnRect.LayoutRect(btnrowRect.Rect(), btnpane);
       
   207     btnbgpane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_bg_pane(2).
       
   208 										LayoutLine();
       
   209     btnbgRect.LayoutRect(btnRect.Rect(), btnbgpane); 
       
   210     iRectBtnRangeChn = btnbgRect.Rect();
       
   211     iRectBtnRangeEng = iRectBtnRangeChn;
       
   212     iRectBtnRangeNum = iRectBtnRangeEng;
       
   213     
       
   214     // SCT button
       
   215     btnpane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_pane( 2 , 2 , 0 ).
       
   216 										LayoutLine();
       
   217     btnRect.LayoutRect(btnrowRect.Rect(), btnpane);
       
   218     btnbgpane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_bg_pane(2).
       
   219 										LayoutLine();
       
   220     btnbgRect.LayoutRect(btnRect.Rect(), btnbgpane); 
       
   221     iRectBtnRangeSmb = btnbgRect.Rect();
       
   222     
       
   223     // Backspace button
       
   224     btnpane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_pane( 2 , 3 , 0 ).
       
   225 										LayoutLine();
       
   226     btnRect.LayoutRect(btnrowRect.Rect(), btnpane);
       
   227     btnbgpane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_bg_pane(2).
       
   228 										LayoutLine();
       
   229     btnbgRect.LayoutRect(btnRect.Rect(), btnbgpane);
       
   230     iRectBtnBackspace = btnbgRect.Rect();    
       
   231     
       
   232     // Get the second row rect **************************************************
       
   233     btnrowpane = AknLayoutScalable_Avkon::fshwr2_func_candi_row_pane(0, 0, 1).
       
   234                                             LayoutLine();
       
   235     btnrowRect.LayoutRect(candpaneRect.Rect(), btnrowpane);
       
   236     
       
   237     // Option button
       
   238     btnpane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_pane( 1 , 0 , 0 ).
       
   239 										LayoutLine();
       
   240     btnRect.LayoutRect(btnrowRect.Rect(), btnpane);
       
   241     btnbgpane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_bg_pane(1).
       
   242 										LayoutLine();
       
   243     btnbgRect.LayoutRect(btnRect.Rect(), btnbgpane);
       
   244     iRectBtnOption = btnbgRect.Rect();     
       
   245     
       
   246     // Switch mode button
       
   247     btnpane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_pane( 1 , 1 , 0 ).
       
   248 										LayoutLine();
       
   249     btnRect.LayoutRect(btnrowRect.Rect(), btnpane);
       
   250     btnbgpane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_bg_pane(1).
       
   251 										LayoutLine();
       
   252     btnbgRect.LayoutRect(btnRect.Rect(), btnbgpane); 
       
   253     iRectBtnImeSwitch = btnbgRect.Rect();
       
   254     
       
   255     // Arrow up button
       
   256     btnpane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_pane( 1 , 2 , 0 ).
       
   257 										LayoutLine();
       
   258     btnRect.LayoutRect(btnrowRect.Rect(), btnpane);
       
   259     btnbgpane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_bg_pane(1).
       
   260 										LayoutLine();
       
   261     btnbgRect.LayoutRect(btnRect.Rect(), btnbgpane);  
       
   262     iRectBtnArrowUp = btnbgRect.Rect();
       
   263     iRectBtnSctPage = iRectBtnArrowUp;  
       
   264 
       
   265 
       
   266     // Get the third row rect **************************************************
       
   267     btnrowpane = AknLayoutScalable_Avkon::fshwr2_func_candi_row_pane(0, 0, 2).
       
   268                                             LayoutLine();
       
   269     btnrowRect.LayoutRect(candpaneRect.Rect(), btnrowpane);
       
   270 
       
   271     // Arrow left button
       
   272     btnpane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_pane( 1 , 0 , 0 ).
       
   273 										LayoutLine();									
       
   274     btnRect.LayoutRect(btnrowRect.Rect(), btnpane);
       
   275     btnbgpane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_bg_pane(1).
       
   276 										LayoutLine();
       
   277     btnbgRect.LayoutRect(btnRect.Rect(), btnbgpane); 
       
   278     iRectBtnArrowLeft = btnbgRect.Rect();    
       
   279     
       
   280     // Arrow right button
       
   281     btnpane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_pane( 1 , 1 , 0 ).
       
   282 										LayoutLine();
       
   283     btnRect.LayoutRect(btnrowRect.Rect(), btnpane);
       
   284     btnbgpane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_bg_pane(1).
       
   285 										LayoutLine();
       
   286 	btnbgRect.LayoutRect(btnRect.Rect(), btnbgpane);									    
       
   287     iRectBtnArrowRight = btnbgRect.Rect();
       
   288     
       
   289     // Arrow down button
       
   290     btnpane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_pane( 1 , 2 , 0 ).
       
   291 										LayoutLine();
       
   292     btnRect.LayoutRect(btnrowRect.Rect(), btnpane);
       
   293     btnbgpane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_bg_pane(1).
       
   294 										LayoutLine();
       
   295 	btnbgRect.LayoutRect(btnRect.Rect(), btnbgpane);									    
       
   296     iRectBtnArrowDown = btnbgRect.Rect();
       
   297     
       
   298     // Space button
       
   299     btnpane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_pane( 0 , 0 , 0 ).
       
   300 										LayoutLine();
       
   301     btnRect.LayoutRect(btnrowRect.Rect(), btnpane);
       
   302     btnbgpane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_bg_pane(0).
       
   303 										LayoutLine();
       
   304 	btnbgRect.LayoutRect(btnRect.Rect(), btnbgpane);									    
       
   305     
       
   306     iRectFixSctpad = btnrowRect.Rect();
       
   307   
       
   308     iRectSpase = btnbgRect.Rect();
       
   309     iRectSpase.Move(-iRectFixSctpad.iTl );
       
   310     
       
   311     // Enter button
       
   312     btnpane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_pane( 0 , 1 , 0 ).
       
   313 										LayoutLine();
       
   314 	btnRect.LayoutRect(btnrowRect.Rect(), btnpane);																		
       
   315     btnbgpane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_bg_pane(0).
       
   316 										LayoutLine();									
       
   317 	btnbgRect.LayoutRect(btnRect.Rect(), btnbgpane);
       
   318 										    
       
   319     iRectEnter = btnbgRect.Rect();
       
   320     iRectEnter.Move(-iRectFixSctpad.iTl);
       
   321 
       
   322     iSizeFixSctpadCell = iRectSpase.Size();
       
   323     
       
   324     // Writing box
       
   325     TAknWindowLineLayout writingboxpane;
       
   326     TAknLayoutRect boxRect;
       
   327     writingboxpane = AknLayoutScalable_Avkon::fshwr2_hwr_syb_pane(0).LayoutLine();
       
   328     boxRect.LayoutRect(fshwrRect.Rect(), writingboxpane);
       
   329     iRectWritingBox = boxRect.Rect();
       
   330     iRectNumpad = iRectWritingBox;
       
   331     iRectSctpad = iRectWritingBox;
       
   332     
       
   333     // virtual key size
       
   334     TAknWindowLineLayout keypane, keybgpane;
       
   335     TAknLayoutRect keyRect, keybgRect;
       
   336   
       
   337     TAknLayoutScalableParameterLimits sctPaneVariety =
       
   338         AknLayoutScalable_Avkon::cell_fshwr2_syb_pane_ParamLimits(0);
       
   339     
       
   340     iSctpadRowCount = sctPaneVariety.LastRow() + 1;
       
   341     iSctpadColCount = sctPaneVariety.LastColumn() + 1;    
       
   342   
       
   343     iSizeBtnPadding = TSize(6, 6);
       
   344   
       
   345     iSCTrectArray.Reset();
       
   346     for(TInt i = 0; i < iSctpadRowCount; i++)
       
   347         {
       
   348         for ( TInt j = 0; j < iSctpadColCount; j++ )
       
   349             {
       
   350             keypane = AknLayoutScalable_Avkon::cell_fshwr2_syb_pane(0, j, i).LayoutLine();
       
   351             keyRect.LayoutRect(boxRect.Rect(), keypane);
       
   352             keybgpane = AknLayoutScalable_Avkon::cell_fshwr2_syb_bg_pane(0).LayoutLine();
       
   353             keybgRect.LayoutRect(keyRect.Rect(), keybgpane);
       
   354             iSCTrectArray.Append( keybgRect.Rect());
       
   355             }
       
   356         }
       
   357     iSizeNumpadCell = keybgRect.Rect().Size();
       
   358     iSizeSctpadCell = iSizeNumpadCell;
       
   359     
       
   360     // preview popup window 
       
   361   	TAknWindowLineLayout previewWnd, previewBackground, previewWndInner;
       
   362   	TAknLayoutRect previewWndRect, previewBackgroundRect, previewWndInnerRect;
       
   363   	TAknLayoutText previewWndText;
       
   364   	previewWnd = AknLayoutScalable_Avkon::popup_fshwr2_char_preview_window(0).LayoutLine();	
       
   365   	            
       
   366   	previewWndRect.LayoutRect( iLayoutRect, previewWnd );
       
   367   	previewBackground = AknLayoutScalable_Avkon::bg_popup_fep_char_preview_window_cp01().LayoutLine();
       
   368   	previewBackgroundRect.LayoutRect( previewWndRect.Rect(), previewBackground );
       
   369   	iPreviewWndRect = previewBackgroundRect.Rect();
       
   370   	
       
   371   	previewWndInner = AknLayoutScalable_Avkon::bg_popup_fep_char_preview_window_g9().LayoutLine();
       
   372   	previewWndInnerRect.LayoutRect( previewBackgroundRect.Rect(), previewWndInner );
       
   373   	
       
   374   	iPreviewWndInnerRect = previewWndInnerRect.Rect();
       
   375   	iPreviewWndText = 
       
   376         AknLayoutScalable_Avkon::popup_fshwr2_char_preview_window_t1(0).LayoutLine();
       
   377     previewWndText.LayoutText(previewWndRect.Rect(), iPreviewWndText);
       
   378     iBubbleFont = previewWndText.Font();
       
   379     }
       
   380         
       
   381 
       
   382 // ---------------------------------------------------------------------------
       
   383 // get screen orientation.
       
   384 // ---------------------------------------------------------------------------
       
   385 //
       
   386 TBool CPeninputFingerHwrLAFManager::IsLandscape()
       
   387     {
       
   388     return iIsLandscape;
       
   389     }
       
   390     
       
   391     
       
   392 // ---------------------------------------------------------------------------
       
   393 // get rect of layout.
       
   394 // ---------------------------------------------------------------------------
       
   395 //    
       
   396 TRect CPeninputFingerHwrLAFManager::LayoutRect()
       
   397     {        
       
   398     return iLayoutRect;
       
   399     }
       
   400 
       
   401 
       
   402 // ---------------------------------------------------------------------------
       
   403 // get rect of specified control.
       
   404 // ---------------------------------------------------------------------------
       
   405 //  
       
   406 TRect CPeninputFingerHwrLAFManager::CtrlRect( TInt aCtrlId )
       
   407     {
       
   408     switch ( aCtrlId )
       
   409         {
       
   410         case EHwrCtrlIdInputContextField:
       
   411             {
       
   412             return iRectIcf;
       
   413             }
       
   414         case EHwrCtrlIdWritingBox:
       
   415             {
       
   416             return iRectWritingBox;
       
   417             }
       
   418         case EHwrCtrlIdNumpad:
       
   419             {
       
   420             return iRectNumpad;
       
   421             }
       
   422         case EHwrCtrlIdSctpad:
       
   423             {
       
   424             return iRectSctpad;
       
   425             }
       
   426         case EHwrCtrlIdSctpadFix:
       
   427             {
       
   428             return iRectFixSctpad;
       
   429             }            
       
   430         case EHwrCtrlIdClose:
       
   431             {
       
   432             return iRectBtnClose;
       
   433             }      
       
   434         case EHwrCtrlIdRangeSelector:
       
   435             {
       
   436             return iRectBtnRangeChn;
       
   437             }      
       
   438         case EHwrCtrlIdSymbolButton:
       
   439             {
       
   440             return iRectBtnRangeSmb;
       
   441             }
       
   442         case EHwrCtrlIdBackspace:
       
   443             {
       
   444             return iRectBtnBackspace;
       
   445             }
       
   446         case EHwrCtrlIdArrowUp:
       
   447             {
       
   448             return iRectBtnArrowUp;
       
   449             }
       
   450         case EHwrCtrlIdArrowDown:
       
   451             {
       
   452             return iRectBtnArrowDown;
       
   453             }  
       
   454         case EHwrCtrlIdArrowLeft:
       
   455             {
       
   456             return iRectBtnArrowLeft;
       
   457             }
       
   458         case EHwrCtrlIdArrowRight:
       
   459             {
       
   460             return iRectBtnArrowRight;
       
   461             }
       
   462         case EHwrCtrlIdLanguageOption:
       
   463             {
       
   464             return iRectBtnOption;
       
   465             }
       
   466         case EHwrCtrlIdVkbSwitcher:
       
   467             {
       
   468             return iRectBtnImeSwitch;
       
   469             }
       
   470         case EHwrCtrlIdSctPage0Btn:
       
   471         case EHwrCtrlIdSctPage1Btn:
       
   472         case EHwrCtrlIdSctPage2Btn:
       
   473             {
       
   474             return iRectBtnSctPage;
       
   475             }
       
   476         }
       
   477     return TRect();
       
   478     }
       
   479 
       
   480 // ---------------------------------------------------------------------------
       
   481 // get rect of ICF control.
       
   482 // ---------------------------------------------------------------------------
       
   483 // 
       
   484 TRect CPeninputFingerHwrLAFManager::IcfRect()
       
   485     {    
       
   486     return iRectIcf;    
       
   487     }
       
   488 
       
   489 // ---------------------------------------------------------------------------
       
   490 // get left margin of icf.
       
   491 // ---------------------------------------------------------------------------
       
   492 // 
       
   493 TInt CPeninputFingerHwrLAFManager::IcfLeftMargin()
       
   494     {
       
   495     return iIcfTextLeftMarginCn;
       
   496     }
       
   497     
       
   498 // ---------------------------------------------------------------------------
       
   499 // get right margin of icf.
       
   500 // ---------------------------------------------------------------------------
       
   501 // 
       
   502 TInt CPeninputFingerHwrLAFManager::IcfRightMargin()
       
   503     { 
       
   504     return iIcfTextRightMarginCn;
       
   505     }    
       
   506 
       
   507 // ---------------------------------------------------------------------------
       
   508 // get top margin of icf.
       
   509 // ---------------------------------------------------------------------------
       
   510 // 
       
   511 TInt CPeninputFingerHwrLAFManager::IcfTopMargin()
       
   512     {
       
   513     return iIcfTextTopMarginCn;
       
   514     }
       
   515     
       
   516 // ---------------------------------------------------------------------------
       
   517 // get bottom margin of icf.
       
   518 // ---------------------------------------------------------------------------
       
   519 // 
       
   520 TInt CPeninputFingerHwrLAFManager::IcfBottomMargin()
       
   521     {      
       
   522     return iIcfTextBottomMarginCn;
       
   523     }
       
   524     
       
   525 // ---------------------------------------------------------------------------
       
   526 // get line spacing of icf.
       
   527 // ---------------------------------------------------------------------------
       
   528 // 
       
   529 TInt CPeninputFingerHwrLAFManager::IcfLineSpaceMargin()
       
   530     {  
       
   531     return iIcfTextLineSpaceMarginCn;
       
   532     }    
       
   533     
       
   534 // ---------------------------------------------------------------------------
       
   535 // get font of icf.
       
   536 // ---------------------------------------------------------------------------
       
   537 // 
       
   538 CFont* CPeninputFingerHwrLAFManager::IcfFont()
       
   539     {
       
   540     return iIcfFont;
       
   541     }
       
   542    
       
   543 // ---------------------------------------------------------------------------
       
   544 // get text height of icf.
       
   545 // ---------------------------------------------------------------------------
       
   546 // 
       
   547 TInt CPeninputFingerHwrLAFManager::IcfTextHeight()
       
   548     { 
       
   549     return iIcfTextHeightCn;
       
   550     }
       
   551        
       
   552 
       
   553 // ---------------------------------------------------------------------------
       
   554 // get inner padding of buttons.
       
   555 // ---------------------------------------------------------------------------
       
   556 //
       
   557 TSize CPeninputFingerHwrLAFManager::ButtonInnerPadding()
       
   558     {
       
   559     return iSizeBtnPadding;
       
   560     }
       
   561 
       
   562 
       
   563 // ---------------------------------------------------------------------------
       
   564 // get cell size of virtual numpad.
       
   565 // ---------------------------------------------------------------------------
       
   566 //
       
   567 TRect CPeninputFingerHwrLAFManager::VirtualNumpadCellSize()
       
   568     {
       
   569     return iSizeNumpadCell;
       
   570     }
       
   571     
       
   572 
       
   573 // ---------------------------------------------------------------------------
       
   574 // get text layout of virtual numpad.
       
   575 // ---------------------------------------------------------------------------
       
   576 //
       
   577 TAknTextLineLayout CPeninputFingerHwrLAFManager::NumpadKeyTxtLayout()
       
   578     {
       
   579     TAknTextLineLayout layout = AknLayoutScalable_Avkon::
       
   580         cell_fshwr2_syb_bg_pane_t1(0).LayoutLine();
       
   581     return layout;    
       
   582     }
       
   583 
       
   584 // ---------------------------------------------------------------------------
       
   585 // get row count of virtual sctpad.
       
   586 // ---------------------------------------------------------------------------
       
   587 //
       
   588 TInt CPeninputFingerHwrLAFManager::VirtualSctpadRowCount()
       
   589     {
       
   590     return iSctpadRowCount;
       
   591     }
       
   592 
       
   593 // ---------------------------------------------------------------------------
       
   594 // get column count of virtual sctpad.
       
   595 // ---------------------------------------------------------------------------
       
   596 //
       
   597 TInt CPeninputFingerHwrLAFManager::VirtualSctpadColCount()
       
   598     {
       
   599     return iSctpadColCount;
       
   600     }
       
   601 
       
   602 // ---------------------------------------------------------------------------
       
   603 // get cell size of virtual sctpad.
       
   604 // ---------------------------------------------------------------------------
       
   605 //
       
   606 TRect CPeninputFingerHwrLAFManager::VirtualSctpadCellSize()
       
   607     {
       
   608     return iSizeSctpadCell;
       
   609     }
       
   610 
       
   611 // ---------------------------------------------------------------------------
       
   612 // get cell size of virtual sctpad.
       
   613 // ---------------------------------------------------------------------------
       
   614 //
       
   615 TRect CPeninputFingerHwrLAFManager::FixVirtualSctpadCellSize()
       
   616     {
       
   617     return iSizeFixSctpadCell;
       
   618     }
       
   619     
       
   620     
       
   621 // ---------------------------------------------------------------------------
       
   622 // get preview bubble rect.
       
   623 // ---------------------------------------------------------------------------
       
   624 //
       
   625 TRect CPeninputFingerHwrLAFManager::PreviewBubbleRect()
       
   626     {
       
   627     return iPreviewWndRect;
       
   628     }
       
   629 
       
   630 // ---------------------------------------------------------------------------
       
   631 // get preview bubble inner rect
       
   632 // ---------------------------------------------------------------------------
       
   633 //
       
   634 TRect CPeninputFingerHwrLAFManager::PreviewBubbleInnerRect()
       
   635     {
       
   636     return iPreviewWndInnerRect;
       
   637     }
       
   638  
       
   639 // ---------------------------------------------------------------------------
       
   640 // get preview bubble font
       
   641 // ---------------------------------------------------------------------------
       
   642 //
       
   643 const CFont* CPeninputFingerHwrLAFManager::PreviewBubbleFont()
       
   644     {
       
   645     return iBubbleFont;
       
   646     }
       
   647 
       
   648 // ---------------------------------------------------------------------------
       
   649 // get preview bubble text layout
       
   650 // ---------------------------------------------------------------------------
       
   651 //
       
   652 TAknTextLineLayout CPeninputFingerHwrLAFManager::PreviewBubbleTextLayout()
       
   653     {
       
   654     return iPreviewWndText;
       
   655     }
       
   656 
       
   657 // ---------------------------------------------------------------------------
       
   658 // get cell rect of virtual sctpad.
       
   659 // ---------------------------------------------------------------------------
       
   660 //
       
   661 void CPeninputFingerHwrLAFManager::GetVirtualKeyRects( RArray<TRect>& aArrayRects )
       
   662     {   
       
   663     aArrayRects.Reset();
       
   664     
       
   665     for(TInt i = 0; i < iSCTrectArray.Count(); i++)
       
   666         {
       
   667         TRect absoluteRect = iSCTrectArray[i];
       
   668         absoluteRect.Move(-iRectSctpad.iTl.iX, -iRectSctpad.iTl.iY);
       
   669         aArrayRects.Append(absoluteRect);
       
   670         } 
       
   671     }
       
   672 
       
   673 // ---------------------------------------------------------------------------
       
   674 // get space and enter key rect.
       
   675 // ---------------------------------------------------------------------------
       
   676 //
       
   677 void CPeninputFingerHwrLAFManager::GetFixVirtualKeyRects( RArray<TRect>& aArrayRects )
       
   678     {   
       
   679     aArrayRects.Reset();
       
   680     aArrayRects.Append( iRectSpase );
       
   681     aArrayRects.Append( iRectEnter );
       
   682         
       
   683     }
       
   684 
       
   685 // ---------------------------------------------------------------------------
       
   686 // get text layout of virtual sctpad.
       
   687 // ---------------------------------------------------------------------------
       
   688 //
       
   689 TAknTextLineLayout CPeninputFingerHwrLAFManager::SctpadKeyTxtLayout()
       
   690     {
       
   691     TAknTextLineLayout layout = AknLayoutScalable_Avkon::
       
   692         cell_fshwr2_syb_bg_pane_t1(0).LayoutLine();
       
   693     return layout;
       
   694     }
       
   695 
       
   696 // ---------------------------------------------------------------------------
       
   697 // get text layout of space and enter.
       
   698 // ---------------------------------------------------------------------------
       
   699 //
       
   700 TAknTextLineLayout CPeninputFingerHwrLAFManager::FixSctpadKeyTxtLayout()
       
   701     {
       
   702     //TAknTextLineLayout layout = AknLayoutScalable_Avkon::
       
   703     //    cell_fshwr2_syb_bg_pane_t1(0).LayoutLine();
       
   704     TAknTextLineLayout layout = AknLayoutScalable_Avkon::
       
   705     	fshwr2_func_candi_cell_pane_t1(0).LayoutLine();
       
   706     return layout;
       
   707     }
       
   708 
       
   709 // ---------------------------------------------------------------------------
       
   710 // get width unit of candidate list.
       
   711 // ---------------------------------------------------------------------------
       
   712 //
       
   713 TInt CPeninputFingerHwrLAFManager::CandidateUnitWidth()
       
   714     {
       
   715     return iCandsUnitWidth;
       
   716     }
       
   717 
       
   718 // ---------------------------------------------------------------------------
       
   719 // get height unit of candidate list.
       
   720 // ---------------------------------------------------------------------------
       
   721 //
       
   722 TInt CPeninputFingerHwrLAFManager::CandidateUnitHeight()
       
   723     {
       
   724     return iCandsUnitHeight;
       
   725     }
       
   726 
       
   727 // ---------------------------------------------------------------------------
       
   728 // get horizontal margin of candidate list.
       
   729 // ---------------------------------------------------------------------------
       
   730 //
       
   731 TInt CPeninputFingerHwrLAFManager::CandidateHorizontalMargin()
       
   732     {
       
   733     return iCandsHorizontalMargin;
       
   734     }    
       
   735 
       
   736 // ---------------------------------------------------------------------------
       
   737 // get vertical margin of candidate list.
       
   738 // ---------------------------------------------------------------------------
       
   739 //
       
   740 TInt CPeninputFingerHwrLAFManager::CandidateVerticalMargin()
       
   741     {
       
   742     return iCandsVerticalMargin;
       
   743     }    
       
   744    
       
   745 // ---------------------------------------------------------------------------
       
   746 // get top-left position of candidate list.
       
   747 // ---------------------------------------------------------------------------
       
   748 //
       
   749 TPoint CPeninputFingerHwrLAFManager::CandidateLTPos()
       
   750     {
       
   751     return iCandidateLTPos;
       
   752     }
       
   753 
       
   754 // ---------------------------------------------------------------------------
       
   755 // get top-left position of predictive list.
       
   756 // ---------------------------------------------------------------------------
       
   757 //
       
   758 TPoint CPeninputFingerHwrLAFManager::PredictiveLTPos()
       
   759     {
       
   760     return iPredictiveLTPos;
       
   761     }
       
   762    
       
   763 // ---------------------------------------------------------------------------
       
   764 // get font of candidate list.
       
   765 // ---------------------------------------------------------------------------
       
   766 //
       
   767 const CFont* CPeninputFingerHwrLAFManager::CandidateFont()
       
   768     {   
       
   769     return iCandsFont;
       
   770     }
       
   771 
       
   772 // ---------------------------------------------------------------------------
       
   773 // c++ constructor
       
   774 // ---------------------------------------------------------------------------
       
   775 //
       
   776 CPeninputFingerHwrLAFManager::CPeninputFingerHwrLAFManager()
       
   777     {
       
   778     
       
   779     }
       
   780     
       
   781 // ---------------------------------------------------------------------------
       
   782 // Symbian second-phase constructor
       
   783 // ---------------------------------------------------------------------------
       
   784 //
       
   785 void CPeninputFingerHwrLAFManager::ConstructL()
       
   786     {
       
   787     }
       
   788 
       
   789 // End Of File