textinput/peninputgenericvkb/src/peninputgenericlafdatamgr.cpp
changeset 0 eb1f2e154e89
child 3 f5a1e66df979
equal deleted inserted replaced
-1:000000000000 0:eb1f2e154e89
       
     1 /*
       
     2 * Copyright (c) 2002-2005 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:  peninput VKB data manager
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 // System includes
       
    20 #include <peninputdataconverter.h>
       
    21 #include <peninputcommonlayoutglobalenum.h>
       
    22 #include <AknUtils.h> 
       
    23 #include <aknlayoutscalable_avkon.cdl.h>
       
    24 #include <peninputpluginutils.h>
       
    25 #include <aknlayoutscalable_apps.cdl.h>
       
    26 #include <layoutmetadata.cdl.h>
       
    27 
       
    28 // User includes
       
    29 #include "peninputgenericvkblafdatamgr.h"
       
    30 
       
    31 #define LAF_MODIFY 1
       
    32 
       
    33 const TInt KKeypadLayout[][2] = 
       
    34 	{
       
    35 		{ 10, 3 },		// 10x3
       
    36 		{ 11, 3 },		// 11x3
       
    37 		{ 11, 4 },		// 11x4
       
    38 	};
       
    39 	
       
    40 const TInt KVkbTopAndBottomParam[] = { 5, 3, 4 };	
       
    41 typedef TAknWindowComponentLayout (*Pfun)(TInt aVariety, TInt aCol = 0, TInt aRow = 0);
       
    42 
       
    43 const Pfun cell_pane_func[]=
       
    44 	{
       
    45 	AknLayoutScalable_Avkon::vkb2_cell_t_keypad_pane,
       
    46 	AknLayoutScalable_Avkon::vkb2_cell_t_keypad_pane_cp01,
       
    47 	AknLayoutScalable_Avkon::vkb2_cell_t_keypad_pane_cp02,
       
    48 	AknLayoutScalable_Avkon::vkb2_cell_t_keypad_pane_cp03,
       
    49 	AknLayoutScalable_Avkon::vkb2_cell_t_keypad_pane_cp04,
       
    50 	AknLayoutScalable_Avkon::vkb2_cell_t_keypad_pane_cp05,
       
    51 	AknLayoutScalable_Avkon::vkb2_cell_t_keypad_pane_cp06,
       
    52 	AknLayoutScalable_Avkon::vkb2_cell_t_keypad_pane_cp07,
       
    53 	AknLayoutScalable_Avkon::vkb2_cell_t_keypad_pane_cp08,
       
    54 	AknLayoutScalable_Avkon::vkb2_cell_t_keypad_pane_cp09,
       
    55 	AknLayoutScalable_Avkon::vkb2_cell_t_keypad_pane_cp10        	        	        	
       
    56 	};
       
    57 //	{ 0, 34, 68, 102, 136, 170, 204, 238, 272, 305 };
       
    58 const TInt KKeypadRectXPoint10x[] = 
       
    59  	{ 0, 34, 68, 102, 136, 170, 204, 238, 272, 305 };
       
    60 const TInt KKeypadCellWidth10x[] = 
       
    61 	{ 41, 41, 41, 41, 41, 41, 41, 41, 41, 44 };	
       
    62 //	{ 0, 32, 63, 94, 125, 155, 186, 217, 248, 279, 311 };		
       
    63 const TInt KKeypadRectXPoint11x[] = 
       
    64 	{ 0, 31, 62, 93, 124, 155, 186, 217, 248, 278, 311 };
       
    65 const TInt KKeypadCellWidth11x[] = 
       
    66 	{ 36, 36, 36, 36, 36, 36, 36, 36, 36, 39, 39 };
       
    67 	
       
    68 // ======== MEMBER FUNCTIONS ========
       
    69 
       
    70 // ---------------------------------------------------------------------------
       
    71 // CPeninputGenericVkbLafMgr::NewL
       
    72 // (other items were commented in a header)
       
    73 // ---------------------------------------------------------------------------
       
    74 //
       
    75 CPeninputGenericVkbLafMgr* CPeninputGenericVkbLafMgr::NewL()
       
    76     {
       
    77     CPeninputGenericVkbLafMgr* self = NewLC();
       
    78     CleanupStack::Pop(self);
       
    79     
       
    80     return self;
       
    81     }
       
    82     
       
    83 // ---------------------------------------------------------------------------
       
    84 // CPeninputGenericVkbLafMgr::NewLC
       
    85 // (other items were commented in a header)
       
    86 // ---------------------------------------------------------------------------
       
    87 //
       
    88 CPeninputGenericVkbLafMgr* CPeninputGenericVkbLafMgr::NewLC()
       
    89     {
       
    90     CPeninputGenericVkbLafMgr* self = 
       
    91         new ( ELeave ) CPeninputGenericVkbLafMgr();
       
    92     CleanupStack::PushL( self );
       
    93     self->ConstructL(); 
       
    94 
       
    95     return self;
       
    96     }
       
    97 
       
    98 // ---------------------------------------------------------------------------
       
    99 // CPeninputGenericVkbLafMgr::CPeninputGenericVkbLafMgr
       
   100 // (other items were commented in a header)
       
   101 // ---------------------------------------------------------------------------
       
   102 //
       
   103 CPeninputGenericVkbLafMgr::CPeninputGenericVkbLafMgr():
       
   104     iInputMode(EPluginInputModeNone)
       
   105     {
       
   106     }
       
   107     
       
   108 // ---------------------------------------------------------------------------
       
   109 // CPeninputGenericVkbLafMgr::~CPeninputGenericVkbLafMgr
       
   110 // (other items were commented in a header)
       
   111 // ---------------------------------------------------------------------------
       
   112 //
       
   113 CPeninputGenericVkbLafMgr::~CPeninputGenericVkbLafMgr()
       
   114     {
       
   115 	delete iLafData;
       
   116 	iLafData = NULL;    
       
   117     }
       
   118 
       
   119 TBool CPeninputGenericVkbLafMgr::IsValid()
       
   120     {
       
   121     if (!iLafData) 
       
   122     return EFalse;
       
   123     
       
   124     return iLafData->IsValid();
       
   125     }
       
   126 
       
   127 // ---------------------------------------------------------------------------
       
   128 // CPeninputGenericVkbLafMgr::ConstructL
       
   129 // (other items were commented in a header)
       
   130 // ---------------------------------------------------------------------------
       
   131 //
       
   132 void CPeninputGenericVkbLafMgr::ConstructL()
       
   133 	{
       
   134 		
       
   135 	}
       
   136 	
       
   137 // ---------------------------------------------------------------------------
       
   138 // CPeninputGenericVkbLafMgr::SetInputMode
       
   139 // (other items were commented in a header)
       
   140 // ---------------------------------------------------------------------------
       
   141 //
       
   142 void CPeninputGenericVkbLafMgr::SetInputModeL( TPluginInputMode aInputMode)
       
   143 	{
       
   144 	if (iInputMode == aInputMode)
       
   145 	    {
       
   146 	    return;
       
   147 	    }
       
   148 	
       
   149 	
       
   150 	if (iLafData)
       
   151 	    {
       
   152 	    delete iLafData;
       
   153 	    iLafData = NULL;
       
   154 	    }
       
   155 	    
       
   156      if (aInputMode == EPluginInputModeVkb)
       
   157         {
       
   158         iLafData = CPeninputLafDataVKB::NewL(ELayoutNone);
       
   159         }
       
   160      else if (aInputMode == EPluginInputModeFSQ)
       
   161         {
       
   162         iLafData = CPeninputLafDataFSQ::NewL(ELayoutNone);
       
   163         }
       
   164      else 
       
   165         {
       
   166         User::Leave(KErrNotSupported);
       
   167         }
       
   168 	}	
       
   169 
       
   170 TPluginInputMode CPeninputGenericVkbLafMgr::InputMode() const
       
   171     {
       
   172     return iInputMode;
       
   173     }
       
   174 	
       
   175 // ---------------------------------------------------------------------------
       
   176 // CPeninputGenericVkbLafMgr::SetLayoutType
       
   177 // (other items were commented in a header)
       
   178 // ---------------------------------------------------------------------------
       
   179 //
       
   180 void CPeninputGenericVkbLafMgr::SetLayoutType( TPeninputQwtLayoutType aLayoutType )
       
   181 	{
       
   182 	ASSERT(iLafData);
       
   183 	iLafData->SetLayoutType( aLayoutType );	
       
   184 	}
       
   185 	
       
   186 // ---------------------------------------------------------------------------
       
   187 // CPeninputGenericVkbLafMgr::SetLafOption
       
   188 // (other items were commented in a header)
       
   189 // ---------------------------------------------------------------------------
       
   190 //
       
   191 void CPeninputGenericVkbLafMgr::SetLafOption( TPeninputVkbLafOption aOption )
       
   192 	{
       
   193 	if( iLafData->LafOption() == aOption )
       
   194 		return;
       
   195 	
       
   196 	iLafData->SetLafOption( aOption );	
       
   197 	TRAP_IGNORE(iLafData->ConstructL());
       
   198 	}
       
   199 
       
   200 // ---------------------------------------------------------------------------
       
   201 // CPeninputGenericVkbLafMgr::SetLafOption
       
   202 // (other items were commented in a header)
       
   203 // ---------------------------------------------------------------------------
       
   204 //
       
   205 TPeninputVkbLafOption CPeninputGenericVkbLafMgr::OptionType() const
       
   206 	{
       
   207 	return iLafData->LafOption();
       
   208 	}
       
   209 
       
   210 // ---------------------------------------------------------------------------
       
   211 // CPeninputGenericVkbLafMgr::GetButtonRect
       
   212 // (other items were commented in a header)
       
   213 // ---------------------------------------------------------------------------
       
   214 //
       
   215 void CPeninputGenericVkbLafMgr::GetButtonRect( TPeninputCommonCtrlID aButtonID, 
       
   216 								TRect& aOutterRect,
       
   217 								TRect& aInnerRect )
       
   218 	{
       
   219 	ASSERT(iLafData);		
       
   220 	const TPeninputButtonLayoutData& data = iLafData->ButtonLayoutData( aButtonID );
       
   221 	aOutterRect = data.iRect;
       
   222 	aInnerRect  = data.iInnerRect;
       
   223 	}
       
   224 	
       
   225 // ---------------------------------------------------------------------------
       
   226 // CPeninputGenericVkbLafMgr::KeyRect
       
   227 // (other items were commented in a header)
       
   228 // ---------------------------------------------------------------------------
       
   229 //
       
   230 const TRect& CPeninputGenericVkbLafMgr::KeypadRect() const
       
   231 	{
       
   232 	ASSERT(iLafData);
       
   233 	const TPeninputKeyLayoutData& data = iLafData->KeypadLayoutData();
       
   234 	return data.iKaypadRect;
       
   235 	}
       
   236 	
       
   237 // ---------------------------------------------------------------------------
       
   238 // CPeninputGenericVkbLafMgr::ICFRect
       
   239 // (other items were commented in a header)
       
   240 // ---------------------------------------------------------------------------
       
   241 //	
       
   242 const TRect& CPeninputGenericVkbLafMgr::ICFRect() const
       
   243 	{
       
   244 	ASSERT(iLafData);
       
   245 	return iLafData->ICFLayoutData().iRect;
       
   246 	}
       
   247 	
       
   248 // ---------------------------------------------------------------------------
       
   249 // CPeninputGenericVkbLafMgr::ICFPromptTextFont
       
   250 // (other items were commented in a header)
       
   251 // ---------------------------------------------------------------------------
       
   252 //	
       
   253 const CFont* CPeninputGenericVkbLafMgr::ICFPromptTextFont() const
       
   254 	{
       
   255 	ASSERT(iLafData);
       
   256 	return iLafData->ICFLayoutData().iPromptTextFont;
       
   257 	}
       
   258 	
       
   259 // ---------------------------------------------------------------------------
       
   260 // CPeninputGenericVkbLafMgr::ICFTextFont
       
   261 // (other items were commented in a header)
       
   262 // ---------------------------------------------------------------------------
       
   263 //	
       
   264 const CFont* CPeninputGenericVkbLafMgr::ICFTextFont() const
       
   265 	{
       
   266 	ASSERT(iLafData);
       
   267 	return iLafData->ICFLayoutData().iTextFont;
       
   268 	}
       
   269 
       
   270 
       
   271 // ---------------------------------------------------------------------------
       
   272 // CPeninputGenericVkbLafMgr::KeyTextLayout
       
   273 // (other items were commented in a header)
       
   274 // ---------------------------------------------------------------------------
       
   275 //	
       
   276 TAknTextLineLayout CPeninputGenericVkbLafMgr::KeyTextLayout() const
       
   277 	{
       
   278 	ASSERT(iLafData);
       
   279 	return iLafData->KeypadLayoutData().iTextLayout;
       
   280 	}
       
   281 
       
   282 // ---------------------------------------------------------------------------
       
   283 // CPeninputGenericVkbLafMgr::ICFPromptTextFont
       
   284 // (other items were commented in a header)
       
   285 // ---------------------------------------------------------------------------
       
   286 //	
       
   287 void CPeninputGenericVkbLafMgr::GetICFConfig( TPeninputICFConfig& aICFConfig )
       
   288 	{
       
   289 	ASSERT(iLafData);	
       
   290 	const TPeninputEntryLayoutData& icfLayout = iLafData->ICFLayoutData();
       
   291 	aICFConfig.iLeftMargin = icfLayout.iPromptTextRect.iTl.iX - icfLayout.iRect.iTl.iX;
       
   292 	aICFConfig.iRightMargin = icfLayout.iRect.iBr.iX - icfLayout.iPromptTextRect.iBr.iX;
       
   293 	aICFConfig.iTopMargin = icfLayout.iPromptTextRect.iTl.iY - icfLayout.iRect.iTl.iY;
       
   294 	aICFConfig.iTextLineHeight = icfLayout.iPromptTextRect.Height();
       
   295 	aICFConfig.iLineSpaceMargin = icfLayout.iTextRect.iTl.iY - icfLayout.iPromptTextRect.iBr.iY;
       
   296 	}
       
   297 	
       
   298 //		
       
   299 const TRect& CPeninputGenericVkbLafMgr::EntirePaneRect() const
       
   300 	{
       
   301 	ASSERT(iLafData);
       
   302 	return iLafData->QwtLayoutData().iQwtRect;
       
   303 	}
       
   304 
       
   305 // ---------------------------------------------------------------------------
       
   306 // CPeninputGenericVkbLafMgr::KeyRect
       
   307 // (other items were commented in a header)
       
   308 // ---------------------------------------------------------------------------
       
   309 //
       
   310 void CPeninputGenericVkbLafMgr::GetKeyRect( TInt aColume, 
       
   311 													TInt aRow, 
       
   312 													TRect& aKeyRect,
       
   313 													TRect& aCharRect ) const
       
   314 	{
       
   315 	ASSERT(iLafData);
       
   316 	TInt colNum = 0;
       
   317 	TInt index = 0;
       
   318 	switch( iLafData->LayoutType() )
       
   319 		{
       
   320 		case ELayout10x3:
       
   321 			{
       
   322 			colNum = 10;
       
   323 			}
       
   324 			break;
       
   325 		case ELayout11x3:
       
   326 			{
       
   327 			colNum = 11;
       
   328 			}
       
   329 			break;	
       
   330 		case ELayout11x4:
       
   331 			{
       
   332 			colNum = 11;
       
   333 			}
       
   334 			break;		
       
   335 		}
       
   336 	index = aRow * colNum + aColume;
       
   337 	aKeyRect = iLafData->KeypadLayoutData().iRects[index];
       
   338 	aCharRect = iLafData->KeypadLayoutData().iCharRects[index];
       
   339 	}
       
   340 
       
   341 TPeninputQwtLayoutType CPeninputGenericVkbLafMgr::LayoutTypeFromRowsColumns(const TInt aRows, 
       
   342                                                                             const TInt aColumns)
       
   343     {
       
   344     TPeninputQwtLayoutType ret;
       
   345     
       
   346     if (aRows == 3 && aColumns == 10)
       
   347         {
       
   348         ret = ELayout10x3;
       
   349         }
       
   350     else if (aRows == 3 && aColumns == 11)
       
   351         {
       
   352         ret = ELayout11x3;
       
   353         }
       
   354     else if (aRows == 4 && aColumns == 11)    
       
   355         {
       
   356         ret = ELayout11x4;
       
   357         }
       
   358     else
       
   359         {
       
   360         ret = ELayoutNone;
       
   361         }
       
   362 
       
   363      return ret;
       
   364     }
       
   365 // ---------------------------------------------------------------------------
       
   366 // CPeninputGenericVkbLafMgr::KeyTextFont
       
   367 // (other items were commented in a header)
       
   368 // ---------------------------------------------------------------------------
       
   369 //
       
   370 const CFont* CPeninputGenericVkbLafMgr::KeyTextFont() const
       
   371 	{
       
   372 	ASSERT(iLafData);
       
   373 	return iLafData->KeypadLayoutData().iFont;	
       
   374 	}
       
   375 
       
   376 // ---------------------------------------------------------------------------
       
   377 // CPeninputGenericVkbLafMgr::KeyTextFont
       
   378 // (other items were commented in a header)
       
   379 // ---------------------------------------------------------------------------
       
   380 //
       
   381 const TRect& CPeninputGenericVkbLafMgr::RangbarRect() const
       
   382 	{
       
   383 	ASSERT(iLafData);
       
   384 	return iLafData->RangbarLayoutData().iRect;
       
   385 	}
       
   386 	
       
   387 // ---------------------------------------------------------------------------
       
   388 // CPeninputGenericVkbLafMgr::KeyTextFont
       
   389 // (other items were commented in a header)
       
   390 // ---------------------------------------------------------------------------
       
   391 //
       
   392 const TRect& CPeninputGenericVkbLafMgr::TitlebarRect() const
       
   393 	{
       
   394 	ASSERT(iLafData);
       
   395 	return iLafData->QwtLayoutData().iTitlebarRect;
       
   396 	}
       
   397 
       
   398 // ---------------------------------------------------------------------------
       
   399 // CPeninputGenericVkbLafMgr::ClientRect
       
   400 // (other items were commented in a header)
       
   401 // ---------------------------------------------------------------------------
       
   402 //
       
   403 const TRect& CPeninputGenericVkbLafMgr::ClientRect() const
       
   404 	{
       
   405 	ASSERT(iLafData);
       
   406 	return iLafData->QwtLayoutData().iClientRect;
       
   407 	}
       
   408 	
       
   409 // ---------------------------------------------------------------------------
       
   410 // CPeninputGenericVkbLafMgr::RangbarCellCount
       
   411 // (other items were commented in a header)
       
   412 // ---------------------------------------------------------------------------
       
   413 //
       
   414 TInt CPeninputGenericVkbLafMgr::RangbarCellCount() const
       
   415 	{
       
   416 	ASSERT(iLafData);	
       
   417 	return 	iLafData->RangbarLayoutData().iCellDataArray.Count();
       
   418 	}
       
   419 
       
   420 // ---------------------------------------------------------------------------
       
   421 // CPeninputGenericVkbLafMgr::RangbarCellCount
       
   422 // (other items were commented in a header)
       
   423 // ---------------------------------------------------------------------------
       
   424 //
       
   425 void CPeninputGenericVkbLafMgr::RangbarCellAt( TInt aIndex, 
       
   426 												 TRect& aOutterRect, 
       
   427 												 TRect& aInnerRect )
       
   428 	{
       
   429 	ASSERT(iLafData);	
       
   430 	aOutterRect = iLafData->RangbarLayoutData().iCellDataArray[aIndex].iRect;
       
   431 	aInnerRect  = iLafData->RangbarLayoutData().iCellDataArray[aIndex].iInnerRect;  
       
   432 	}
       
   433 	
       
   434 // ---------------------------------------------------------------------------
       
   435 // CPeninputGenericVkbLafMgr::GetSpaceButtonExLayoutInfo
       
   436 // (other items were commented in a header)
       
   437 // ---------------------------------------------------------------------------
       
   438 //
       
   439 void CPeninputGenericVkbLafMgr::GetSpaceButtonExLayoutInfo( TRect& aIconsFrameRect, 
       
   440 															TRect& aMiddleIconRect ) const
       
   441 	{
       
   442 	ASSERT(iLafData);
       
   443 	aIconsFrameRect = iLafData->QwtLayoutData().iSpaceButtonEx.iIconsFrameRect;
       
   444 	aMiddleIconRect = iLafData->QwtLayoutData().iSpaceButtonEx.iMiddleIconRect;		
       
   445 	}
       
   446 
       
   447 // ---------------------------------------------------------------------------
       
   448 // Return layout data for candidate list
       
   449 // ---------------------------------------------------------------------------
       
   450 //
       
   451 const TPeninputCandidateListLayoutData& 
       
   452                    CPeninputGenericVkbLafMgr::CandidateListLayoutData() const
       
   453     {
       
   454     ASSERT(iLafData);
       
   455     return iLafData->QwtLayoutData().iCandidateList;
       
   456     }
       
   457 	
       
   458 // ---------------------------------------------------------------------------
       
   459 // Return layout data for candidate list
       
   460 // ---------------------------------------------------------------------------
       
   461 //
       
   462 const TPeninputTooltipBoxLayoutData& 
       
   463                       CPeninputGenericVkbLafMgr::TooltipBoxLayoutData() const
       
   464     {
       
   465     ASSERT(iLafData);
       
   466     return iLafData->QwtLayoutData().iTooltipBox;
       
   467     }
       
   468 
       
   469 // ---------------------------------------------------------------------------
       
   470 // CPeninputQwtLayoutDataInfo::~CPeninputQwtLayoutDataInfo
       
   471 // (other items were commented in a header)
       
   472 // ---------------------------------------------------------------------------
       
   473 //
       
   474 CPeninputQwtLayoutDataInfo::~CPeninputQwtLayoutDataInfo()
       
   475 	{
       
   476 	iKeypad.iRects.Close();
       
   477 	iKeypad.iCharRects.Close();
       
   478 	iRangbar.iCellDataArray.Close();
       
   479 	}
       
   480 
       
   481 // ---------------------------------------------------------------------------
       
   482 // CPeninputLafDataCommon::DestoryDataCommon
       
   483 // (other items were commented in a header)
       
   484 // ---------------------------------------------------------------------------
       
   485 //
       
   486 void MPeninputLafDataCommon::DestoryDataCommon()
       
   487 	{
       
   488 	iLayoutDataInfo.ResetAndDestroy();
       
   489 	iLayoutDataInfo.Close();
       
   490 	}
       
   491 	
       
   492 MPeninputLafDataCommon::~MPeninputLafDataCommon()	
       
   493 	{
       
   494 		
       
   495 	}
       
   496 // CPeninputLafDataCommon::ButtonLayoutData(TInt aButtonID)
       
   497 // (other items were commented in a header)
       
   498 // ---------------------------------------------------------------------------
       
   499 //
       
   500 const TPeninputButtonLayoutData& MPeninputLafDataCommon::ButtonLayoutData( TInt aButtonID ) const
       
   501 	{
       
   502 	ASSERT( IsValid() );
       
   503 	const TPeninputButtonLayoutData* pData = NULL;
       
   504 
       
   505 	switch( aButtonID )
       
   506 		{
       
   507 		case EPeninutWindowCtrlIdMoveBtn:
       
   508 			{
       
   509 			pData = &(iLayoutDataInfo[iLayoutType]->iMoveButton);
       
   510 			}
       
   511 			break;
       
   512 		case EPeninutWindowCtrlIdCloseBtn:
       
   513 			{
       
   514 			pData = &(iLayoutDataInfo[iLayoutType]->iCloseButton);
       
   515 			}
       
   516 			break;
       
   517 		case EPeninutWindowCtrlIdOptionBtn:
       
   518 			{
       
   519 			pData = &(iLayoutDataInfo[iLayoutType]->iOptionButton);								
       
   520 			}
       
   521 			break;
       
   522 		case EPeninutWindowCtrlIdBackspaceBtn:
       
   523 			{
       
   524 			pData = &(iLayoutDataInfo[iLayoutType]->iClearButton);								
       
   525 			}
       
   526 			break;
       
   527 		case EPeninutWindowCtrlIdEnterBtn:
       
   528 			{
       
   529 			pData = &(iLayoutDataInfo[iLayoutType]->iEnterButton);								
       
   530 			}
       
   531 			break;
       
   532 		case EPeninutWindowCtrlIdSwitchToHwrBtn:
       
   533 			{
       
   534 			pData = &(iLayoutDataInfo[iLayoutType]->iSwitchButton);								
       
   535 			}
       
   536 			break;
       
   537 		case EPeninutWindowCtrlIdSpaceBtn:
       
   538 			{
       
   539 			pData = &(iLayoutDataInfo[iLayoutType]->iSpaceButton);								
       
   540 			}
       
   541 			break;	
       
   542 		case EPeninutWindowCtrlIdShiftBtn:
       
   543 			{
       
   544 			pData = &(iLayoutDataInfo[iLayoutType]->iShiftButton);								
       
   545 			}
       
   546 			break;	
       
   547 		case EPeninupWindowCtrlIdArrowLeftBtn:
       
   548 			{
       
   549 			pData = &(iLayoutDataInfo[iLayoutType]->iLeftButton);	
       
   550 			}
       
   551 			break;
       
   552 		case EPeninupWindowCtrlIdArrowRightBtn:
       
   553 			{
       
   554 			pData = &(iLayoutDataInfo[iLayoutType]->iRightButton);	
       
   555 			}
       
   556 			break;
       
   557 		default:
       
   558 			ASSERT(EFalse);
       
   559 			break;
       
   560 		}
       
   561 	ASSERT(pData);
       
   562 	return *pData;
       
   563 	}
       
   564 // ---------------------------------------------------------------------------
       
   565 // CPeninputLafDataCommon::ICFLayoutData()
       
   566 // (other items were commented in a header)
       
   567 // ---------------------------------------------------------------------------
       
   568 //	
       
   569 const TPeninputEntryLayoutData& MPeninputLafDataCommon::ICFLayoutData() const
       
   570 	{
       
   571 	ASSERT( IsValid() );
       
   572 	return iLayoutDataInfo[iLayoutType]->iICF;
       
   573 	}
       
   574 	
       
   575 // ---------------------------------------------------------------------------
       
   576 // CPeninputLafDataCommon::KeypadLayoutData()
       
   577 // (other items were commented in a header)
       
   578 // ---------------------------------------------------------------------------
       
   579 //		
       
   580 const TPeninputKeyLayoutData& MPeninputLafDataCommon::KeypadLayoutData() const
       
   581 	{
       
   582 	ASSERT( IsValid() );
       
   583 	return iLayoutDataInfo[iLayoutType]->iKeypad;
       
   584 	}
       
   585 	
       
   586 // ---------------------------------------------------------------------------
       
   587 // CPeninputLafDataCommon::RangbarLayoutData(TInt aRangbarID)
       
   588 // (other items were commented in a header)
       
   589 // ---------------------------------------------------------------------------
       
   590 //		
       
   591 const TPeninputRangeBarLayoutData& MPeninputLafDataCommon::RangbarLayoutData() const
       
   592 	{
       
   593 	ASSERT( IsValid() );
       
   594 	return iLayoutDataInfo[iLayoutType]->iRangbar;
       
   595 	}
       
   596 
       
   597 // ---------------------------------------------------------------------------
       
   598 // CPeninputLafDataCommon::RangbarLayoutData(TInt aRangbarID)
       
   599 // (other items were commented in a header)
       
   600 // ---------------------------------------------------------------------------
       
   601 //		
       
   602 const CPeninputQwtLayoutDataInfo& MPeninputLafDataCommon::QwtLayoutData() const
       
   603 	{
       
   604 	ASSERT( IsValid() );
       
   605 	return 	*iLayoutDataInfo[iLayoutType];
       
   606 	}
       
   607 
       
   608 // ---------------------------------------------------------------------------
       
   609 // CPeninputLafDataCommon::ConstructL()
       
   610 // (other items were commented in a header)
       
   611 // ---------------------------------------------------------------------------
       
   612 //		
       
   613 void MPeninputLafDataCommon::ConstructL()
       
   614 	{
       
   615 	ReadLafInfoL();
       
   616 	}
       
   617 
       
   618 // ---------------------------------------------------------------------------
       
   619 // CPeninputLafDataCommon::ConstructL()
       
   620 // (other items were commented in a header)
       
   621 // ---------------------------------------------------------------------------
       
   622 //		
       
   623 TBool MPeninputLafDataCommon::IsValid() const
       
   624 	{
       
   625 	return ( iLayoutDataInfo.Count() && iLayoutType != ELayoutNone ) ? ETrue : EFalse;
       
   626 	}
       
   627 
       
   628 
       
   629 // ---------------------------------------------------------------------------
       
   630 // CPeninputLafDataCommon::GetTopAndBottomPaneInfo
       
   631 // (other items were commented in a header)
       
   632 // ---------------------------------------------------------------------------
       
   633 //	
       
   634 void MPeninputLafDataCommon::GetTopAndBottomPaneInfo( const TRect& aParentWndRect, 
       
   635 													  TInt aLayoutType,
       
   636 													  TInt aLayoutParam,
       
   637 													  CPeninputQwtLayoutDataInfo& aDataInfo )
       
   638 	{
       
   639 	const TInt endFSQType  = 2;
       
   640 
       
   641 
       
   642 
       
   643 	// judge which case 	
       
   644 	TBool isVKB = aLayoutParam > endFSQType ? ETrue : EFalse;
       
   645 	
       
   646 	TAknWindowLineLayout toppane, bottompane, bottomgrid;
       
   647 	TAknWindowLineLayout topleftpane, topentrypane, toprightpane; 
       
   648 	TAknWindowLineLayout cellBtn, cellBtnInner;	
       
   649     
       
   650 	TAknLayoutRect toppaneRect, bottompaneRect, bottomgridRect;
       
   651 	TAknLayoutRect topleftpaneRect, topentrypaneRect, toprightpaneRect;
       
   652 	TAknLayoutRect cellBtnRect, cellBtnInnerRect;
       
   653 	TAknTextLineLayout cellText;
       
   654 	TAknLayoutText txt;
       
   655 	TRect keypadRect;
       
   656 	TRect innerRect;
       
   657 	// top pane
       
   658 	if( isVKB )
       
   659 		{
       
   660 		toppane = AknLayoutScalable_Avkon::
       
   661 				  vkb2_area_top_pane(KVkbTopAndBottomParam[aLayoutType]).LayoutLine();		
       
   662 		}
       
   663 	else
       
   664 		{
       
   665 		toppane = AknLayoutScalable_Avkon::vkb2_area_top_pane(aLayoutParam).LayoutLine();		
       
   666 		}
       
   667 	toppaneRect.LayoutRect(aParentWndRect, toppane);
       
   668 	aDataInfo.iTitlebarRect = toppaneRect.Rect();
       
   669 
       
   670 
       
   671 	topleftpane = AknLayoutScalable_Avkon::vkb2_top_grid_left_pane(aLayoutParam).LayoutLine();
       
   672 	topleftpaneRect.LayoutRect(toppaneRect.Rect(), topleftpane);
       
   673 
       
   674 	// close button
       
   675 	cellBtn = AknLayoutScalable_Avkon::vkb2_top_cell_left_pane(aLayoutParam, 0 ,0).LayoutLine();
       
   676 	cellBtnRect.LayoutRect(topleftpaneRect.Rect(), cellBtn);
       
   677 	AknPenImageUtils::CalculateGraphicRect( cellBtnRect.Rect(), innerRect );
       
   678 	aDataInfo.iCloseButton.iRect = cellBtnRect.Rect();
       
   679 	aDataInfo.iCloseButton.iInnerRect = innerRect;
       
   680 	// option button
       
   681 	cellBtn = AknLayoutScalable_Avkon::vkb2_top_cell_left_pane(aLayoutParam, 0 ,1).LayoutLine();
       
   682 	cellBtnRect.LayoutRect(topleftpaneRect.Rect(), cellBtn);
       
   683 	AknPenImageUtils::CalculateGraphicRect( cellBtnRect.Rect(), innerRect );
       
   684 	aDataInfo.iOptionButton.iRect = cellBtnRect.Rect();
       
   685 	aDataInfo.iOptionButton.iInnerRect = innerRect;
       
   686 	// entry pane
       
   687 	topentrypane = AknLayoutScalable_Avkon::vkb2_top_entry_pane(aLayoutParam).LayoutLine();
       
   688 	topentrypaneRect.LayoutRect(toppaneRect.Rect(), topentrypane);	
       
   689 	aDataInfo.iICF.iRect = topentrypaneRect.Rect();
       
   690 	cellText = AknLayoutScalable_Avkon::vkb2_top_entry_pane_t1(aLayoutParam).LayoutLine();
       
   691 	aDataInfo.iICF.iPromptTextFont = AknLayoutUtils::FontFromId(cellText.iFont, NULL);
       
   692 	txt.LayoutText( topentrypaneRect.Rect(), cellText );
       
   693 	aDataInfo.iICF.iPromptTextRect = txt.TextRect();
       
   694 	cellText = AknLayoutScalable_Avkon::vkb2_top_entry_pane_t2(aLayoutParam).LayoutLine();
       
   695 	aDataInfo.iICF.iTextFont = AknLayoutUtils::FontFromId(cellText.iFont, NULL);
       
   696 	txt.LayoutText( topentrypaneRect.Rect(), cellText );
       
   697 	aDataInfo.iICF.iTextRect = txt.TextRect();
       
   698 	
       
   699 	// ?? need modified later. inner rect is same as outter rect.
       
   700 	toprightpane = AknLayoutScalable_Avkon::vkb2_top_grid_right_pane(aLayoutParam).LayoutLine();
       
   701 	toprightpaneRect.LayoutRect(toppaneRect.Rect(), toprightpane);
       
   702 	if( isVKB )
       
   703 		{
       
   704 		// clear button	
       
   705 		cellBtn = AknLayoutScalable_Avkon::
       
   706 				  vkb2_top_grid_right_pane_g1(aLayoutParam).LayoutLine();
       
   707 		cellBtnRect.LayoutRect(toprightpaneRect.Rect(), cellBtn);
       
   708 		AknPenImageUtils::CalculateGraphicRect( cellBtnRect.Rect(), innerRect );	
       
   709 		aDataInfo.iClearButton.iRect = cellBtnRect.Rect();
       
   710 		aDataInfo.iClearButton.iInnerRect = innerRect;
       
   711 		// move button (VKB)			
       
   712 		cellBtn = AknLayoutScalable_Avkon::
       
   713 				  vkb2_top_grid_right_pane_g4(aLayoutParam).LayoutLine();
       
   714 		cellBtnRect.LayoutRect(toprightpaneRect.Rect(), cellBtn);
       
   715 		AknPenImageUtils::CalculateGraphicRect( cellBtnRect.Rect(), innerRect );
       
   716 		aDataInfo.iMoveButton.iRect = cellBtnRect.Rect();
       
   717 		aDataInfo.iMoveButton.iInnerRect = innerRect;									
       
   718 										
       
   719 		}
       
   720 	else
       
   721 		{
       
   722 		// clear button	
       
   723 		cellBtn = AknLayoutScalable_Avkon::vkb2_top_grid_right_pane_g1(aLayoutType).LayoutLine();
       
   724 		cellBtnRect.LayoutRect(toprightpaneRect.Rect(), cellBtn);
       
   725 		AknPenImageUtils::CalculateGraphicRect( cellBtnRect.Rect(), innerRect );
       
   726 		aDataInfo.iClearButton.iRect = cellBtnRect.Rect();
       
   727 		aDataInfo.iClearButton.iInnerRect = innerRect;			
       
   728 		// left button (FSQ)
       
   729 		cellBtn = AknLayoutScalable_Avkon::vkb2_top_grid_right_pane_g2(aLayoutType).LayoutLine();
       
   730 		cellBtnRect.LayoutRect(toprightpaneRect.Rect(), cellBtn);
       
   731 		AknPenImageUtils::CalculateGraphicRect( cellBtnRect.Rect(), innerRect );
       
   732 		aDataInfo.iLeftButton.iRect = cellBtnRect.Rect();
       
   733 		aDataInfo.iLeftButton.iInnerRect = innerRect;
       
   734 		// right button (FSQ)
       
   735 		cellBtn = AknLayoutScalable_Avkon::vkb2_top_grid_right_pane_g3(aLayoutType).LayoutLine();
       
   736 		cellBtnRect.LayoutRect(toprightpaneRect.Rect(), cellBtn);
       
   737 		AknPenImageUtils::CalculateGraphicRect( cellBtnRect.Rect(), innerRect );
       
   738 		aDataInfo.iRightButton.iRect = cellBtnRect.Rect();
       
   739 		aDataInfo.iRightButton.iInnerRect = innerRect;		
       
   740 		}
       
   741 
       
   742 	
       
   743 	// bottom pane
       
   744 	const TInt VKBParamBottom2Range[] = { 6, 8, 8 };
       
   745 	const TInt FSQParamBottom2Range[] = { 0, 2, 4 };
       
   746 	const TInt VKBParamBottom3Range[] = { 7, 9, 9 };
       
   747 	const TInt FSQParamBottom3Range[] = { 1, 3, 5 };
       
   748 
       
   749 	
       
   750 	if( isVKB )
       
   751 		{
       
   752 		bottompane = AknLayoutScalable_Avkon::
       
   753 				  vkb2_area_bottom_pane(KVkbTopAndBottomParam[aLayoutType]).LayoutLine();					
       
   754 		}
       
   755 	else
       
   756 		{
       
   757   		bottompane = AknLayoutScalable_Avkon::vkb2_area_bottom_pane(aLayoutParam).LayoutLine();			
       
   758 		}
       
   759 	bottompaneRect.LayoutRect(aParentWndRect, bottompane);
       
   760   	
       
   761 	TRect bottomRect = bottompaneRect.Rect();
       
   762 
       
   763 	// Get keypad rect
       
   764 	keypadRect.SetRect( toppaneRect.Rect().iTl.iX, 
       
   765   						toppaneRect.Rect().iBr.iY, 
       
   766   						bottomRect.iBr.iX,
       
   767 						bottomRect.iTl.iY);
       
   768 	aDataInfo.iClientRect.SetRect( toppaneRect.Rect().iTl.iX, 
       
   769   								   toppaneRect.Rect().iBr.iY,
       
   770   								   bottomRect.iBr.iX,
       
   771 								   bottomRect.iBr.iY);
       
   772 	if( isVKB )
       
   773 		{
       
   774 		aDataInfo.iQwtRect.SetRect( toppaneRect.Rect().iTl.iX, 
       
   775   								    toppaneRect.Rect().iTl.iY,
       
   776   								    bottomRect.iBr.iX,
       
   777 								    bottomRect.iBr.iY );	
       
   778 		}
       
   779 	else
       
   780 		{
       
   781 		aDataInfo.iQwtRect = aParentWndRect;	
       
   782 		}
       
   783 				
       
   784 	TInt bottomLayoutType = 0;
       
   785 	if( isVKB )
       
   786 		{
       
   787 		bottomLayoutType = iLafOption & EOption3CellRange ? 
       
   788 						   VKBParamBottom3Range[aLayoutType] : VKBParamBottom2Range[aLayoutType];
       
   789 		}
       
   790 	else
       
   791 		{
       
   792 		bottomLayoutType = iLafOption & EOption3CellRange ? 
       
   793 						   FSQParamBottom3Range[aLayoutType] : FSQParamBottom2Range[aLayoutType];			
       
   794 		}
       
   795 
       
   796   	bottomgrid = AknLayoutScalable_Avkon::vkb2_area_bottom_grid_pane(bottomLayoutType).LayoutLine();
       
   797   	bottomgridRect.LayoutRect(bottomRect, bottomgrid);
       
   798 	
       
   799 	TInt maxParam = iLafOption & EOption3CellRange ? 4 : 3;
       
   800 	// shift button  	
       
   801 	cellBtn = AknLayoutScalable_Avkon::vkb2_cell_bottom_grid_pane(aLayoutParam, 0, 0).LayoutLine();
       
   802 	cellBtnRect.LayoutRect(bottomgridRect.Rect(), cellBtn);
       
   803 	AknPenImageUtils::CalculateGraphicRect( cellBtnRect.Rect(), innerRect );
       
   804 	aDataInfo.iShiftButton.iRect = cellBtnRect.Rect();
       
   805 	aDataInfo.iShiftButton.iInnerRect = innerRect;
       
   806 	
       
   807 	TPeninputButtonLayoutData btnLayoutData;		
       
   808 	for( TInt i = 1; i < maxParam; i++ )
       
   809 		{
       
   810 #ifdef LAF_MODIFY	
       
   811 		if( i == 3 )
       
   812 			{
       
   813 			btnLayoutData.iRect	= aDataInfo.iRangbar.iCellDataArray[i-2].iRect;
       
   814 			btnLayoutData.iRect.Move( btnLayoutData.iRect.Width(), 0 );
       
   815 			AknPenImageUtils::CalculateGraphicRect( btnLayoutData.iRect, innerRect );
       
   816 			btnLayoutData.iInnerRect = innerRect;
       
   817 			aDataInfo.iRangbar.iCellDataArray.Append( btnLayoutData );
       
   818 			break;
       
   819 			}
       
   820 #endif //LAF_MODIFY		
       
   821 		// range cell
       
   822 		cellBtn = AknLayoutScalable_Avkon::vkb2_cell_bottom_grid_pane(aLayoutParam, i, 0).LayoutLine();
       
   823 		cellBtnRect.LayoutRect(bottomgridRect.Rect(), cellBtn);
       
   824 		AknPenImageUtils::CalculateGraphicRect( cellBtnRect.Rect(), innerRect );
       
   825 		btnLayoutData.iRect = cellBtnRect.Rect();
       
   826 		btnLayoutData.iInnerRect = innerRect;	
       
   827 
       
   828 		aDataInfo.iRangbar.iCellDataArray.Append( btnLayoutData );				
       
   829 		}
       
   830 		
       
   831 	TInt count = aDataInfo.iRangbar.iCellDataArray.Count();
       
   832 	aDataInfo.iRangbar.iRect = TRect( aDataInfo.iRangbar.iCellDataArray[0].iRect.iTl,
       
   833 									  aDataInfo.iRangbar.iCellDataArray[count - 1].iRect.iBr );
       
   834 	
       
   835 		// input mode button ?? need modified later. inner rect is same as outter rect
       
   836 	cellBtn = AknLayoutScalable_Avkon::vkb2_area_bottom_pane_g1(bottomLayoutType).LayoutLine();
       
   837 	cellBtnRect.LayoutRect(bottomRect, cellBtn);
       
   838 	AknPenImageUtils::CalculateGraphicRect( cellBtnRect.Rect(), innerRect );
       
   839 	aDataInfo.iSwitchButton.iRect = cellBtnRect.Rect();
       
   840 	aDataInfo.iSwitchButton.iInnerRect = innerRect;	
       
   841 		// enter button 
       
   842 	cellBtn = AknLayoutScalable_Avkon::vkb2_area_bottom_pane_g2(bottomLayoutType).LayoutLine();
       
   843 	cellBtnRect.LayoutRect(bottomRect, cellBtn);
       
   844 	AknPenImageUtils::CalculateGraphicRect( cellBtnRect.Rect(), innerRect );
       
   845 	aDataInfo.iEnterButton.iRect = cellBtnRect.Rect();
       
   846 	aDataInfo.iEnterButton.iInnerRect = innerRect;	
       
   847 		// space button 
       
   848 	cellBtn = AknLayoutScalable_Avkon::vkb2_area_bottom_pane_g3(bottomLayoutType).LayoutLine();
       
   849 	cellBtnRect.LayoutRect(bottomRect, cellBtn);
       
   850 	aDataInfo.iSpaceButton.iRect = cellBtnRect.Rect();
       
   851 	aDataInfo.iSpaceButton.iRect.iTl = TPoint( aDataInfo.iRangbar.iRect.iBr.iX,
       
   852 											   aDataInfo.iRangbar.iRect.iTl.iY );
       
   853 	aDataInfo.iSpaceButton.iInnerRect = cellBtnRect.Rect();	  			
       
   854 	// 3 pieces graphics laf info
       
   855 	TRect spaceRect, iconRect, tempRect;
       
   856 	cellBtn = 
       
   857         AknLayoutScalable_Avkon::vkb2_area_bottom_space_btn_pane(bottomLayoutType).LayoutLine();
       
   858 	cellBtnRect.LayoutRect(bottomRect, cellBtn);
       
   859 	spaceRect = cellBtnRect.Rect();
       
   860 	cellBtn = 
       
   861         AknLayoutScalable_Avkon::vkb2_area_bottom_space_btn_pane_g1(bottomLayoutType).LayoutLine();
       
   862 	cellBtnRect.LayoutRect(spaceRect, cellBtn);
       
   863 	iconRect = cellBtnRect.Rect();
       
   864 	TInt nOffsetX = iconRect.iTl.iX - spaceRect.iTl.iX;
       
   865 	tempRect = spaceRect;
       
   866 	tempRect.Shrink( nOffsetX, 0 );
       
   867 	aDataInfo.iSpaceButtonEx.iIconsFrameRect = tempRect;
       
   868 	tempRect.Shrink( iconRect.Width(), 0 );
       
   869 	aDataInfo.iSpaceButtonEx.iMiddleIconRect = tempRect;  	
       
   870   	
       
   871 	// preview popup window 
       
   872 	TAknWindowLineLayout previewWnd, previewWndInner;
       
   873 	TAknLayoutRect previewWndRect, previewWndInnerRect;
       
   874 	previewWnd = AknLayoutScalable_Avkon::popup_fep_char_preview_window(aLayoutParam).LayoutLine();
       
   875 	previewWndRect.LayoutRect( aParentWndRect, previewWnd );
       
   876 	previewWndInner = AknLayoutScalable_Avkon::bg_popup_fep_char_preview_window_g9().LayoutLine();
       
   877 	previewWndInnerRect.LayoutRect( previewWndRect.Rect(), previewWndInner );
       
   878 	aDataInfo.iPreviewWndRect = previewWndRect.Rect();
       
   879 	aDataInfo.iPreviewWndInnerRect = previewWndInnerRect.Rect();
       
   880 	aDataInfo.iPreviewWndText = AknLayoutScalable_Avkon::popup_fep_char_preview_window_t1(
       
   881                               aLayoutParam).LayoutLine();
       
   882 	}
       
   883 
       
   884 // ---------------------------------------------------------------------------
       
   885 // CPeninputLafDataCommon::SetLayoutType( TInt aLayoutType )
       
   886 // (other items were commented in a header)
       
   887 // ---------------------------------------------------------------------------
       
   888 //	
       
   889 inline void MPeninputLafDataCommon::SetLayoutType( TInt aLayoutType )
       
   890 	{
       
   891     iLayoutType = aLayoutType;
       
   892 	}
       
   893 
       
   894 // ---------------------------------------------------------------------------
       
   895 // CPeninputLafDataCommon::LayoutType
       
   896 // (other items were commented in a header)
       
   897 // ---------------------------------------------------------------------------
       
   898 //
       
   899 inline TInt MPeninputLafDataCommon::LayoutType() const
       
   900 	{
       
   901 	return iLayoutType;
       
   902 	}
       
   903 
       
   904 // ---------------------------------------------------------------------------
       
   905 // CPeninputLafDataCommon::SetLafOption
       
   906 // (other items were commented in a header)
       
   907 // ---------------------------------------------------------------------------
       
   908 //
       
   909 inline void MPeninputLafDataCommon::SetLafOption( TPeninputVkbLafOption aLafOption )
       
   910 	{
       
   911 	iLafOption = aLafOption;
       
   912 	}
       
   913 
       
   914 // ---------------------------------------------------------------------------
       
   915 // CPeninputLafDataCommon::SetLafOption
       
   916 // (other items were commented in a header)
       
   917 // ---------------------------------------------------------------------------
       
   918 //
       
   919 inline TPeninputVkbLafOption MPeninputLafDataCommon::LafOption() const
       
   920 	{
       
   921 	return iLafOption;
       
   922 	}
       
   923 
       
   924 // ---------------------------------------------------------------------------
       
   925 // CPeninputLafDataVKB::NewL( TInt aLayoutType )
       
   926 // (other items were commented in a header)
       
   927 // ---------------------------------------------------------------------------
       
   928 //	
       
   929 CPeninputLafDataVKB* CPeninputLafDataVKB::NewL( TInt aLayoutType )
       
   930 	{
       
   931     CPeninputLafDataVKB* self = NewLC( aLayoutType );
       
   932     CleanupStack::Pop();
       
   933     return self;
       
   934 	}
       
   935 // ---------------------------------------------------------------------------
       
   936 // CPeninputLafDataVKB::NewL( TInt aLayoutType )
       
   937 // (other items were commented in a header)
       
   938 // ---------------------------------------------------------------------------
       
   939 //		
       
   940 CPeninputLafDataVKB* CPeninputLafDataVKB::NewLC( TInt aLayoutType )
       
   941 	{
       
   942 	CPeninputLafDataVKB* self = new ( ELeave ) CPeninputLafDataVKB( aLayoutType );
       
   943     CleanupStack::PushL( self );
       
   944     self->ConstructL(); 
       
   945 
       
   946     return self;
       
   947 	}
       
   948 CPeninputLafDataVKB::~CPeninputLafDataVKB()
       
   949 	{
       
   950 	DestoryDataCommon();	
       
   951 	}
       
   952 	
       
   953 	
       
   954 // ---------------------------------------------------------------------------
       
   955 // CPeninputLafDataVKB::NewL( TInt aLayoutType )
       
   956 // (other items were commented in a header)
       
   957 // ---------------------------------------------------------------------------
       
   958 //		
       
   959 CPeninputLafDataVKB::CPeninputLafDataVKB( TInt aLayoutType )
       
   960 	{
       
   961 	SetLayoutType( aLayoutType );	
       
   962 	}
       
   963 // ---------------------------------------------------------------------------
       
   964 // CPeninputLafDataVKB::NewL( TInt aLayoutType )
       
   965 // (other items were commented in a header)
       
   966 // ---------------------------------------------------------------------------
       
   967 //		
       
   968 void CPeninputLafDataVKB::ReadLafInfoL()
       
   969 	{
       
   970 	// clean up all the data
       
   971 	iLayoutDataInfo.ResetAndDestroy();
       
   972 	
       
   973 	CPeninputQwtLayoutDataInfo* dataInfo = new( ELeave ) CPeninputQwtLayoutDataInfo;
       
   974 	
       
   975 	TAknWindowLineLayout appWnd; 
       
   976     TAknWindowLineLayout wndLayout;
       
   977     TAknWindowLineLayout keypad, rowpane, cellpane;
       
   978     
       
   979     TAknLayoutRect keypadRect, rowpaneRect, cellpaneRect;
       
   980     TAknLayoutRect wndRect;
       
   981     TAknLayoutText keyTextLayout;
       
   982 	TAknTextLineLayout keyText;
       
   983 	TRect keyRect, keyCharRect;
       
   984 // -----------------------Portray Mode--------------------------
       
   985     appWnd = AknLayoutScalable_Avkon::application_window(0).LayoutLine();
       
   986     //iAppWndRect = appWnd.Rect();
       
   987 	
       
   988 	// ==================10x3====================
       
   989 	wndLayout = AknLayoutScalable_Avkon::popup_fep_vkb2_window(3).LayoutLine();
       
   990 	wndRect.LayoutRect(appWnd.Rect(), wndLayout);
       
   991 	// top pane and bottom pane
       
   992 	GetTopAndBottomPaneInfo( wndRect.Rect(), ELayout10x3, 3, *dataInfo );
       
   993 	// keypad
       
   994   	keyText = AknLayoutScalable_Avkon::vkb2_cell_t_keypad_pane_t1(0).LayoutLine();
       
   995   	dataInfo->iKeypad.iTextLayout = keyText;
       
   996   	dataInfo->iKeypad.iFont = AknLayoutUtils::FontFromId(keyText.iFont, NULL);
       
   997   	//dataInfo->iKeypad.iTxtRect = keyText.TextRect();
       
   998 	
       
   999     keypad = AknLayoutScalable_Avkon::
       
  1000     		 vkb2_area_keypad_pane(KVkbTopAndBottomParam[ELayout10x3]).LayoutLine();
       
  1001   	keypadRect.LayoutRect(wndRect.Rect(), keypad);
       
  1002 	dataInfo->iKeypad.iKaypadRect = keypadRect.Rect();
       
  1003   	//iKeypadRect10x3 = keypadRect.Rect();
       
  1004   	for( TInt i = 0; i < KKeypadLayout[0][1]; i++)
       
  1005   		{
       
  1006   		for( TInt j = 0; j < KKeypadLayout[0][0]; j++)
       
  1007   			{
       
  1008   			rowpane = AknLayoutScalable_Avkon::vkb2_row_keypad_pane(2, 0, i).LayoutLine();
       
  1009   			rowpaneRect.LayoutRect(keypadRect.Rect(), rowpane);
       
  1010   			cellpane = (*cell_pane_func[j])(0).LayoutLine();
       
  1011   			cellpaneRect.LayoutRect(rowpaneRect.Rect(), cellpane);
       
  1012   			keyRect = cellpaneRect.Rect();
       
  1013   			keyRect.Move( -keypadRect.Rect().iTl.iX, -keypadRect.Rect().iTl.iY );
       
  1014 #ifdef LAF_MODIFY
       
  1015 			keyRect.iTl.iX = KKeypadRectXPoint10x[j];
       
  1016 			keyRect.SetWidth( KKeypadCellWidth10x[j] );
       
  1017 #endif //LAF_MODIFY
       
  1018   			dataInfo->iKeypad.iRects.AppendL(keyRect);
       
  1019   			keyTextLayout.LayoutText(keyRect, keyText);
       
  1020   			dataInfo->iKeypad.iCharRects.AppendL(keyTextLayout.TextRect());
       
  1021   			}
       
  1022   		}
       
  1023    	iLayoutDataInfo.AppendL( dataInfo ); 
       
  1024   	
       
  1025 	// ==================11x3====================
       
  1026 	dataInfo = new( ELeave ) CPeninputQwtLayoutDataInfo;
       
  1027 	wndLayout = AknLayoutScalable_Avkon::popup_fep_vkb2_window(1).LayoutLine();
       
  1028 	wndRect.LayoutRect(appWnd.Rect(), wndLayout);
       
  1029 	// top pane and bottom pane
       
  1030 	GetTopAndBottomPaneInfo( wndRect.Rect(), ELayout11x3, 4, *dataInfo );
       
  1031 	// keypad
       
  1032   	keyText = AknLayoutScalable_Avkon::vkb2_cell_t_keypad_pane_t1(0).LayoutLine();
       
  1033   	dataInfo->iKeypad.iTextLayout = keyText;
       
  1034   	dataInfo->iKeypad.iFont = AknLayoutUtils::FontFromId(keyText.iFont, NULL);
       
  1035 
       
  1036     keypad = AknLayoutScalable_Avkon::
       
  1037     		 vkb2_area_keypad_pane(KVkbTopAndBottomParam[ELayout11x3]).LayoutLine();
       
  1038   	keypadRect.LayoutRect(wndRect.Rect(), keypad);
       
  1039 	dataInfo->iKeypad.iKaypadRect = keypadRect.Rect();
       
  1040   	for( TInt i = 0; i < KKeypadLayout[1][1]; i++)
       
  1041 		{
       
  1042 		for( TInt j = 0; j < KKeypadLayout[1][0]; j++)
       
  1043 			{
       
  1044 			rowpane = AknLayoutScalable_Avkon::vkb2_row_keypad_pane(0, 0, i).LayoutLine();
       
  1045 			rowpaneRect.LayoutRect(keypadRect.Rect(), rowpane);
       
  1046 			cellpane = (*cell_pane_func[j])(1).LayoutLine();
       
  1047 			cellpaneRect.LayoutRect(rowpaneRect.Rect(), cellpane);
       
  1048   			keyRect = cellpaneRect.Rect();
       
  1049   			keyRect.Move( -keypadRect.Rect().iTl.iX, -keypadRect.Rect().iTl.iY );
       
  1050 #ifdef LAF_MODIFY  			
       
  1051 			keyRect.iTl.iX = KKeypadRectXPoint11x[j];
       
  1052 			keyRect.SetWidth( KKeypadCellWidth11x[j] );
       
  1053 #endif //LAF_MODIFY  			  				
       
  1054   			dataInfo->iKeypad.iRects.AppendL(keyRect);
       
  1055   			keyTextLayout.LayoutText(keyRect, keyText);
       
  1056   			dataInfo->iKeypad.iCharRects.AppendL(keyTextLayout.TextRect());
       
  1057 			}
       
  1058 		}
       
  1059    	iLayoutDataInfo.AppendL( dataInfo ); 
       
  1060 		
       
  1061 	// ==================11x4====================
       
  1062 	dataInfo = new( ELeave ) CPeninputQwtLayoutDataInfo;
       
  1063 	wndLayout = AknLayoutScalable_Avkon::popup_fep_vkb2_window(2).LayoutLine();
       
  1064 	wndRect.LayoutRect(appWnd.Rect(), wndLayout);
       
  1065 	// top pane and bottom pane
       
  1066 	GetTopAndBottomPaneInfo( wndRect.Rect(), ELayout11x4, 4, *dataInfo );
       
  1067 	// keypad
       
  1068   	keyText = AknLayoutScalable_Avkon::vkb2_cell_t_keypad_pane_t1(0).LayoutLine();
       
  1069   	dataInfo->iKeypad.iTextLayout = keyText;
       
  1070   	dataInfo->iKeypad.iFont = AknLayoutUtils::FontFromId(keyText.iFont, NULL);
       
  1071 
       
  1072     keypad = AknLayoutScalable_Avkon::
       
  1073     		 vkb2_area_keypad_pane(KVkbTopAndBottomParam[ELayout11x4]).LayoutLine();
       
  1074   	keypadRect.LayoutRect(wndRect.Rect(), keypad);
       
  1075 	dataInfo->iKeypad.iKaypadRect = keypadRect.Rect();
       
  1076   	for( TInt i = 0; i < KKeypadLayout[2][1]; i++)
       
  1077   		{
       
  1078   		for( TInt j = 0; j < KKeypadLayout[2][0]; j++)
       
  1079   			{
       
  1080   			rowpane = AknLayoutScalable_Avkon::vkb2_row_keypad_pane(1, 0, i).LayoutLine();
       
  1081   			rowpaneRect.LayoutRect(keypadRect.Rect(), rowpane);
       
  1082   			cellpane = (*cell_pane_func[j])(1).LayoutLine();
       
  1083   			cellpaneRect.LayoutRect(rowpaneRect.Rect(), cellpane); 
       
  1084   			keyRect = cellpaneRect.Rect();
       
  1085   			keyRect.Move( -keypadRect.Rect().iTl.iX, -keypadRect.Rect().iTl.iY );
       
  1086 #ifdef LAF_MODIFY  		
       
  1087 			keyRect.iTl.iX = KKeypadRectXPoint11x[j];
       
  1088 			keyRect.SetWidth( KKeypadCellWidth11x[j] );
       
  1089 #endif //LAF_MODIFY  
       
  1090   			dataInfo->iKeypad.iRects.AppendL(keyRect);
       
  1091   			keyTextLayout.LayoutText(keyRect, keyText);
       
  1092   			dataInfo->iKeypad.iCharRects.AppendL(keyTextLayout.TextRect());
       
  1093   			}
       
  1094   		}
       
  1095    	iLayoutDataInfo.AppendL( dataInfo ); 
       
  1096 	}
       
  1097 // ---------------------------------------------------------------------------
       
  1098 // CPeninputLafDataFSQ::NewL( TInt aLayoutType )
       
  1099 // (other items were commented in a header)
       
  1100 // ---------------------------------------------------------------------------
       
  1101 //		
       
  1102 CPeninputLafDataFSQ* CPeninputLafDataFSQ::NewL( TInt aLayoutType )
       
  1103 	{
       
  1104     CPeninputLafDataFSQ* self = NewLC( aLayoutType );
       
  1105     CleanupStack::Pop();
       
  1106     return self;		
       
  1107 	}
       
  1108 // ---------------------------------------------------------------------------
       
  1109 // CPeninputLafDataFSQ::NewLC( TInt aLayoutType )
       
  1110 // (other items were commented in a header)
       
  1111 // ---------------------------------------------------------------------------
       
  1112 //		
       
  1113 CPeninputLafDataFSQ* CPeninputLafDataFSQ::NewLC( TInt aLayoutType )
       
  1114 	{
       
  1115 	CPeninputLafDataFSQ* self = new ( ELeave ) CPeninputLafDataFSQ( aLayoutType );
       
  1116     CleanupStack::PushL( self );
       
  1117     self->ConstructL(); 
       
  1118 
       
  1119     return self;
       
  1120 		
       
  1121 	}
       
  1122 
       
  1123 CPeninputLafDataFSQ::~CPeninputLafDataFSQ()
       
  1124 	{
       
  1125 	DestoryDataCommon();	
       
  1126 	}	
       
  1127 	
       
  1128 // ---------------------------------------------------------------------------
       
  1129 // CPeninputLafDataFSQ::CPeninputLafDataFSQ( TInt aLayoutType )
       
  1130 // (other items were commented in a header)
       
  1131 // ---------------------------------------------------------------------------
       
  1132 //		
       
  1133 CPeninputLafDataFSQ::CPeninputLafDataFSQ( TInt aLayoutType )
       
  1134 	{
       
  1135 	SetLayoutType( aLayoutType );	
       
  1136 	}
       
  1137 // ---------------------------------------------------------------------------
       
  1138 // CPeninputLafDataFSQ::ReadLafInfo()
       
  1139 // (other items were commented in a header)
       
  1140 // ---------------------------------------------------------------------------
       
  1141 //		
       
  1142 void CPeninputLafDataFSQ::ReadLafInfoL()
       
  1143 	{
       
  1144 	// clean up all the data
       
  1145 	iLayoutDataInfo.ResetAndDestroy();
       
  1146 	
       
  1147 	CPeninputQwtLayoutDataInfo* dataInfo = new( ELeave ) CPeninputQwtLayoutDataInfo;
       
  1148 	TAknWindowLineLayout appWnd; 
       
  1149     TAknWindowLineLayout wndLayout;
       
  1150     TAknWindowLineLayout keypad, cellpane;
       
  1151     
       
  1152     TAknWindowLineLayout cellPaneBK;
       
  1153     TAknLayoutRect cellPaneBKRect;
       
  1154     TRect keyBKRect;
       
  1155     TAknLayoutRect keypadRect, cellpaneRect;
       
  1156     TAknLayoutRect wndRect;
       
  1157     TAknLayoutText keyTextLayout; 
       
  1158 	TAknTextLineLayout keyText;
       
  1159 	TRect keyRect;
       
  1160 	// -----------------------Landscape Mode--------------------------
       
  1161 	appWnd = AknLayoutScalable_Avkon::application_window(0).LayoutLine();
       
  1162 	wndLayout = AknLayoutScalable_Avkon::popup_fep_vkb2_window(0).LayoutLine();
       
  1163 	wndRect.LayoutRect(appWnd.Rect(), wndLayout);
       
  1164 	// ==================10x3====================
       
  1165 	// top pane and bottom pane
       
  1166 	GetTopAndBottomPaneInfo( wndRect.Rect(), ELayout10x3, 0, *dataInfo );
       
  1167 	// keypad
       
  1168 	keyText = AknLayoutScalable_Avkon::vkb2_cell_keypad_pane_t1(0).LayoutLine();
       
  1169 	dataInfo->iKeypad.iTextLayout = keyText;
       
  1170   	dataInfo->iKeypad.iFont = AknLayoutUtils::FontFromId(keyText.iFont, NULL);
       
  1171   	//dataInfo->iKeypad.iTxtRect = keyText.TextRect();
       
  1172 
       
  1173     keypad = AknLayoutScalable_Avkon::vkb2_area_keypad_pane(0).LayoutLine();
       
  1174   	keypadRect.LayoutRect(wndRect.Rect(), keypad);
       
  1175   	dataInfo->iKeypad.iKaypadRect = keypadRect.Rect();
       
  1176   	//iKeypadRect10x3 = keypadRect.Rect();
       
  1177   	cellPaneBK = AknLayoutScalable_Avkon::vkb2_cell_keypad_pane_g1(0, 0, 0).LayoutLine();
       
  1178   	for( TInt i = 0; i < KKeypadLayout[0][1]; i++)
       
  1179   		{
       
  1180   		for( TInt j = 0; j < KKeypadLayout[0][0]; j++)
       
  1181   			{
       
  1182   			cellpane = AknLayoutScalable_Avkon::vkb2_cell_keypad_pane(0, j, i).LayoutLine();
       
  1183   			cellpaneRect.LayoutRect(keypadRect.Rect(), cellpane);
       
  1184   			keyRect = cellpaneRect.Rect();
       
  1185   			keyRect.Move( -keypadRect.Rect().iTl.iX, -keypadRect.Rect().iTl.iY );
       
  1186             cellPaneBKRect.LayoutRect( keyRect, cellPaneBK );
       
  1187             keyBKRect = cellPaneBKRect.Rect();
       
  1188             dataInfo->iKeypad.iRects.AppendL(keyBKRect);
       
  1189   			keyTextLayout.LayoutText(keyRect, keyText);
       
  1190   			dataInfo->iKeypad.iCharRects.AppendL(keyTextLayout.TextRect());
       
  1191   			}
       
  1192   		}
       
  1193  	keyText = AknLayoutScalable_Avkon::vkb2_cell_keypad_pane_t1(0).LayoutLine();
       
  1194   	dataInfo->iKeypad.iFont = AknLayoutUtils::FontFromId(keyText.iFont, NULL);
       
  1195   	//dataInfo->iKeypad.iTxtRect = keyText.TextRect();	
       
  1196   	
       
  1197   	// Add candate list laf data for ITI features
       
  1198   	// Candidate list's parent Layout window is ITUT window
       
  1199     TPeninputCandidateListLayoutData candidateListLAF;
       
  1200     TAknWindowLineLayout parentWnd;
       
  1201     TBool isLandscape = Layout_Meta_Data::IsLandscapeOrientation();
       
  1202    	// Add tooltip box laf data for ITI features.
       
  1203    	TPeninputTooltipBoxLayoutData tooltipBoxLAF;    	                                
       
  1204     if ( isLandscape )
       
  1205         {
       
  1206       	parentWnd = AknLayoutScalable_Apps::popup_vitu2_window( 1 ).LayoutLine();
       
  1207         TAknLayoutRect parentRectLayout;
       
  1208         parentRectLayout.LayoutRect( appWnd.Rect(), parentWnd );
       
  1209         candidateListLAF = ReadLafForCandidateList( parentRectLayout.Rect() );
       
  1210        	dataInfo->iCandidateList = candidateListLAF;
       
  1211         tooltipBoxLAF = ReadLafForTooltipBox( wndRect.Rect() );
       
  1212        	dataInfo->iTooltipBox = tooltipBoxLAF;
       
  1213         }
       
  1214    	
       
  1215    	
       
  1216    	iLayoutDataInfo.AppendL( dataInfo ); 
       
  1217   	
       
  1218 	// ==================11x3====================
       
  1219 	dataInfo = new( ELeave ) CPeninputQwtLayoutDataInfo;
       
  1220 	wndLayout = AknLayoutScalable_Avkon::popup_fep_vkb2_window(0).LayoutLine();
       
  1221 	wndRect.LayoutRect(appWnd.Rect(), wndLayout);
       
  1222 	// top pane and bottom pane
       
  1223 	GetTopAndBottomPaneInfo( wndRect.Rect(), ELayout11x3, 1, *dataInfo );	
       
  1224 	// keypad
       
  1225     keypad = AknLayoutScalable_Avkon::vkb2_area_keypad_pane(1).LayoutLine();
       
  1226   	keypadRect.LayoutRect(wndRect.Rect(), keypad);
       
  1227   	dataInfo->iKeypad.iKaypadRect = keypadRect.Rect();
       
  1228     cellPaneBK = AknLayoutScalable_Avkon::vkb2_cell_keypad_pane_g1(1, 0, 0).LayoutLine();
       
  1229   	
       
  1230   	for( TInt i = 0; i < KKeypadLayout[1][1]; i++)
       
  1231 		{
       
  1232 		for( TInt j = 0; j < KKeypadLayout[1][0]; j++)
       
  1233 			{
       
  1234   			cellpane = AknLayoutScalable_Avkon::vkb2_cell_keypad_pane(1, j, i).LayoutLine();
       
  1235   			cellpaneRect.LayoutRect(keypadRect.Rect(), cellpane);
       
  1236   			keyRect = cellpaneRect.Rect();
       
  1237   			keyRect.Move( -keypadRect.Rect().iTl.iX, -keypadRect.Rect().iTl.iY );
       
  1238             cellPaneBKRect.LayoutRect( keyRect, cellPaneBK );
       
  1239             keyBKRect = cellPaneBKRect.Rect();
       
  1240             dataInfo->iKeypad.iRects.AppendL(keyBKRect);
       
  1241   			keyTextLayout.LayoutText(keyRect, keyText);
       
  1242   			dataInfo->iKeypad.iCharRects.AppendL(keyTextLayout.TextRect());
       
  1243 			}
       
  1244 		}
       
  1245 	keyText = AknLayoutScalable_Avkon::vkb2_cell_keypad_pane_t1(1).LayoutLine();
       
  1246   	dataInfo->iKeypad.iTextLayout = keyText;	
       
  1247   	dataInfo->iKeypad.iFont = AknLayoutUtils::FontFromId(keyText.iFont, NULL);
       
  1248   	//dataInfo->iKeypad.iTxtRect = keyText.TextRect();	  	
       
  1249   	
       
  1250     if ( isLandscape )
       
  1251         {
       
  1252       	// Add candate list laf data for ITI features
       
  1253        	dataInfo->iCandidateList = candidateListLAF;
       
  1254        	// Add tooltip box laf data for ITI features.
       
  1255        	dataInfo->iTooltipBox = tooltipBoxLAF;
       
  1256         }
       
  1257    	
       
  1258 
       
  1259    	iLayoutDataInfo.AppendL( dataInfo ); 
       
  1260 	
       
  1261 	// ==================11x4====================
       
  1262 	dataInfo = new( ELeave ) CPeninputQwtLayoutDataInfo;
       
  1263 	wndLayout = AknLayoutScalable_Avkon::popup_fep_vkb2_window(0).LayoutLine();
       
  1264 	wndRect.LayoutRect(appWnd.Rect(), wndLayout);
       
  1265 	// top pane and bottom pane
       
  1266 	GetTopAndBottomPaneInfo( wndRect.Rect(), ELayout11x4, 2, *dataInfo );
       
  1267 	// keypad
       
  1268     keypad = AknLayoutScalable_Avkon::vkb2_area_keypad_pane(2).LayoutLine();
       
  1269   	keypadRect.LayoutRect(wndRect.Rect(), keypad);
       
  1270     dataInfo->iKeypad.iKaypadRect = keypadRect.Rect();
       
  1271     cellPaneBK = AknLayoutScalable_Avkon::vkb2_cell_keypad_pane_g1(2, 0, 0).LayoutLine();
       
  1272   	for( TInt i = 0; i < KKeypadLayout[2][1]; i++)
       
  1273   		{
       
  1274   		for( TInt j = 0; j < KKeypadLayout[2][0]; j++)
       
  1275   			{
       
  1276   			cellpane = AknLayoutScalable_Avkon::vkb2_cell_keypad_pane(2, j, i).LayoutLine();
       
  1277   			cellpaneRect.LayoutRect(keypadRect.Rect(), cellpane);
       
  1278   			keyRect = cellpaneRect.Rect();
       
  1279   			keyRect.Move( -keypadRect.Rect().iTl.iX, -keypadRect.Rect().iTl.iY );
       
  1280             cellPaneBKRect.LayoutRect( keyRect, cellPaneBK );
       
  1281             keyBKRect = cellPaneBKRect.Rect();
       
  1282             dataInfo->iKeypad.iRects.AppendL(keyBKRect);
       
  1283   			keyTextLayout.LayoutText(keyRect, keyText);
       
  1284   			dataInfo->iKeypad.iCharRects.AppendL(keyTextLayout.TextRect());
       
  1285   			}
       
  1286   		}
       
  1287  	keyText = AknLayoutScalable_Avkon::vkb2_cell_keypad_pane_t1(2).LayoutLine();
       
  1288   	dataInfo->iKeypad.iTextLayout = keyText; 	
       
  1289   	dataInfo->iKeypad.iFont = AknLayoutUtils::FontFromId(keyText.iFont, NULL);
       
  1290   	//dataInfo->iKeypad.iTxtRect = keyText.TextRect();	 	
       
  1291   	
       
  1292     if ( isLandscape )
       
  1293         {
       
  1294       	// Add candate list laf data for ITI features
       
  1295        	dataInfo->iCandidateList = candidateListLAF;
       
  1296        	// Add tooltip box laf data for ITI features.
       
  1297        	dataInfo->iTooltipBox = tooltipBoxLAF;
       
  1298         }
       
  1299    	
       
  1300    	
       
  1301    	iLayoutDataInfo.AppendL( dataInfo ); 
       
  1302    	   	
       
  1303 	}	
       
  1304 
       
  1305 // ---------------------------------------------------------------------------
       
  1306 // Read LAF data for candidate list
       
  1307 // ---------------------------------------------------------------------------
       
  1308 //		
       
  1309 TPeninputCandidateListLayoutData CPeninputLafDataFSQ::
       
  1310                                  ReadLafForCandidateList( const TRect& aRect )
       
  1311     {    
       
  1312 	// candidate list
       
  1313 	TAknWindowLineLayout candidateList 
       
  1314 	             = AknLayoutScalable_Apps::popup_vitu2_match_list_window( 3 )
       
  1315 	               .LayoutLine();	
       
  1316 	TAknLayoutRect candidateListRect;
       
  1317 	candidateListRect.LayoutRect( aRect, candidateList );	
       
  1318 	
       
  1319 	// list pane, its parent is candidate list
       
  1320 	TAknWindowLineLayout listpane
       
  1321 	             = AknLayoutScalable_Apps::list_vitu2_match_list_pane( 1 )
       
  1322 	               .LayoutLine();
       
  1323     TAknLayoutRect listpaneRect;
       
  1324     listpaneRect.LayoutRect( candidateListRect.Rect(), listpane );
       
  1325     
       
  1326     // scroll pane, its parent is candidate list
       
  1327     TAknWindowLineLayout scrollpane
       
  1328                  = AknLayoutScalable_Apps::vitu2_page_scroll_pane( 1 )
       
  1329                    .LayoutLine();
       
  1330     TAknLayoutRect scrollRect;
       
  1331     scrollRect.LayoutRect( candidateListRect.Rect(), scrollpane );
       
  1332     
       
  1333     // Item pane, its parent is list pane
       
  1334     TAknWindowLineLayout itemPane 
       
  1335           = AknLayoutScalable_Apps::list_vitu2_match_list_item_pane( 0, 0, 0 )
       
  1336             .LayoutLine();
       
  1337     TAknLayoutRect itemPaneRect;
       
  1338     itemPaneRect.LayoutRect( listpaneRect.Rect(), itemPane );
       
  1339 
       
  1340     TPeninputCandidateListLayoutData layoutData;    
       
  1341 	layoutData.iSelectionHorMargin = listpaneRect.Rect().iTl.iX;	
       
  1342 	layoutData.iSelectionVerMargin = listpaneRect.Rect().iTl.iY;		
       
  1343 	layoutData.iSelectionItemSize = itemPaneRect.Rect().Size();
       
  1344 	
       
  1345 	// Up button image. its parent is scroll pane
       
  1346 	TAknWindowLineLayout arrowUpImagePane
       
  1347 	                = AknLayoutScalable_Apps::vitu2_page_scroll_pane_g1()
       
  1348 	                  .LayoutLine();
       
  1349     TAknLayoutRect arrowUpImageRect;
       
  1350     arrowUpImageRect.LayoutRect( scrollRect.Rect(), arrowUpImagePane );
       
  1351     // Up button, its parent is scroll pane
       
  1352 	TAknWindowLineLayout arrowUpPane
       
  1353 	          = AknLayoutScalable_Apps::bg_button_pane_cp023().LayoutLine();
       
  1354     TAknLayoutRect arrowUpRect;
       
  1355     arrowUpRect.LayoutRect( scrollRect.Rect(), arrowUpPane );
       
  1356     
       
  1357     // Down button image, its parent is scroll pane
       
  1358     TAknWindowLineLayout arrowDownImagePane
       
  1359             = AknLayoutScalable_Apps::vitu2_page_scroll_pane_g2().LayoutLine();
       
  1360     TAknLayoutRect arrowDownImageRect;
       
  1361     arrowDownImageRect.LayoutRect( scrollRect.Rect(), arrowDownImagePane );
       
  1362     
       
  1363     // Down button, its parent is scroll pane
       
  1364     TAknWindowLineLayout arrowDownPane 
       
  1365                 = AknLayoutScalable_Apps::bg_button_pane_cp024().LayoutLine();
       
  1366     TAknLayoutRect arrowDownRect;
       
  1367     arrowDownRect.LayoutRect( scrollRect.Rect(), arrowDownPane );
       
  1368     
       
  1369 	layoutData.iSelectionNaviSize = arrowUpRect.Rect().Size();
       
  1370 	layoutData.iSelectionNaviInnerSize = arrowUpImagePane.Rect().Size();
       
  1371     
       
  1372 	layoutData.iSelectionTextLine 
       
  1373 	           = AknLayoutScalable_Apps::list_vitu2_match_list_item_pane_t1()
       
  1374 	             .LayoutLine();
       
  1375     layoutData.iSelectionPageTextLine 
       
  1376             = AknLayoutScalable_Apps::vitu2_page_scroll_pane_t1().LayoutLine();
       
  1377             
       
  1378     TAknLayoutText list_item_pane_t1_layout_text;
       
  1379     list_item_pane_t1_layout_text.LayoutText( listpaneRect.Rect(), 
       
  1380                                               layoutData.iSelectionTextLine );
       
  1381     layoutData.iFont = list_item_pane_t1_layout_text.Font();
       
  1382     return layoutData;
       
  1383     }
       
  1384 
       
  1385 // ---------------------------------------------------------------------------
       
  1386 // Read LAF data for tooltip box
       
  1387 // ---------------------------------------------------------------------------
       
  1388 // 
       
  1389 TPeninputTooltipBoxLayoutData CPeninputLafDataFSQ::
       
  1390                                     ReadLafForTooltipBox( const TRect& aRect )
       
  1391     {    
       
  1392     TAknWindowLineLayout tooltipBoxLayout 
       
  1393        = AknLayoutScalable_Avkon::popup_fep_tooltip_window( 0 ).LayoutLine();
       
  1394     
       
  1395     TAknLayoutRect tooltipBoxRect;
       
  1396 	tooltipBoxRect.LayoutRect( aRect, tooltipBoxLayout );
       
  1397 	
       
  1398     TPeninputTooltipBoxLayoutData layoutData;
       
  1399     layoutData.iRect = tooltipBoxRect.Rect();
       
  1400         
       
  1401     layoutData.iTooltipTextLayout 
       
  1402                     = AknLayoutScalable_Avkon::popup_fep_tooltip_window_t1( 0 )
       
  1403                     .LayoutLine();     
       
  1404     return layoutData;
       
  1405     }
       
  1406     
       
  1407 // End Of File