textinput/peninputfingerhwrar/src/peninputfingerhwrarlafmanager.cpp
branchRCL_3
changeset 10 6defe5d1bd39
parent 8 6ceef9a83b1a
child 19 5e18d8c489d6
equal deleted inserted replaced
8:6ceef9a83b1a 10:6defe5d1bd39
     1 /*
     1 /*
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
     2 * Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     4 * This component and the accompanying materials are made available
     5 * under the terms of "Eclipse Public License v1.0"
     5 * under the terms of "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
    22 #include <aknutils.h>
    22 #include <aknutils.h>
    23 
    23 
    24 #include "peninputfingerhwrarlafmanager.h"
    24 #include "peninputfingerhwrarlafmanager.h"
    25 #include "peninputfingerhwrarcontrolid.h"
    25 #include "peninputfingerhwrarcontrolid.h"
    26 
    26 
    27 #define LAF_MODIFY 1
    27 //#define HackerVersion 
    28 #define HackerVersion 
    28 #define ARABIC_LAF
       
    29 
       
    30 const TInt KSymButtonNum = 3;
       
    31 const TInt KFuncButtonRowNum = 2;
       
    32 const TInt KFuncButtonColNum = 4;
       
    33 const TInt KLandscapeVirtualKeypadRow = 4;
       
    34 const TInt KLandscapeVirtualKeypadCol = 6;
    29 
    35 
    30 // ---------------------------------------------------------------------------
    36 // ---------------------------------------------------------------------------
    31 // Symbian Constructor
    37 // Symbian Constructor
    32 // ---------------------------------------------------------------------------
    38 // ---------------------------------------------------------------------------
    33 //
    39 //
    49     self->ConstructL();
    55     self->ConstructL();
    50     return self;
    56     return self;
    51     }
    57     }
    52 
    58 
    53 // ---------------------------------------------------------------------------
    59 // ---------------------------------------------------------------------------
       
    60 // c++ constructor
       
    61 // ---------------------------------------------------------------------------
       
    62 //
       
    63 CPeninputFingerHwrArLafManager::CPeninputFingerHwrArLafManager()
       
    64     {
       
    65     
       
    66     }
       
    67     
       
    68 // ---------------------------------------------------------------------------
       
    69 // Symbian second-phase constructor
       
    70 // ---------------------------------------------------------------------------
       
    71 //
       
    72 void CPeninputFingerHwrArLafManager::ConstructL()
       
    73     {
       
    74     }
       
    75 	
       
    76 // ---------------------------------------------------------------------------
    54 // c++ destructor
    77 // c++ destructor
    55 // ---------------------------------------------------------------------------
    78 // ---------------------------------------------------------------------------
    56 //
    79 //
    57 CPeninputFingerHwrArLafManager::~CPeninputFingerHwrArLafManager()
    80 CPeninputFingerHwrArLafManager::~CPeninputFingerHwrArLafManager()
    58     {
    81     {
    59     //nothing
       
    60     iSCTrectArray.Reset();
       
    61     iSCTrectArray.Close();
    82     iSCTrectArray.Close();
    62     }
    83 	iSymBtnRectArray.Close();
    63 
    84     }
    64 
    85 
    65 // ---------------------------------------------------------------------------
    86 // ---------------------------------------------------------------------------
    66 // read laf data.
    87 // CPeninputFingerHwrArLafManager::RetrieveLayoutData()
    67 // ---------------------------------------------------------------------------
    88 // Retrieve layout data
    68 //
    89 // ---------------------------------------------------------------------------
    69 void CPeninputFingerHwrArLafManager::ReadLafInfo()
    90 //	
    70     {
    91 void CPeninputFingerHwrArLafManager::RetrieveLayoutData()
    71     // Screen
    92     {
       
    93 	// Screen
    72     TRect rect;
    94     TRect rect;
    73     AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EScreen, rect);
    95     AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EScreen, rect);
    74     iScreenSize = rect.Size();
    96     iScreenSize = rect.Size();
    75 
    97 
    76     iIsLandscape = iScreenSize.iWidth < iScreenSize.iHeight ? EFalse : ETrue;
    98     iIsLandscape = iScreenSize.iWidth < iScreenSize.iHeight ? EFalse : ETrue;
    84     fshwrlayout = AknLayoutScalable_Avkon::main_fep_fshwr2_pane(0).LayoutLine();
   106     fshwrlayout = AknLayoutScalable_Avkon::main_fep_fshwr2_pane(0).LayoutLine();
    85     fshwrRect.LayoutRect(rect, fshwrlayout);
   107     fshwrRect.LayoutRect(rect, fshwrlayout);
    86 
   108 
    87     iLayoutRect = fshwrRect.Rect();
   109     iLayoutRect = fshwrRect.Rect();
    88     iLayoutOffset = iLayoutRect.iTl;
   110     iLayoutOffset = iLayoutRect.iTl;
    89     
   111 	}
    90     // ICF & Keypad
   112 
    91     TAknWindowLineLayout icflayoutcn,icflayoutbgcn;
   113 // ---------------------------------------------------------------------------
    92     TAknTextLineLayout icflefttext;    
   114 // CPeninputFingerHwrArLafManager::RetrieveLafDataForICF()
    93     TAknTextLineLayout icflefttext1, icflefttext2, icflefttext3; 
   115 // Retrieve laf data for ICF editor
    94     TAknLayoutRect icfrectlatin, icfrectcn;
   116 // ---------------------------------------------------------------------------
    95 
   117 //	
    96     if (iIsLandscape)
   118 void CPeninputFingerHwrArLafManager::RetrieveLafDataForICF()
       
   119     {
       
   120 	// ICF laf data
       
   121     TAknWindowLineLayout icfLayout;
       
   122     TAknLayoutRect icfLayoutRect;
       
   123 	
       
   124     // read the icf layout 
       
   125     icfLayout = AknLayoutScalable_Avkon::fshwr2_icf_pane(1).LayoutLine();
       
   126 
       
   127     icfLayoutRect.LayoutRect(iLayoutRect, icfLayout);
       
   128 	iRectIcf = icfLayoutRect.Rect();
       
   129     
       
   130 	// read icf text line layout
       
   131     TAknTextLineLayout icfTextLineLayoutRow1 = AknLayoutScalable_Avkon::fshwr2_icf_pane_t1(0, 0, 0).LayoutLine();   
       
   132     TAknTextLineLayout icfTextLineLayoutRow2 = AknLayoutScalable_Avkon::fshwr2_icf_pane_t1(0, 0, 1).LayoutLine();
       
   133 	TInt maxRow = AknLayoutScalable_Avkon::fshwr2_icf_pane_t1_ParamLimits(0).LastRow();
       
   134     TAknTextLineLayout icfTextLineLayoutLastRow = AknLayoutScalable_Avkon::fshwr2_icf_pane_t1(0, 0, maxRow-1).LayoutLine();
       
   135     
       
   136 	// read icf layout text
       
   137 	TAknLayoutText icfLayoutText1;
       
   138 	TAknLayoutText icfLayoutText2;
       
   139 	TAknLayoutText icfLayoutTextLastRow;
       
   140   
       
   141     icfLayoutText1.LayoutText( iRectIcf, icfTextLineLayoutRow1 );
       
   142     icfLayoutText2.LayoutText( iRectIcf, icfTextLineLayoutRow2 );
       
   143     icfLayoutTextLastRow.LayoutText( iRectIcf, icfTextLineLayoutLastRow );
       
   144 	
       
   145 	// get the margins
       
   146 	iIcfTextLeftMargin      = icfTextLineLayoutRow1.il;
       
   147     iIcfTextRightMargin     = iIcfTextLeftMargin;
       
   148     iIcfTextTopMargin       = icfLayoutText1.TextRect().iTl.iY - iRectIcf.iTl.iY;
       
   149     iIcfTextLineSpaceMargin = icfLayoutText2.TextRect().iTl.iY - icfLayoutText1.TextRect().iBr.iY;
       
   150     iIcfTextBottomMargin    = iRectIcf.iBr.iY - icfLayoutTextLastRow.TextRect().iBr.iY - iIcfTextLineSpaceMargin;
       
   151     iIcfTextHeight          = icfLayoutText1.TextRect().Height();    
       
   152  	
       
   153 	// get font for text
       
   154     iIcfFont = const_cast<CFont*>(AknLayoutUtils::FontFromId(icfTextLineLayoutRow1.iFont, NULL));
       
   155 	}
       
   156 
       
   157 // ---------------------------------------------------------------------------
       
   158 // CPeninputFingerHwrArLafManager::RetrieveLafDataForCandidateList()
       
   159 // Retrieve the laf data for candidate list
       
   160 // ---------------------------------------------------------------------------
       
   161 //	
       
   162 void CPeninputFingerHwrArLafManager::RetrieveLafDataForCandidateList()
       
   163     {
       
   164 	// retrieve the cell flow:
       
   165 	// fshwr2_func_candi_pane->fshwr2_func_candi_row_pane->fshwr2_func_candi_cell_pane
       
   166 	// ->fshwr2_func_candi_cell_bg_pane
       
   167 	
       
   168 	// candidate list
       
   169 	TAknWindowLineLayout candlistpane = AknLayoutScalable_Avkon::fshwr2_func_candi_pane(1).LayoutLine();        
       
   170     
       
   171 	TAknLayoutRect candpaneRect;
       
   172     candpaneRect.LayoutRect( iLayoutRect, candlistpane );
       
   173     TRect rect = candpaneRect.Rect();
       
   174 	
       
   175 	// get candiate row1 pane
       
   176     TAknWindowLineLayout candRow1Pane = AknLayoutScalable_Avkon::fshwr2_func_candi_row_pane(0, 0, 1).
       
   177 										LayoutLine();
       
   178     TAknLayoutRect candrow1paneRect;
       
   179 	candrow1paneRect.LayoutRect( rect, candRow1Pane );
       
   180      
       
   181 	// get candidate cell pane with row 1 and col 0
       
   182     TAknWindowLineLayout cellPane1Row1 = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_pane( 2 , 0 , 1 ).
       
   183 										LayoutLine();
       
   184     TAknLayoutRect cellPane1Row1Rect;
       
   185 	cellPane1Row1Rect.LayoutRect( candrow1paneRect.Rect(), cellPane1Row1 );
       
   186     
       
   187 	// get candidate cell bg pane 
       
   188     TAknWindowLineLayout candbgpane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_bg_pane(2).LayoutLine();
       
   189 	TAknLayoutRect cellPane1Row1BgRect;
       
   190     cellPane1Row1BgRect.LayoutRect( cellPane1Row1Rect.Rect(), candbgpane );   
       
   191 	
       
   192 	// get candidate cell pane with row 1 and col 1
       
   193     TAknWindowLineLayout cellPane2Row1 = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_pane( 2 , 1 , 1 ).
       
   194 										LayoutLine();
       
   195     TAknLayoutRect cellPane2Row1Rect;
       
   196 	cellPane2Row1Rect.LayoutRect( candrow1paneRect.Rect(), cellPane2Row1 );
       
   197 	
       
   198 	// get candidate cell2 bg pane
       
   199 	candbgpane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_bg_pane(2).LayoutLine();
       
   200     TAknLayoutRect cellPane2Row1BgRect;
       
   201 	cellPane2Row1BgRect.LayoutRect( cellPane2Row1Rect.Rect(), candbgpane );
       
   202 	
       
   203 	// ====================================================================================================
       
   204 	// get candidate row2 pane
       
   205     TAknWindowLineLayout candRow2Pane = AknLayoutScalable_Avkon::fshwr2_func_candi_row_pane(0, 0, 2).
       
   206 										LayoutLine();
       
   207     TAknLayoutRect candrow2paneRect;
       
   208 	candrow2paneRect.LayoutRect( rect, candRow2Pane );
       
   209 	
       
   210 	// get candidate cell pane with row 2 and col 0
       
   211     TAknWindowLineLayout cellPane1Row2 = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_pane( 2 , 0 , 0 ).
       
   212 										LayoutLine();
       
   213     TAknLayoutRect cellPane1Row2Rect;
       
   214 	cellPane1Row2Rect.LayoutRect( candrow2paneRect.Rect(), cellPane1Row2 );
       
   215     
       
   216 	// get the candidate cell bg pane with row 2 and col 0
       
   217     candbgpane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_bg_pane(2).LayoutLine();
       
   218 	TAknLayoutRect cellPane1Row2BgRect;
       
   219 	cellPane1Row2BgRect.LayoutRect( cellPane1Row2Rect.Rect(), candbgpane );   
       
   220 	
       
   221     // calculate the margins	
       
   222     iCandsHorizontalMargin = cellPane2Row1BgRect.Rect().iTl.iX - cellPane1Row1BgRect.Rect().iBr.iX;
       
   223     iCandsVerticalMargin = cellPane1Row2BgRect.Rect().iTl.iY - cellPane1Row1BgRect.Rect().iBr.iY;
       
   224 	
       
   225     iCandsUnitWidth = cellPane1Row1BgRect.Rect().Width();
       
   226     iCandsUnitHeight = cellPane1Row1BgRect.Rect().Height();
       
   227     
       
   228     iCandidateLTPos = candrow1paneRect.Rect().iTl;
       
   229     
       
   230 	// get candidate text laf data
       
   231     TAknTextLineLayout candsTextLayout = 
       
   232                      AknLayoutScalable_Avkon::fshwr2_func_candi_cell_pane_t1(1).LayoutLine();
       
   233     TAknLayoutText candsText;
       
   234     candsText.LayoutText( cellPane1Row1Rect.Rect(), candsTextLayout );
       
   235     iCandsFont = const_cast<CFont*>( AknLayoutUtils::FontFromId( candsTextLayout.iFont, NULL ) );
       
   236     iCandsTextMargin = candsText.TextRect().iTl.iX - cellPane1Row1Rect.Rect().iTl.iX;
       
   237 	}
       
   238 
       
   239 // ---------------------------------------------------------------------------
       
   240 // CPeninputFingerHwrArLafManager::RetrieveLafDataForFunctionalButton()
       
   241 // Retrieve the laf data for functional group
       
   242 // ---------------------------------------------------------------------------
       
   243 //	
       
   244 void CPeninputFingerHwrArLafManager::RetrieveLafDataForFunctionalButton()
       
   245     {
       
   246 	// retrieve the button laf flow:
       
   247 	// fshwr2_func_candi_pane->fshwr2_func_candi_row_pane->fshwr2_func_candi_cell_pane
       
   248 	// ->fshwr2_func_candi_cell_bg_pane
       
   249 	
       
   250 	// candidate list
       
   251 	TAknWindowLineLayout candlistpane = AknLayoutScalable_Avkon::fshwr2_func_candi_pane(1).LayoutLine();        
       
   252     
       
   253 	TAknLayoutRect candpaneRect;
       
   254     candpaneRect.LayoutRect( iLayoutRect, candlistpane );
       
   255     TRect rect = candpaneRect.Rect();
       
   256 	
       
   257 	TAknWindowLineLayout candRowPane;
       
   258 	TAknLayoutRect candRowPaneRect;
       
   259 	
       
   260 	TAknWindowLineLayout cellPane;
       
   261     TAknLayoutRect cellPaneRect;
       
   262 	
       
   263 	TAknWindowLineLayout buttonBgPane;
       
   264 	TAknLayoutRect cellPaneRowBgRect;
       
   265 	
       
   266 	RArray<TRect> buttonRect;
       
   267 	for(TInt row = 0; row < KFuncButtonRowNum; row++)
       
   268 	    {
       
   269 		candRowPane = AknLayoutScalable_Avkon::fshwr2_func_candi_row_pane(0, 0, row).LayoutLine();
       
   270 		candRowPaneRect.LayoutRect( rect, candRowPane );
       
   271 		
       
   272 		for(TInt col = 0; col < KFuncButtonColNum; col++)
       
   273             {
       
   274 			// cell pane
       
   275 			cellPane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_pane( 2 , col , row ).LayoutLine();
       
   276 			cellPaneRect.LayoutRect(candRowPaneRect.Rect(),cellPane);
       
   277 			
       
   278 			// cell bg pane
       
   279 			buttonBgPane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_bg_pane(2).LayoutLine();
       
   280             cellPaneRowBgRect.LayoutRect( cellPaneRect.Rect(), buttonBgPane );
       
   281 			buttonRect.Append(cellPaneRowBgRect.Rect());
       
   282 			}			
       
   283 		}
       
   284 	
       
   285 	// assign the functional button
       
   286     TInt i = 0;	
       
   287 	iRectBtnClose =      buttonRect[i++];
       
   288     iRectBtnOption =     buttonRect[i++];
       
   289     iRectBtnRangeSmb = 	 buttonRect[i++];
       
   290 	iRectBtnBackspace =  buttonRect[i++];
       
   291 	iRectBtnArrowUp =    buttonRect[i++];
       
   292 	iRectBtnArrowDown =  buttonRect[i++];
       
   293 	iRectBtnArrowLeft =  buttonRect[i++];
       
   294 	iRectBtnArrowRight = buttonRect[i++];
       
   295 	buttonRect.Close();
       
   296 	
       
   297 	// padding size of Btn
       
   298 	iSizeBtnPadding = TSize(6, 6);
       
   299 	
       
   300 	// padding size of arrow button
       
   301 	if(iIsLandscape)
       
   302 	    {
       
   303 	    iArrowPaddingSize = TSize(8,8);	
       
   304 		}
       
   305 	else
    97         {
   306         {
    98         icflayoutcn = AknLayoutScalable_Avkon::fshwr2_icf_pane(1).LayoutLine();
   307 		iArrowPaddingSize = TSize(12,12);
    99         }
   308 		}	
   100     else
   309 	}
       
   310 
       
   311 // ---------------------------------------------------------------------------
       
   312 // CPeninputFingerHwrArLafManager::RetrieveLafDataForHwrBox()
       
   313 // Retrieve the laf data for hwr writing area
       
   314 // ---------------------------------------------------------------------------
       
   315 //	
       
   316 void CPeninputFingerHwrArLafManager::RetrieveLafDataForHwrBox()
       
   317     {
       
   318 	TAknWindowLineLayout writingBoxPane;
       
   319     TAknLayoutRect boxRect;
       
   320     writingBoxPane = AknLayoutScalable_Avkon::fshwr2_hwr_syb_pane(1).LayoutLine();
       
   321     boxRect.LayoutRect(iLayoutRect, writingBoxPane);
       
   322     iRectWritingBox = boxRect.Rect();
       
   323 	
       
   324 	// need read laf data?
       
   325 	iIndicatorRect.iTl = iRectWritingBox.iTl;
       
   326 	iIndicatorRect.iTl = iIndicatorRect.iTl + TPoint(20,20);
       
   327 	iIndicatorRect.SetSize(TSize(80,80));
       
   328 	}
       
   329 	
       
   330 // ---------------------------------------------------------------------------
       
   331 // CPeninputFingerHwrArLafManager::RetrieveLafDataForSymbolTable()
       
   332 // Retrieve the laf data for symbol table area
       
   333 // ---------------------------------------------------------------------------
       
   334 //	
       
   335 void CPeninputFingerHwrArLafManager::RetrieveLafDataForSymbolTable()
       
   336     {
       
   337 	if(iIsLandscape)
       
   338 	    {
       
   339 	    RetrieveLandscapeLafDataForSymbolTable();
       
   340 		}
       
   341 	else
   101         {
   342         {
   102         icflayoutcn = AknLayoutScalable_Avkon::fshwr2_icf_pane(0).LayoutLine();
   343 		RetrievePortraitLafDataForSymbolTable();
   103         }
   344 		}	    	
   104     
   345     }
   105     icfrectcn.LayoutRect(fshwrRect.Rect(), icflayoutcn);
   346 
   106 	
   347 // ---------------------------------------------------------------------------
   107     TAknLayoutScalableParameterLimits entryPaneVariety = 
   348 // CPeninputFingerHwrArLafManager::RetrieveLandscapeLafDataForSymbolTable()
   108                 AknLayoutScalable_Avkon::fshwr2_icf_pane_t1_ParamLimits(0);
   349 // Retrieve the landscape laf data for symbol table area
   109     TInt maxRow = entryPaneVariety.LastRow();
   350 // ---------------------------------------------------------------------------
   110     
   351 //	
   111     icflefttext = AknLayoutScalable_Avkon::fshwr2_icf_pane_t1(0, 0, 0).LayoutLine();
   352 void CPeninputFingerHwrArLafManager::RetrieveLandscapeLafDataForSymbolTable()
   112     
   353     {
   113     icflefttext1 = AknLayoutScalable_Avkon::fshwr2_icf_pane_t1(0, 0, 1).LayoutLine();
   354 	TAknLayoutScalableParameterLimits candiPaneVariety = AknLayoutScalable_Avkon::fshwr2_func_candi_pane_ParamLimits(2);
   114     icflefttext2 = AknLayoutScalable_Avkon::fshwr2_icf_pane_t1(0, 0, 2).LayoutLine();
   355     
   115     icflefttext3 = AknLayoutScalable_Avkon::fshwr2_icf_pane_t1(0, 0, maxRow).LayoutLine();
   356 	iSctpadRowCount = KLandscapeVirtualKeypadRow;//candiPaneVariety.LastRow();
   116     iIcfTextLeftMarginCn = icflefttext.il;
   357 	iSctpadColCount = KLandscapeVirtualKeypadCol;//candiPaneVariety.LastColumn() + 1;
   117     iIcfTextRightMarginCn = iIcfTextLeftMarginCn;
   358 
   118     
   359 	// get the functional buttons laf data for symbol table
   119     TAknLayoutText ctxt, ctxt1, ctxt2, ctxt3;
       
   120     ctxt.LayoutText( icfrectcn.Rect(), icflefttext );
       
   121     ctxt1.LayoutText( icfrectcn.Rect(), icflefttext1 );
       
   122     ctxt2.LayoutText( icfrectcn.Rect(), icflefttext2 );
       
   123     ctxt3.LayoutText( icfrectcn.Rect(), icflefttext3 );
       
   124 	
       
   125     iIcfTextTopMarginCn = ctxt.TextRect().iTl.iY - icfrectcn.Rect().iTl.iY;
       
   126     iIcfTextLineSpaceMarginCn = ctxt1.TextRect().iTl.iY - ctxt.TextRect().iBr.iY;
       
   127     iIcfTextBottomMarginCn = icfrectcn.Rect().iBr.iY - ctxt3.TextRect().iBr.iY 
       
   128                                                      - iIcfTextLineSpaceMarginCn;
       
   129     iIcfTextHeightCn = ctxt.TextRect().Height();    
       
   130  	
       
   131     iIcfFont = const_cast<CFont*>(AknLayoutUtils::FontFromId(icflefttext.iFont, NULL));
       
   132 
       
   133     iRectIcf = icfrectcn.Rect();
       
   134     
       
   135 	// candidate list
   360 	// candidate list
   136     TAknWindowLineLayout candrowpane, candrowpane2, candlistpane, cellpane, candbgpane;
   361 	TAknWindowLineLayout candlistpane = AknLayoutScalable_Avkon::fshwr2_func_candi_pane(2).LayoutLine(); 
   137     TAknLayoutRect candpaneRect, candrowpaneRect, candrowpaneRect2, cellpaneRect1, cellpaneRect2;
   362 	TAknLayoutRect candpaneRect;
   138     TAknLayoutRect cellpaneRect3, cellpaneRect;
   363 	candpaneRect.LayoutRect( iLayoutRect, candlistpane );
   139 	
   364 	iRectOfSymbolTable = candpaneRect.Rect();
   140     if (iIsLandscape)
   365 	
   141         {
   366 	// get candidate row1 pane
   142 		candlistpane = AknLayoutScalable_Avkon::fshwr2_func_candi_pane(1).
   367 	TAknWindowLineLayout candRow1Pane = AknLayoutScalable_Avkon::fshwr2_func_candi_row_pane(1, 0, 0).LayoutLine();
   143 										LayoutLine();        
   368 	TAknLayoutRect candrow1paneRect;
   144         }
   369 	candrow1paneRect.LayoutRect( iRectOfSymbolTable, candRow1Pane );
   145     else
   370 	
   146         {
   371 	iSymBtnRectArray.Reset();
   147        	candlistpane = AknLayoutScalable_Avkon::fshwr2_func_candi_pane(0).
   372 	for(TInt i = 0; i < 2; i++)
       
   373 		{
       
   374 		// get candidate cell pane with row 0 and col i
       
   375 		TAknWindowLineLayout cellPane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_pane( 0, i , 0 ).
       
   376 											LayoutLine();
       
   377 		TAknLayoutRect cellPaneRect;
       
   378 		cellPaneRect.LayoutRect( candrow1paneRect.Rect(), cellPane );
       
   379 
       
   380 		// get the candidate cell bg pane with row 0 and col i
       
   381 		TAknWindowLineLayout candbgpane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_bg_pane(1).LayoutLine();
       
   382 		TAknLayoutRect BgRect;
       
   383 		BgRect.LayoutRect( cellPaneRect.Rect(), candbgpane ); 
       
   384 		iSymBtnRectArray.Append(BgRect.Rect());
       
   385 		}
       
   386 	
       
   387 	TInt xGap = iSymBtnRectArray[1].iTl.iX - iSymBtnRectArray[0].iBr.iX;
       
   388 	TRect thirdBtn(iSymBtnRectArray[1]);
       
   389 	thirdBtn.Move(TPoint(iSymBtnRectArray[1].Width(),0));
       
   390 	iSymBtnRectArray.Append(thirdBtn);
       
   391 	
       
   392 	TAknWindowLineLayout rowPane, key1bgpane, keypane;
       
   393 	TAknLayoutRect rowRect, key1bgRect, keyRect;
       
   394 	
       
   395 	TAknWindowLineLayout row1Pane = AknLayoutScalable_Avkon::fshwr2_func_candi_row_pane(1, 0, 1).LayoutLine();
       
   396 	TAknLayoutRect row1Rect;
       
   397 	row1Rect.LayoutRect(iRectOfSymbolTable,row1Pane);
       
   398 	iRectSctpad.iTl = row1Rect.Rect().iTl;
       
   399 	iRectSctpad.iBr = iRectOfSymbolTable.iBr;
       
   400 	
       
   401 	keypane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_pane( 3, 0 , 0 ).
       
   402 																LayoutLine();
       
   403 	keyRect.LayoutRect(row1Rect.Rect(), keypane);
       
   404 	
       
   405 	key1bgpane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_bg_pane(3).LayoutLine();
       
   406 	key1bgRect.LayoutRect(keyRect.Rect(), key1bgpane);
       
   407 	
       
   408 	keypane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_pane( 3, 1 , 0 ).
       
   409 																		LayoutLine();
       
   410 	keyRect.LayoutRect(row1Rect.Rect(), keypane);
       
   411 	
       
   412 	TAknWindowLineLayout key2bgpane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_bg_pane(3).LayoutLine();
       
   413 	TAknLayoutRect key2bgRect;
       
   414 	key2bgRect.LayoutRect(keyRect.Rect(), key2bgpane);
       
   415 	
       
   416 	TAknWindowLineLayout row2Pane = AknLayoutScalable_Avkon::fshwr2_func_candi_row_pane(1, 0, 2).LayoutLine();
       
   417 	TAknLayoutRect row2Rect;
       
   418 	row2Rect.LayoutRect(iRectOfSymbolTable,row2Pane);
       
   419 	
       
   420 	keypane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_pane( 3, 0 , 0 ).LayoutLine();
       
   421 	keyRect.LayoutRect(row2Rect.Rect(), keypane);
       
   422 	
       
   423 	TAknWindowLineLayout key3bgpane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_bg_pane(3).LayoutLine();
       
   424 	TAknLayoutRect key3bgRect;
       
   425 	key3bgRect.LayoutRect(keyRect.Rect(), key3bgpane);
       
   426 			
       
   427 	TInt keyHorizontalGap = key2bgRect.Rect().iTl.iX - key1bgRect.Rect().iBr.iX;
       
   428 	TInt keyVerticalGap = key3bgRect.Rect().iTl.iY - key1bgRect.Rect().iBr.iY;
       
   429 	
       
   430 	TRect cursorRect(key1bgRect.Rect());
       
   431 	TRect originRect(key1bgRect.Rect());
       
   432 	TInt rectHeight = cursorRect.Height();
       
   433 	TInt rectWidth = cursorRect.Width();
       
   434 	
       
   435 	iSCTrectArray.Reset();
       
   436 	for(TInt i = 0; i < iSctpadRowCount; i++)
       
   437 		{
       
   438 		cursorRect = originRect;
       
   439 		cursorRect.Move(0,i*(rectHeight+keyVerticalGap));
       
   440 		iSCTrectArray.Append(cursorRect);
       
   441 		for(TInt j = 1; j < iSctpadColCount; j++)
       
   442 			{
       
   443 			cursorRect.Move((rectWidth+keyHorizontalGap),0);
       
   444 			iSCTrectArray.Append(cursorRect);
       
   445 			}
       
   446 		}
       
   447 	}
       
   448 
       
   449 // ---------------------------------------------------------------------------
       
   450 // CPeninputFingerHwrArLafManager::RetrievePortraitLafDataForSymbolTable()
       
   451 // Retrieve the portrait laf data for symbol table area
       
   452 // ---------------------------------------------------------------------------
       
   453 //	
       
   454 void CPeninputFingerHwrArLafManager::RetrievePortraitLafDataForSymbolTable()
       
   455     {
       
   456 	// get the functional buttons laf data for symbol table
       
   457 	// candidate list
       
   458 	TAknWindowLineLayout candlistpane = AknLayoutScalable_Avkon::fshwr2_func_candi_pane(1).LayoutLine();        
       
   459 	
       
   460 	TAknLayoutRect candpaneRect;
       
   461 	candpaneRect.LayoutRect( iLayoutRect, candlistpane );
       
   462 	TRect rect = candpaneRect.Rect();
       
   463 	
       
   464 	// get candidate row2 pane
       
   465 	TAknWindowLineLayout candRow2Pane = AknLayoutScalable_Avkon::fshwr2_func_candi_row_pane(0, 0, 1).
   148 										LayoutLine();
   466 										LayoutLine();
   149         }
   467 	TAknLayoutRect candrow2paneRect;
   150     candpaneRect.LayoutRect( fshwrRect.Rect(), candlistpane );
   468 	candrow2paneRect.LayoutRect( rect, candRow2Pane );
   151     rect = candpaneRect.Rect();
   469 	iRectOfSymbolTable.iTl = candrow2paneRect.Rect().iTl;
   152     candrowpane = AknLayoutScalable_Avkon::fshwr2_func_candi_row_pane(0, 0, 1).
   470 	
   153 										LayoutLine();
   471 	iSymBtnRectArray.Reset();
   154     candrowpaneRect.LayoutRect( rect, candrowpane );
   472 	for(TInt i = 0; i < KSymButtonNum; i++)
   155     
   473 		{
   156     candrowpane2 = AknLayoutScalable_Avkon::fshwr2_func_candi_row_pane(0, 0, 2).
   474 		// get candidate cell pane with row 0 and col i
   157 										LayoutLine();
   475 		TAknWindowLineLayout cellPaneRow = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_pane( 1, i , 0 ).
   158     candrowpaneRect2.LayoutRect( rect, candrowpane2 );
   476 											LayoutLine();
   159      
   477 		TAknLayoutRect cellPaneRect;
   160 	
   478 		cellPaneRect.LayoutRect( candrow2paneRect.Rect(), cellPaneRow );
   161     cellpane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_pane( 3 , 0 , 0 ).
   479 
   162 										LayoutLine();
   480 		// get the candidate cell bg pane with row 0 and col i
   163     cellpaneRect.LayoutRect( candrowpaneRect.Rect(), cellpane );
   481 		TAknWindowLineLayout candbgpane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_bg_pane(1).LayoutLine();
   164     
   482 		TAknLayoutRect BgRect;
   165     candbgpane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_bg_pane(3).LayoutLine();
   483 		BgRect.LayoutRect( cellPaneRect.Rect(), candbgpane ); 
   166     cellpaneRect1.LayoutRect( cellpaneRect.Rect(), candbgpane );   
   484 		iSymBtnRectArray.Append(BgRect.Rect());
   167     
   485 		}
   168     cellpane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_pane( 3 , 1 , 0 ).
   486 	
   169 										LayoutLine();
   487 	// get the virtual key rects
   170     cellpaneRect.LayoutRect( candrowpaneRect.Rect(), cellpane );
   488 	TAknWindowLineLayout writingBoxPane;
   171     
   489 	TAknLayoutRect boxRect;
   172     candbgpane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_bg_pane(3).LayoutLine();
   490 	writingBoxPane = AknLayoutScalable_Avkon::fshwr2_hwr_syb_pane(0).LayoutLine();
   173     cellpaneRect2.LayoutRect( cellpaneRect.Rect(), candbgpane );   
   491 	boxRect.LayoutRect(iLayoutRect, writingBoxPane);
   174     
   492 	iRectSctpad = boxRect.Rect();
   175     
   493 	
   176     
   494 	TAknWindowLineLayout keypane, keybgpane;
   177     cellpane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_pane( 3 , 0 , 1 ).
   495 	TAknLayoutRect keyRect, keybgRect;
   178 										LayoutLine();
       
   179     cellpaneRect.LayoutRect( candrowpaneRect2.Rect(), cellpane );
       
   180     
       
   181     candbgpane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_bg_pane(3).LayoutLine();
       
   182     cellpaneRect3.LayoutRect( cellpaneRect.Rect(), candbgpane );   
       
   183     
       
   184 									
       
   185     iCandsHorizontalMargin = cellpaneRect2.Rect().iTl.iX - cellpaneRect1.Rect().iBr.iX;
       
   186     iCandsVerticalMargin = cellpaneRect3.Rect().iTl.iY - cellpaneRect1.Rect().iBr.iY;
       
   187 	
       
   188     iCandsUnitWidth = cellpaneRect1.Rect().Width();
       
   189     iCandsUnitHeight = cellpaneRect1.Rect().Height() ;
       
   190     
       
   191     iCandsNaviHeight = cellpaneRect1.Rect().Height();
       
   192     iCandidateLTPos = candrowpaneRect.Rect().iTl;
       
   193     iPredictiveLTPos = candrowpaneRect2.Rect().iTl;
       
   194     
       
   195     TAknTextLineLayout candstxtlayout = 
       
   196                      AknLayoutScalable_Avkon::fshwr2_func_candi_cell_pane_t1(3).LayoutLine();
       
   197     TAknLayoutText candstxt;
       
   198     candstxt.LayoutText( cellpaneRect1.Rect(), candstxtlayout );
       
   199     iCandsFont = const_cast<CFont*>( AknLayoutUtils::FontFromId( candstxtlayout.iFont, NULL ) );
       
   200     iCandsTextMargin = candstxt.TextRect().iTl.iX - cellpaneRect1.Rect().iTl.iX;
       
   201     
       
   202     
       
   203     TAknWindowLineLayout btnrowpane, btnpane, btnbgpane;
       
   204     TAknLayoutRect btnrowRect, btnRect, btnbgRect;
       
   205     
       
   206     // Get the first row rect *************************************************
       
   207     btnrowpane = AknLayoutScalable_Avkon::fshwr2_func_candi_row_pane(0, 0, 0).
       
   208                                             LayoutLine();
       
   209     btnrowRect.LayoutRect(candpaneRect.Rect(), btnrowpane);
       
   210     // Close Button
       
   211     btnpane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_pane( 2 , 0 , 0 ).
       
   212 										LayoutLine();    
       
   213     btnRect.LayoutRect(btnrowRect.Rect(), btnpane);
       
   214     btnbgpane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_bg_pane(2).
       
   215 										LayoutLine();
       
   216     btnbgRect.LayoutRect(btnRect.Rect(), btnbgpane); 
       
   217     iRectBtnClose = btnbgRect.Rect();
       
   218     
       
   219     // Range Button with mark
       
   220     btnpane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_pane( 2 , 1 , 0 ).
       
   221 										LayoutLine();
       
   222     btnRect.LayoutRect(btnrowRect.Rect(), btnpane);
       
   223     btnbgpane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_bg_pane(2).
       
   224 										LayoutLine();
       
   225     btnbgRect.LayoutRect(btnRect.Rect(), btnbgpane); 
       
   226     iRectBtnRangeChn = btnbgRect.Rect();
       
   227     iRectBtnRangeEng = iRectBtnRangeChn;
       
   228     iRectBtnRangeNum = iRectBtnRangeEng;
       
   229     
       
   230     // SCT button
       
   231     btnpane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_pane( 2 , 2 , 0 ).
       
   232 										LayoutLine();
       
   233     btnRect.LayoutRect(btnrowRect.Rect(), btnpane);
       
   234     btnbgpane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_bg_pane(2).
       
   235 										LayoutLine();
       
   236     btnbgRect.LayoutRect(btnRect.Rect(), btnbgpane); 
       
   237     iRectBtnRangeSmb = btnbgRect.Rect();
       
   238     
       
   239     // Backspace button
       
   240     btnpane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_pane( 2 , 3 , 0 ).
       
   241 										LayoutLine();
       
   242     btnRect.LayoutRect(btnrowRect.Rect(), btnpane);
       
   243     btnbgpane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_bg_pane(2).
       
   244 										LayoutLine();
       
   245     btnbgRect.LayoutRect(btnRect.Rect(), btnbgpane);
       
   246     iRectBtnBackspace = btnbgRect.Rect();    
       
   247     
       
   248     // Get the second row rect **************************************************
       
   249     btnrowpane = AknLayoutScalable_Avkon::fshwr2_func_candi_row_pane(0, 0, 1).
       
   250                                             LayoutLine();
       
   251     btnrowRect.LayoutRect(candpaneRect.Rect(), btnrowpane);
       
   252     
       
   253     // Option button
       
   254     btnpane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_pane( 1 , 0 , 0 ).
       
   255 										LayoutLine();
       
   256     btnRect.LayoutRect(btnrowRect.Rect(), btnpane);
       
   257     btnbgpane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_bg_pane(1).
       
   258 										LayoutLine();
       
   259     btnbgRect.LayoutRect(btnRect.Rect(), btnbgpane);
       
   260     iRectBtnOption = btnbgRect.Rect();     
       
   261     
       
   262     // Switch mode button
       
   263     btnpane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_pane( 1 , 1 , 0 ).
       
   264 										LayoutLine();
       
   265     btnRect.LayoutRect(btnrowRect.Rect(), btnpane);
       
   266     btnbgpane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_bg_pane(1).
       
   267 										LayoutLine();
       
   268     btnbgRect.LayoutRect(btnRect.Rect(), btnbgpane); 
       
   269     
       
   270     // Arrow up button
       
   271     btnpane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_pane( 1 , 2 , 0 ).
       
   272 										LayoutLine();
       
   273     btnRect.LayoutRect(btnrowRect.Rect(), btnpane);
       
   274     btnbgpane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_bg_pane(1).
       
   275 										LayoutLine();
       
   276     btnbgRect.LayoutRect(btnRect.Rect(), btnbgpane);  
       
   277     iRectBtnArrowUp = btnbgRect.Rect();
       
   278     iRectBtnSctPage = iRectBtnArrowUp;  
       
   279 
       
   280 
       
   281     // Get the third row rect **************************************************
       
   282     btnrowpane = AknLayoutScalable_Avkon::fshwr2_func_candi_row_pane(0, 0, 2).
       
   283                                             LayoutLine();
       
   284     btnrowRect.LayoutRect(candpaneRect.Rect(), btnrowpane);
       
   285 
       
   286     // Arrow left button
       
   287     btnpane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_pane( 1 , 0 , 0 ).
       
   288 										LayoutLine();									
       
   289     btnRect.LayoutRect(btnrowRect.Rect(), btnpane);
       
   290     btnbgpane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_bg_pane(1).
       
   291 										LayoutLine();
       
   292     btnbgRect.LayoutRect(btnRect.Rect(), btnbgpane); 
       
   293     iRectBtnArrowLeft = btnbgRect.Rect();    
       
   294     
       
   295     // Arrow right button
       
   296     btnpane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_pane( 1 , 1 , 0 ).
       
   297 										LayoutLine();
       
   298     btnRect.LayoutRect(btnrowRect.Rect(), btnpane);
       
   299     btnbgpane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_bg_pane(1).
       
   300 										LayoutLine();
       
   301 	btnbgRect.LayoutRect(btnRect.Rect(), btnbgpane);									    
       
   302     iRectBtnArrowRight = btnbgRect.Rect();
       
   303     
       
   304     // Arrow down button
       
   305     btnpane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_pane( 1 , 2 , 0 ).
       
   306 										LayoutLine();
       
   307     btnRect.LayoutRect(btnrowRect.Rect(), btnpane);
       
   308     btnbgpane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_bg_pane(1).
       
   309 										LayoutLine();
       
   310 	btnbgRect.LayoutRect(btnRect.Rect(), btnbgpane);									    
       
   311     iRectBtnArrowDown = btnbgRect.Rect();
       
   312     
       
   313     // Space button
       
   314     btnpane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_pane( 0 , 0 , 0 ).
       
   315 										LayoutLine();
       
   316     btnRect.LayoutRect(btnrowRect.Rect(), btnpane);
       
   317     btnbgpane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_bg_pane(0).
       
   318 										LayoutLine();
       
   319 	btnbgRect.LayoutRect(btnRect.Rect(), btnbgpane);									    
       
   320     
       
   321 
       
   322 
       
   323     // Enter button
       
   324     btnpane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_pane( 0 , 1 , 0 ).
       
   325 										LayoutLine();
       
   326 	btnRect.LayoutRect(btnrowRect.Rect(), btnpane);																		
       
   327     btnbgpane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_bg_pane(0).
       
   328 										LayoutLine();									
       
   329 	btnbgRect.LayoutRect(btnRect.Rect(), btnbgpane);
       
   330 										    
       
   331     iRectEnter = btnbgRect.Rect();
       
   332 
       
   333     
       
   334     // Writing box
       
   335     TAknWindowLineLayout writingboxpane;
       
   336     TAknLayoutRect boxRect;
       
   337     writingboxpane = AknLayoutScalable_Avkon::fshwr2_hwr_syb_pane(0).LayoutLine();
       
   338     boxRect.LayoutRect(fshwrRect.Rect(), writingboxpane);
       
   339     iRectWritingBox = boxRect.Rect();
       
   340     iRectNumpad = iRectWritingBox;
       
   341     iRectSctpad = iRectWritingBox;
       
   342     
       
   343     // virtual key size
       
   344     TAknWindowLineLayout keypane, keybgpane;
       
   345     TAknLayoutRect keyRect, keybgRect;
       
   346   
   496   
   347     TAknLayoutScalableParameterLimits sctPaneVariety =
   497 	TAknLayoutScalableParameterLimits sctPaneVariety =
   348         AknLayoutScalable_Avkon::cell_fshwr2_syb_pane_ParamLimits(0);
   498 		AknLayoutScalable_Avkon::cell_fshwr2_syb_pane_ParamLimits(0);
   349     
   499 	
   350     iSctpadRowCount = sctPaneVariety.LastRow() + 1;
   500 	iSctpadRowCount = sctPaneVariety.LastRow() + 1;
   351     iSctpadColCount = sctPaneVariety.LastColumn() + 1;    
   501 	iSctpadColCount = sctPaneVariety.LastColumn() + 1;    
   352   
   502   
   353     iSizeBtnPadding = TSize(6, 6);
   503 	iSCTrectArray.Reset();
   354   
   504 	for(TInt i = 0; i < iSctpadRowCount; i++)
   355     iSCTrectArray.Reset();
   505 		{
   356     for(TInt i = 0; i < iSctpadRowCount; i++)
   506 		for ( TInt j = 0; j < iSctpadColCount; j++ )
   357         {
   507 			{
   358         for ( TInt j = 0; j < iSctpadColCount; j++ )
   508 			keypane = AknLayoutScalable_Avkon::cell_fshwr2_syb_pane(0, j, i).LayoutLine();
   359             {
   509 			keyRect.LayoutRect(iRectSctpad, keypane);
   360             keypane = AknLayoutScalable_Avkon::cell_fshwr2_syb_pane(0, j, i).LayoutLine();
   510 			keybgpane = AknLayoutScalable_Avkon::cell_fshwr2_syb_bg_pane(0).LayoutLine();
   361             keyRect.LayoutRect(boxRect.Rect(), keypane);
   511 			keybgRect.LayoutRect(keyRect.Rect(), keybgpane);
   362             keybgpane = AknLayoutScalable_Avkon::cell_fshwr2_syb_bg_pane(0).LayoutLine();
   512 			iSCTrectArray.Append( keybgRect.Rect());
   363             keybgRect.LayoutRect(keyRect.Rect(), keybgpane);
   513 			}
   364             iSCTrectArray.Append( keybgRect.Rect());
   514 		}
   365             }
   515 	iSizeSctpadCell = keybgRect.Rect().Size();
   366         }
   516 
   367     iSizeNumpadCell = keybgRect.Rect().Size();
   517 	// calculate the symbol table rect	 
   368     iSizeSctpadCell = iSizeNumpadCell;
   518 	iRectOfSymbolTable.iBr = iRectSctpad.iBr;
   369     
   519 	}
   370     // preview popup window 
   520 	
       
   521 // ---------------------------------------------------------------------------
       
   522 // CPeninputFingerHwrArLafManager::RetrieveLafDataForPreviewBubble()
       
   523 // Retrieve the laf data for preview bubble
       
   524 // ---------------------------------------------------------------------------
       
   525 //	
       
   526 void CPeninputFingerHwrArLafManager::RetrieveLafDataForPreviewBubble()
       
   527     {
       
   528 	// preview popup window 
   371   	TAknWindowLineLayout previewWnd, previewWndInner;
   529   	TAknWindowLineLayout previewWnd, previewWndInner;
   372   	TAknLayoutRect previewWndRect, previewWndInnerRect;
   530   	TAknLayoutRect previewWndRect, previewWndInnerRect;
   373   	TAknLayoutText previewWndText;
   531   	TAknLayoutText previewWndText;
   374   	previewWnd = AknLayoutScalable_Avkon::popup_fep_char_preview_window(0).LayoutLine();
   532   	previewWnd = AknLayoutScalable_Avkon::popup_fep_char_preview_window(0).LayoutLine();
   375   	previewWndRect.LayoutRect( TRect(0,0,50,50), previewWnd );
   533   	previewWndRect.LayoutRect( TRect(0,0,50,50), previewWnd );
   379   	iPreviewWndInnerRect = previewWndInnerRect.Rect();
   537   	iPreviewWndInnerRect = previewWndInnerRect.Rect();
   380   	iPreviewWndText = 
   538   	iPreviewWndText = 
   381         AknLayoutScalable_Avkon::popup_fep_char_preview_window_t1(0).LayoutLine();
   539         AknLayoutScalable_Avkon::popup_fep_char_preview_window_t1(0).LayoutLine();
   382     previewWndText.LayoutText(previewWndRect.Rect(), iPreviewWndText);
   540     previewWndText.LayoutText(previewWndRect.Rect(), iPreviewWndText);
   383     iBubbleFont = previewWndText.Font();
   541     iBubbleFont = previewWndText.Font();
   384 	iArrowPaddingSize = TSize(10,10);
   542 	}
       
   543    
       
   544 // ---------------------------------------------------------------------------
       
   545 // read laf data.
       
   546 // ---------------------------------------------------------------------------
       
   547 //
       
   548 void CPeninputFingerHwrArLafManager::ReadLafInfo()
       
   549     {
       
   550     // retrieve the layout rect
       
   551 	RetrieveLayoutData();
       
   552 	
       
   553 	// retrieve the laf data of icf
       
   554 	RetrieveLafDataForICF();
       
   555 	
       
   556     #ifdef HackerVersion
       
   557     #else 
       
   558 	// retrieve the laf data of functional button
       
   559 	RetrieveLafDataForFunctionalButton();
       
   560     #endif
       
   561 	// retrieve the laf data of candidate list
       
   562 	RetrieveLafDataForCandidateList();
       
   563 	
       
   564     #ifdef HackerVersion
       
   565     #else
       
   566 	// retrieve the laf data of symbol table
       
   567     RetrieveLafDataForSymbolTable();
       
   568     
       
   569 	// retrieve the laf data of hwr box
       
   570     RetrieveLafDataForHwrBox();	 
       
   571     #endif
       
   572     
       
   573     // retrieve the laf data of preview bubble
       
   574     RetrieveLafDataForPreviewBubble();
       
   575 
   385     //==========================================================================
   576     //==========================================================================
   386     // going to be removed if the LAF data is ready
   577     // going to be removed if the LAF data is ready
   387     //
   578     //
   388     #ifdef HackerVersion
   579     #ifdef HackerVersion
       
   580 	
   389 	const TUint KMarginLayout = 4;
   581 	const TUint KMarginLayout = 4;
   390 	// hardcode those and remove them after the laf data is ready
   582 	// hardcode those and remove them after the laf data is ready
   391 	// do we really need to read ui data from laf system?
   583 	// do we really need to read ui data from laf system?
   392 	// icf margins
   584 	// icf margins
   393 	iIcfTextLeftMarginCn = 14;
   585 	iIcfTextLeftMargin = 14;
   394 	iIcfTextRightMarginCn = 14;
   586 	iIcfTextRightMargin = 14;
   395     iIcfTextTopMarginCn = 14;
   587     iIcfTextTopMargin = 14;
   396     iIcfTextBottomMarginCn = 20;
   588     iIcfTextBottomMargin = 20;
   397     iIcfTextLineSpaceMarginCn = 5;	
   589     iIcfTextLineSpaceMargin = 5;	
   398 	
   590 	
   399 	// candiate margin
   591 	// candiate margin
   400 	iCandsHorizontalMargin = 1;
   592 	iCandsHorizontalMargin = 1;
   401     iCandsVerticalMargin = 1;
   593     iCandsVerticalMargin = 1;
   402 	
   594 	
   435 	    iRectSpase = iRectBtnClose;
   627 	    iRectSpase = iRectBtnClose;
   436 	    iRectSpase.Move(TPoint(0,buttonHight));
   628 	    iRectSpase.Move(TPoint(0,buttonHight));
   437 	    
   629 	    
   438 	    iRectEnter = iRectSpase;
   630 	    iRectEnter = iRectSpase;
   439 	    iRectEnter.Move(TPoint(buttonWidth,0));
   631 	    iRectEnter.Move(TPoint(buttonWidth,0));
   440 	            
       
   441 
       
   442 	    
   632 	    
   443         // candate position
   633         // candate position
   444         iCandidateLTPos = iRectBtnClose.iTl + TPoint(0,buttonHight);
   634         iCandidateLTPos = iRectBtnClose.iTl + TPoint(0,buttonHight);
   445     	iCandsUnitWidth = buttonWidth-iCandsVerticalMargin;
   635     	iCandsUnitWidth = buttonWidth-iCandsVerticalMargin;
   446         iCandsUnitHeight = buttonHight;
   636         iCandsUnitHeight = buttonHight;
   465     	iRectSctpad.Move(TPoint(0,buttonHight));
   655     	iRectSctpad.Move(TPoint(0,buttonHight));
   466     	iRectSctpad.SetHeight(4*buttonHight);
   656     	iRectSctpad.SetHeight(4*buttonHight);
   467     	iRectSctpad.SetWidth(6*buttonWidth);
   657     	iRectSctpad.SetWidth(6*buttonWidth);
   468 		
   658 		
   469 		// the button size for symbol table control 
   659 		// the button size for symbol table control 
   470 		iSymButtonSize = TSize(2*buttonWidth,buttonHight);
   660 		iSymBtnRectArray.Reset();
       
   661 		TRect btnRect;
       
   662 		btnRect.iTl = iRectOfSymbolTable.iTl;
       
   663 		btnRect.SetSize(TSize(2*buttonWidth,buttonHight));
       
   664 		iSymBtnRectArray.Append(btnRect);
       
   665 		
       
   666 		btnRect.Move(TPoint(btnRect.Width(),0));
       
   667 		iSymBtnRectArray.Append(btnRect);
       
   668 		
       
   669 		btnRect.Move(TPoint(btnRect.Width(),0));
       
   670 		iSymBtnRectArray.Append(btnRect);
       
   671 		
   471 		iSctpadRowCount = 4;
   672 		iSctpadRowCount = 4;
   472 		iSctpadColCount = 6;
   673 		iSctpadColCount = 6;
   473 		
   674 		
   474     	iSCTrectArray.Reset();
   675     	iSCTrectArray.Reset();
   475     	for(TInt i = 0; i <  iSctpadRowCount; i++)
   676     	for(TInt i = 0; i <  iSctpadRowCount; i++)
   542     	iRectSctpad.Move(TPoint(0,buttonHight));
   743     	iRectSctpad.Move(TPoint(0,buttonHight));
   543     	iRectSctpad.SetHeight(4*buttonHight);
   744     	iRectSctpad.SetHeight(4*buttonHight);
   544     	iRectSctpad.SetWidth(4*buttonWidth);
   745     	iRectSctpad.SetWidth(4*buttonWidth);
   545 		
   746 		
   546 		// the button size for symbol table control 
   747 		// the button size for symbol table control 
   547 		iSymButtonSize = TSize((4*buttonWidth)/3,buttonHight);
   748 		iSymBtnRectArray.Reset();
       
   749 		TRect btnRect;
       
   750 		btnRect.iTl = iRectOfSymbolTable.iTl;
       
   751 		btnRect.SetSize(TSize((4*buttonWidth)/3,buttonHight));
       
   752 		iSymBtnRectArray.Append(btnRect);
       
   753 		
       
   754 		btnRect.Move(TPoint(btnRect.Width(),0));
       
   755 		iSymBtnRectArray.Append(btnRect);
       
   756 		
       
   757 		btnRect.Move(TPoint(btnRect.Width(),0));
       
   758 		iSymBtnRectArray.Append(btnRect);
   548 		
   759 		
   549 		iSctpadRowCount = 4;
   760 		iSctpadRowCount = 4;
   550 		iSctpadColCount = 4;
   761 		iSctpadColCount = 4;
   551 		iSCTrectArray.Reset();
   762 		iSCTrectArray.Reset();
   552     	for(TInt i = 0; i <  iSctpadRowCount; i++)
   763     	for(TInt i = 0; i <  iSctpadRowCount; i++)
   562     #endif        
   773     #endif        
   563     //
   774     //
   564     //==========================================================================
   775     //==========================================================================
   565     
   776     
   566     }
   777     }
   567         
       
   568 
   778 
   569 // ---------------------------------------------------------------------------
   779 // ---------------------------------------------------------------------------
   570 // get screen orientation.
   780 // get screen orientation.
   571 // ---------------------------------------------------------------------------
   781 // ---------------------------------------------------------------------------
   572 //
   782 //
   573 TBool CPeninputFingerHwrArLafManager::IsLandscape()
   783 TBool CPeninputFingerHwrArLafManager::IsLandscape()
   574     {
   784     {
   575     return iIsLandscape;
   785     return iIsLandscape;
   576     }
   786     }    
   577     
       
   578     
   787     
   579 // ---------------------------------------------------------------------------
   788 // ---------------------------------------------------------------------------
   580 // get rect of layout.
   789 // get rect of layout.
   581 // ---------------------------------------------------------------------------
   790 // ---------------------------------------------------------------------------
   582 //    
   791 //    
   583 TRect CPeninputFingerHwrArLafManager::LayoutRect()
   792 TRect CPeninputFingerHwrArLafManager::LayoutRect()
   584     {        
   793     {        
   585     return iLayoutRect;
   794     return iLayoutRect;
   586     }
   795     }
   587 
       
   588 
   796 
   589 // ---------------------------------------------------------------------------
   797 // ---------------------------------------------------------------------------
   590 // get rect of specified control.
   798 // get rect of specified control.
   591 // ---------------------------------------------------------------------------
   799 // ---------------------------------------------------------------------------
   592 //  
   800 //  
   663 // get left margin of icf.
   871 // get left margin of icf.
   664 // ---------------------------------------------------------------------------
   872 // ---------------------------------------------------------------------------
   665 // 
   873 // 
   666 TInt CPeninputFingerHwrArLafManager::IcfLeftMargin()
   874 TInt CPeninputFingerHwrArLafManager::IcfLeftMargin()
   667     {
   875     {
   668     return iIcfTextLeftMarginCn;
   876     return iIcfTextLeftMargin;
   669     }
   877     }
   670     
   878     
   671 // ---------------------------------------------------------------------------
   879 // ---------------------------------------------------------------------------
   672 // get right margin of icf.
   880 // get right margin of icf.
   673 // ---------------------------------------------------------------------------
   881 // ---------------------------------------------------------------------------
   674 // 
   882 // 
   675 TInt CPeninputFingerHwrArLafManager::IcfRightMargin()
   883 TInt CPeninputFingerHwrArLafManager::IcfRightMargin()
   676     { 
   884     { 
   677     return iIcfTextRightMarginCn;
   885     return iIcfTextRightMargin;
   678     }    
   886     }    
   679 
   887 
   680 // ---------------------------------------------------------------------------
   888 // ---------------------------------------------------------------------------
   681 // get top margin of icf.
   889 // get top margin of icf.
   682 // ---------------------------------------------------------------------------
   890 // ---------------------------------------------------------------------------
   683 // 
   891 // 
   684 TInt CPeninputFingerHwrArLafManager::IcfTopMargin()
   892 TInt CPeninputFingerHwrArLafManager::IcfTopMargin()
   685     {
   893     {
   686     return iIcfTextTopMarginCn;
   894     return iIcfTextTopMargin;
   687     }
   895     }
   688     
   896     
   689 // ---------------------------------------------------------------------------
   897 // ---------------------------------------------------------------------------
   690 // get bottom margin of icf.
   898 // get bottom margin of icf.
   691 // ---------------------------------------------------------------------------
   899 // ---------------------------------------------------------------------------
   692 // 
   900 // 
   693 TInt CPeninputFingerHwrArLafManager::IcfBottomMargin()
   901 TInt CPeninputFingerHwrArLafManager::IcfBottomMargin()
   694     {      
   902     {      
   695     return iIcfTextBottomMarginCn;
   903     return iIcfTextBottomMargin;
   696     }
   904     }
   697     
   905     
   698 // ---------------------------------------------------------------------------
   906 // ---------------------------------------------------------------------------
   699 // get line spacing of icf.
   907 // get line spacing of icf.
   700 // ---------------------------------------------------------------------------
   908 // ---------------------------------------------------------------------------
   701 // 
   909 // 
   702 TInt CPeninputFingerHwrArLafManager::IcfLineSpaceMargin()
   910 TInt CPeninputFingerHwrArLafManager::IcfLineSpaceMargin()
   703     {  
   911     {  
   704     return iIcfTextLineSpaceMarginCn;
   912     return iIcfTextLineSpaceMargin;
   705     }    
   913     }    
   706     
   914     
   707 // ---------------------------------------------------------------------------
   915 // ---------------------------------------------------------------------------
   708 // get font of icf.
   916 // get font of icf.
   709 // ---------------------------------------------------------------------------
   917 // ---------------------------------------------------------------------------
   710 // 
   918 // 
   711 CFont* CPeninputFingerHwrArLafManager::IcfFont()
   919 CFont* CPeninputFingerHwrArLafManager::IcfFont()
   712     {
   920     {
   713 //    //workaround
       
   714 //    TAknTextLineLayout textPaneTextLayout;
       
   715 //    TAknLayoutText txt;
       
   716 //    textPaneTextLayout = 
       
   717 //        AknLayoutScalable_Avkon::fep_hwr_top_text_pane_t1().LayoutLine();
       
   718 //    const CFont* icffont = AknLayoutUtils::FontFromId( textPaneTextLayout.iFont, NULL );
       
   719 //    
       
   720 //    return const_cast<CFont*>(icffont);
       
   721     return iIcfFont;
   921     return iIcfFont;
   722     }
   922     }
   723    
   923    
   724 // ---------------------------------------------------------------------------
   924 // ---------------------------------------------------------------------------
   725 // get text height of icf.
   925 // get text height of icf.
   726 // ---------------------------------------------------------------------------
   926 // ---------------------------------------------------------------------------
   727 // 
   927 // 
   728 TInt CPeninputFingerHwrArLafManager::IcfTextHeight()
   928 TInt CPeninputFingerHwrArLafManager::IcfTextHeight()
   729     { 
   929     { 
   730     return iIcfTextHeightCn;
   930     return iIcfTextHeight;
   731     }
   931     }
   732        
   932        
   733 
   933 
   734 // ---------------------------------------------------------------------------
   934 // ---------------------------------------------------------------------------
   735 // get inner padding of buttons.
   935 // get inner padding of buttons.
   831         cell_fshwr2_syb_bg_pane_t1(0).LayoutLine();
  1031         cell_fshwr2_syb_bg_pane_t1(0).LayoutLine();
   832     return layout;
  1032     return layout;
   833     }
  1033     }
   834 
  1034 
   835 // ---------------------------------------------------------------------------
  1035 // ---------------------------------------------------------------------------
   836 // get text layout of space and enter.
       
   837 // ---------------------------------------------------------------------------
       
   838 //
       
   839 TAknTextLineLayout CPeninputFingerHwrArLafManager::FixSctpadKeyTxtLayout()
       
   840     {
       
   841     TAknTextLineLayout layout = AknLayoutScalable_Avkon::
       
   842         cell_fshwr2_syb_bg_pane_t1(0).LayoutLine();
       
   843     return layout;
       
   844     }
       
   845 
       
   846 // ---------------------------------------------------------------------------
       
   847 // get width unit of candidate list.
  1036 // get width unit of candidate list.
   848 // ---------------------------------------------------------------------------
  1037 // ---------------------------------------------------------------------------
   849 //
  1038 //
   850 TInt CPeninputFingerHwrArLafManager::CandidateUnitWidth()
  1039 TInt CPeninputFingerHwrArLafManager::CandidateUnitWidth()
   851     {
  1040     {
   885 //
  1074 //
   886 TPoint CPeninputFingerHwrArLafManager::CandidateLTPos()
  1075 TPoint CPeninputFingerHwrArLafManager::CandidateLTPos()
   887     {
  1076     {
   888     return iCandidateLTPos;
  1077     return iCandidateLTPos;
   889     }
  1078     }
   890 
       
   891 // ---------------------------------------------------------------------------
       
   892 // get top-left position of predictive list.
       
   893 // ---------------------------------------------------------------------------
       
   894 //
       
   895 TPoint CPeninputFingerHwrArLafManager::PredictiveLTPos()
       
   896     {
       
   897     return iPredictiveLTPos;
       
   898     }
       
   899    
  1079    
   900 // ---------------------------------------------------------------------------
  1080 // ---------------------------------------------------------------------------
   901 // get font of candidate list.
  1081 // get font for candidate list.
   902 // ---------------------------------------------------------------------------
  1082 // ---------------------------------------------------------------------------
   903 //
  1083 //
   904 const CFont* CPeninputFingerHwrArLafManager::CandidateFont()
  1084 const CFont* CPeninputFingerHwrArLafManager::CandidateFont()
   905     {   
  1085     {   
   906     return iCandsFont;
  1086     return iCandsFont;
   907     }
  1087     }
   908 
  1088 
   909 
  1089 // ---------------------------------------------------------------------------
   910 // ---------------------------------------------------------------------------
  1090 // get rects for symbol buttons
   911 // get text layout of sct paging button.
  1091 // ---------------------------------------------------------------------------
   912 // ---------------------------------------------------------------------------
  1092 //	
   913 //
  1093 RArray<TRect>& CPeninputFingerHwrArLafManager::GetSymBtnArray()
   914 TAknTextLineLayout CPeninputFingerHwrArLafManager::SctPageBtnTxtLayout()
  1094     {
   915     {
  1095 	return iSymBtnRectArray;
   916     TAknTextLineLayout layout =  AknLayoutScalable_Apps::
  1096 	}
   917         field_vitu2_entry_pane_t1(0, 0, 0).LayoutLine();
  1097 
   918     return layout;
  1098 // ---------------------------------------------------------------------------
   919     }
  1099 // get rect for virtual key
   920 
  1100 // ---------------------------------------------------------------------------
   921 // ---------------------------------------------------------------------------
  1101 //	
   922 // c++ constructor
  1102 TRect CPeninputFingerHwrArLafManager::GetVirtualKeyRect()
   923 // ---------------------------------------------------------------------------
  1103     {
   924 //
  1104 	return iRectSctpad;
   925 CPeninputFingerHwrArLafManager::CPeninputFingerHwrArLafManager()
  1105 	} 	
   926     {
  1106     	
   927     
  1107 // ---------------------------------------------------------------------------
   928     }
  1108 // get rect for hwr indicator
   929     
  1109 // ---------------------------------------------------------------------------
   930 // ---------------------------------------------------------------------------
  1110 //		
   931 // Symbian second-phase constructor
       
   932 // ---------------------------------------------------------------------------
       
   933 //
       
   934 void CPeninputFingerHwrArLafManager::ConstructL()
       
   935     {
       
   936     }
       
   937 
       
   938 TSize CPeninputFingerHwrArLafManager::SymbolGroupButtonSize()
       
   939     {
       
   940     return iSymButtonSize;
       
   941     }
       
   942 
       
   943 TRect CPeninputFingerHwrArLafManager::GetIndicatorRect()
  1111 TRect CPeninputFingerHwrArLafManager::GetIndicatorRect()
   944     {
  1112     {
   945     return iIndicatorRect;
  1113     return iIndicatorRect;
   946     }
  1114     }
   947 
  1115 
       
  1116 // ---------------------------------------------------------------------------
       
  1117 // get padding size for arrow button
       
  1118 // ---------------------------------------------------------------------------
       
  1119 //	
   948 TSize CPeninputFingerHwrArLafManager::GetArrowPaddingSize()
  1120 TSize CPeninputFingerHwrArLafManager::GetArrowPaddingSize()
   949     {
  1121     {
   950 	return iArrowPaddingSize;
  1122 	return iArrowPaddingSize;
   951 	}
  1123 	}
   952    
  1124