classicui_pub/ui_framework_utilities_api/tsrc/src/testsdkuifwutilblocksaknutils.cpp
changeset 0 2f259fa3e83a
child 4 8ca85d2f0db7
equal deleted inserted replaced
-1:000000000000 0:2f259fa3e83a
       
     1 /*
       
     2 * Copyright (c) 2002 - 2007 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:  test functions in aknutils.h
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 // [INCLUDE FILES]
       
    21 #include <e32svr.h>
       
    22 #include <stifparser.h>
       
    23 #include <stiftestinterface.h>
       
    24 #include <testsdkuifwutil.rsg>
       
    25 #include <eikclb.h>
       
    26 #include <eikfrlbd.h>
       
    27 #include <e32const.h>
       
    28 #include <akndialog.h>
       
    29 #include <aknlists.h>
       
    30 #include <eikclbd.h>
       
    31 #include <aknsfld.h>
       
    32 #include <aknlayout2def.h>
       
    33 #include <aknlayout2scalabledef.h>
       
    34 #include <eikmfne.h>
       
    35 #include <eikseced.h>
       
    36 #include <aknfontspecification.h>
       
    37 #include <akniconutils.h>
       
    38 #include <avkon.mbg>
       
    39 #include <gulfont.h>
       
    40 
       
    41 #include "testsdkuifwutil.h"
       
    42 
       
    43 // CONSTANTS
       
    44 const TInt KArraySize = 10;
       
    45 const TInt KBufSize = 64;
       
    46 const TInt KGeneralWidth = 50;
       
    47 const TInt KSearchFieldMaxLength = 20;
       
    48 _LIT( KTextExample, "textexample" );
       
    49 _LIT( KBitmapFile, "Z:\\resource\\apps\\avkon2.mbm" );
       
    50 
       
    51 // FORWARD DECLARATIONS
       
    52 // This class only for test, not any value.
       
    53 class CScrollBarObserver : public CBase, public MEikScrollBarObserver
       
    54     {
       
    55 public:
       
    56     // From MEikScrollBarObserver
       
    57     void HandleScrollEventL( CEikScrollBar* /*aScrollBar*/, TEikScrollEvent /*aEventType*/ ){}
       
    58     };
       
    59 
       
    60 // This class only for test, not any value.
       
    61 class CControlObserver : public CBase, public MCoeControlObserver
       
    62     {
       
    63 public:
       
    64     // From MCoeControlObserver
       
    65     void HandleControlEventL( CCoeControl* /*aControl*/,TCoeEvent /*aEventType*/ ){}
       
    66     };
       
    67 // ============================ MEMBER FUNCTIONS ===============================
       
    68 
       
    69 // -----------------------------------------------------------------------------
       
    70 // CTestSDKUiFwUtil::TestAknTextUtilsClipToFitL
       
    71 // -----------------------------------------------------------------------------
       
    72 //
       
    73 TInt CTestSDKUiFwUtil::TestAknTextUtilsClipToFitL( CStifItemParser& aItem )
       
    74     {
       
    75     TInt num = 0;
       
    76     TInt err = aItem.GetNextInt( num );
       
    77     if ( err != KErrNone )
       
    78         {
       
    79         return err;
       
    80         }
       
    81     const CFont& font = *(iEnv->TitleFont());
       
    82     TBool result;
       
    83     TBuf<KBufSize> buf( KTextExample );
       
    84     switch ( num )
       
    85         {
       
    86         case ECaseZero:
       
    87             {
       
    88             result = AknTextUtils::ClipToFit( buf, font, KGeneralWidth);
       
    89             break;
       
    90             }
       
    91         case ECaseOne:
       
    92             {
       
    93             TInt itemindex = 0;   
       
    94             TInt columnnumber = 0;
       
    95             CEikColumnListBox* collist = new ( ELeave ) CAknSingleStyleListBox;
       
    96             CleanupStack::PushL( collist );
       
    97             collist->SetContainerWindowL( *iContainer );
       
    98             iContainer->SetComponentControlL( collist );
       
    99             TResourceReader reader;
       
   100             iEnv->CreateResourceReaderLC( reader, R_SINGLE_LISTBOX );
       
   101             collist->ConstructFromResourceL( reader );
       
   102             CleanupStack::PopAndDestroy();
       
   103             CColumnListBoxData *data = collist->ItemDrawer()->ColumnData();
       
   104             data->SetColumnFontL( columnnumber, &font );
       
   105             result = AknTextUtils::ClipToFit( buf, AknTextUtils::EClipFromEnd, collist,
       
   106                     itemindex, columnnumber );
       
   107             CleanupStack::PopAndDestroy( collist );
       
   108             break;
       
   109             }
       
   110         case ECaseTwo:
       
   111             {
       
   112             TInt itemindex = 0;   
       
   113             TInt subcellnumber = 0;
       
   114             CEikFormattedCellListBox* celllist = new ( ELeave ) CEikFormattedCellListBox;
       
   115             CleanupStack::PushL( celllist );
       
   116             celllist->SetContainerWindowL( * iContainer );
       
   117             
       
   118             TResourceReader reader;
       
   119             iEnv->CreateResourceReaderLC( reader, R_DOUBLE_LISTBOX );
       
   120             celllist->ConstructFromResourceL( reader );
       
   121             CleanupStack::PopAndDestroy();
       
   122             CFormattedCellListBoxData* formatData = celllist->ItemDrawer()->FormattedCellData();
       
   123             formatData->SetSubCellFontL( subcellnumber, &font );
       
   124             result = AknTextUtils::ClipToFit( buf, AknTextUtils::EClipFromEnd, celllist,
       
   125                     itemindex, subcellnumber );
       
   126             CleanupStack::PopAndDestroy( celllist );
       
   127             break;
       
   128             }
       
   129         default:
       
   130             {
       
   131             return KErrNotSupported;
       
   132             }
       
   133         }
       
   134     STIF_ASSERT_TRUE( result );
       
   135     
       
   136     return KErrNone;
       
   137     }
       
   138 
       
   139 // -----------------------------------------------------------------------------
       
   140 // CTestSDKUiFwUtil::TestAKnTextUtilsWrapToArrayL
       
   141 // -----------------------------------------------------------------------------
       
   142 //
       
   143 TInt CTestSDKUiFwUtil::TestAknTextUtilsWrapToArrayL( CStifItemParser& aItem )
       
   144     {
       
   145     TInt num = 0;
       
   146     TInt err = aItem.GetNextInt( num );
       
   147     if ( err != KErrNone )
       
   148         {
       
   149         return err;
       
   150         }
       
   151     TBuf<KBufSize> buf( KTextExample );
       
   152     CArrayFix<TPtrC>* wraparray = new ( ELeave ) CArrayFixFlat<TPtrC>( KArraySize );
       
   153     CleanupStack::PushL( wraparray );
       
   154     const CFont& font = *(iEnv->TitleFont());
       
   155     switch ( num )
       
   156         {
       
   157         case ECaseZero:
       
   158             {
       
   159             AknTextUtils::WrapToArrayL( buf, KGeneralWidth, font, *wraparray );
       
   160             break;
       
   161             }
       
   162         case ECaseOne:
       
   163             {
       
   164             CArrayFix<TInt>* widtharray = new ( ELeave ) CArrayFixFlat<TInt>( KArraySize );
       
   165             CleanupStack::PushL( widtharray );
       
   166             AknTextUtils::WrapToArrayL( buf, *widtharray, font, *wraparray );
       
   167             CleanupStack::PopAndDestroy( widtharray );
       
   168             break;
       
   169             }
       
   170         default:
       
   171             {
       
   172             CleanupStack::PopAndDestroy( wraparray );
       
   173             return KErrNotSupported;
       
   174             }
       
   175         }
       
   176     
       
   177     CleanupStack::PopAndDestroy( wraparray );
       
   178     
       
   179     return KErrNone;
       
   180     }
       
   181 
       
   182 // -----------------------------------------------------------------------------
       
   183 // CTestSDKUiFwUtil::TestAknTextUtilsWrapToArrayAndClipL
       
   184 // -----------------------------------------------------------------------------
       
   185 //
       
   186 TInt CTestSDKUiFwUtil::TestAknTextUtilsWrapToArrayAndClipL( CStifItemParser& /*aItem*/ )
       
   187     {
       
   188     TBuf<KBufSize> buf( KTextExample );
       
   189     CArrayFix<TPtrC>* wraparray = new ( ELeave ) CArrayFixFlat<TPtrC>( KArraySize );
       
   190     CleanupStack::PushL( wraparray );
       
   191     const CFont& font = *(iEnv->TitleFont());
       
   192     CArrayFix<TInt>* widtharray = new ( ELeave ) CArrayFixFlat<TInt>( KArraySize );
       
   193     CleanupStack::PushL( widtharray );
       
   194     AknTextUtils::WrapToArrayAndClipL( buf, *widtharray, font, *wraparray );
       
   195     
       
   196     CleanupStack::PopAndDestroy( widtharray );
       
   197     CleanupStack::PopAndDestroy( wraparray );
       
   198     
       
   199     return KErrNone;
       
   200     }
       
   201 
       
   202 // -----------------------------------------------------------------------------
       
   203 // CTestSDKUiFwUtil::TestAknTextUtilsChopToArrayAndClipL
       
   204 // -----------------------------------------------------------------------------
       
   205 //
       
   206 TInt CTestSDKUiFwUtil::TestAknTextUtilsChopToArrayAndClipL( CStifItemParser& aItem )
       
   207     {
       
   208     TInt num = 0;
       
   209     TInt err = aItem.GetNextInt( num );
       
   210     if ( err != KErrNone )
       
   211         {
       
   212         return err;
       
   213         }
       
   214     TBuf<KBufSize> buf( KTextExample );
       
   215     CArrayFix<TPtrC>* wraparray = new ( ELeave ) CArrayFixFlat<TPtrC>( KArraySize );
       
   216     CleanupStack::PushL( wraparray );
       
   217     const CFont& font = *(iEnv->TitleFont());
       
   218     switch ( num )
       
   219         {
       
   220         case ECaseZero:
       
   221             {
       
   222             AknTextUtils::ChopToArrayAndClipL( buf, KGeneralWidth, font, *wraparray );
       
   223             break;
       
   224             }
       
   225         case ECaseOne:
       
   226             {
       
   227             CArrayFix<TInt>* widtharray = new ( ELeave ) CArrayFixFlat<TInt>( KArraySize );
       
   228             CleanupStack::PushL( widtharray );
       
   229             AknTextUtils::ChopToArrayAndClipL( buf, *widtharray, font, *wraparray );
       
   230             CleanupStack::PopAndDestroy( widtharray );
       
   231             break;
       
   232             }
       
   233         default:
       
   234             {
       
   235             CleanupStack::PopAndDestroy( wraparray );
       
   236             return KErrNotSupported;
       
   237             }
       
   238         }
       
   239     
       
   240     CleanupStack::PopAndDestroy( wraparray );
       
   241     
       
   242     return KErrNone;
       
   243     }
       
   244 
       
   245 // -----------------------------------------------------------------------------
       
   246 // CTestSDKUiFwUtil::TestAknTextUtilsWrapToStringL
       
   247 // -----------------------------------------------------------------------------
       
   248 //
       
   249 TInt CTestSDKUiFwUtil::TestAknTextUtilsWrapToStringL( CStifItemParser& /*aItem*/ )
       
   250     {
       
   251     TBuf<KBufSize> buf( KTextExample );
       
   252     TBuf<KBufSize> wrapbuf;
       
   253     const CFont& font = *(iEnv->TitleFont());
       
   254     CArrayFix<TInt>* widtharray = new ( ELeave ) CArrayFixFlat<TInt>( KArraySize );
       
   255     CleanupStack::PushL( widtharray );
       
   256     AknTextUtils::WrapToStringL( buf, *widtharray, font, wrapbuf );
       
   257     
       
   258     CleanupStack::PopAndDestroy( widtharray );
       
   259     
       
   260     return KErrNone;
       
   261     }
       
   262 
       
   263 // -----------------------------------------------------------------------------
       
   264 // CTestSDKUiFwUtil::TestAknTextUtilsWrapToStringAndClipL
       
   265 // -----------------------------------------------------------------------------
       
   266 //
       
   267 TInt CTestSDKUiFwUtil::TestAknTextUtilsWrapToStringAndClipL( CStifItemParser& /*aItem*/ )
       
   268     {
       
   269     TBuf<KBufSize> buf( KTextExample );
       
   270     TBuf<KBufSize> wrapbuf;
       
   271     const CFont& font = *(iEnv->TitleFont());
       
   272     CArrayFix<TInt>* widtharray = new ( ELeave ) CArrayFixFlat<TInt>( KArraySize );
       
   273     CleanupStack::PushL( widtharray );
       
   274     AknTextUtils::WrapToStringAndClipL( buf, *widtharray, font, wrapbuf );
       
   275     
       
   276     CleanupStack::PopAndDestroy(widtharray);
       
   277     
       
   278     return KErrNone;
       
   279     }
       
   280 
       
   281 // -----------------------------------------------------------------------------
       
   282 // CTestSDKUiFwUtil::TestAknTextUtilsProcessCharacters
       
   283 // -----------------------------------------------------------------------------
       
   284 //
       
   285 TInt CTestSDKUiFwUtil::TestAknTextUtilsProcessCharacters( CStifItemParser& aItem )
       
   286     {
       
   287     TInt num = 0;
       
   288     TInt err = aItem.GetNextInt( num );
       
   289     if ( err != KErrNone )
       
   290         {
       
   291         return err;
       
   292         }
       
   293     TBuf<KBufSize> buf( KTextExample );
       
   294     TBuf<KBufSize> charactor;
       
   295     charactor.FillZ();
       
   296     charactor.Append( ' ' );
       
   297     TChar replacechar( 'a' );
       
   298     switch ( num )
       
   299         {
       
   300         case ECaseZero:
       
   301             {
       
   302             AknTextUtils::StripCharacters( buf, charactor );
       
   303             break;
       
   304             }
       
   305         case ECaseOne:
       
   306             {
       
   307             AknTextUtils::ReplaceCharacters( buf, charactor, replacechar );
       
   308             break;
       
   309             }
       
   310         case ECaseTwo:
       
   311             {
       
   312             AknTextUtils::PackWhiteSpaces( buf, charactor );
       
   313             break;
       
   314             }
       
   315         default:
       
   316             {
       
   317             return KErrNotSupported;
       
   318             }
       
   319         }
       
   320     
       
   321     return KErrNone;
       
   322     }
       
   323 
       
   324 // -----------------------------------------------------------------------------
       
   325 // CTestSDKUiFwUtil::TestAknTextUtilsLanguageSpecificNumberConversion
       
   326 // -----------------------------------------------------------------------------
       
   327 //
       
   328 TInt CTestSDKUiFwUtil::TestAknTextUtilsLanguageSpecificNumberConversion( CStifItemParser& /*aItem*/ )
       
   329     {
       
   330     TBuf<KBufSize> buf( KTextExample );
       
   331     AknTextUtils::LanguageSpecificNumberConversion( buf );
       
   332     
       
   333     return KErrNone;
       
   334     }
       
   335 
       
   336 // -----------------------------------------------------------------------------
       
   337 // CTestSDKUiFwUtil::TestAknTextUtilsConvertDigitsTo
       
   338 // -----------------------------------------------------------------------------
       
   339 //
       
   340 TInt CTestSDKUiFwUtil::TestAknTextUtilsConvertDigitsTo( CStifItemParser& /*aItem*/ )
       
   341     {
       
   342     TBuf<KBufSize> buf( KTextExample );
       
   343     AknTextUtils::ConvertDigitsTo( buf, EDigitTypeAllTypes );
       
   344     
       
   345     return KErrNone;
       
   346     }
       
   347 
       
   348 // -----------------------------------------------------------------------------
       
   349 // CTestSDKUiFwUtil::TestAknTextUtilsCurrentScriptDirectionality
       
   350 // -----------------------------------------------------------------------------
       
   351 //
       
   352 TInt CTestSDKUiFwUtil::TestAknTextUtilsCurrentScriptDirectionality( CStifItemParser& /*aItem*/ )
       
   353     {
       
   354     TBuf<KBufSize> buf( KTextExample );
       
   355     AknTextUtils::CurrentScriptDirectionality();
       
   356     
       
   357     return KErrNone;
       
   358     }
       
   359 
       
   360 // -----------------------------------------------------------------------------
       
   361 // CTestSDKUiFwUtil::TestAknTextUtilsNumericEditorDigitType
       
   362 // -----------------------------------------------------------------------------
       
   363 //
       
   364 TInt CTestSDKUiFwUtil::TestAknTextUtilsNumericEditorDigitType( CStifItemParser& /*aItem*/ )
       
   365     {
       
   366     AknTextUtils::NumericEditorDigitType();
       
   367     
       
   368     return KErrNone;
       
   369     }
       
   370 
       
   371 // -----------------------------------------------------------------------------
       
   372 // CTestSDKUiFwUtil::TestAknTextUtilsDisplayTextLanguageSpecificNumberConversion
       
   373 // -----------------------------------------------------------------------------
       
   374 //
       
   375 TInt CTestSDKUiFwUtil::TestAknTextUtilsDisplayTextLanguageSpecificNumberConversion( CStifItemParser& /*aItem*/ )
       
   376     {
       
   377     TBuf<KBufSize> buf( KTextExample );
       
   378     AknTextUtils::DisplayTextLanguageSpecificNumberConversion( buf );
       
   379     
       
   380     return KErrNone;
       
   381     }
       
   382 
       
   383 // -----------------------------------------------------------------------------
       
   384 // CTestSDKUiFwUtil::TestAknTextUtilsTextEditorDigitType
       
   385 // -----------------------------------------------------------------------------
       
   386 //
       
   387 TInt CTestSDKUiFwUtil::TestAknTextUtilsTextEditorDigitType( CStifItemParser& /*aItem*/ )
       
   388     {
       
   389     AknTextUtils::TextEditorDigitType();
       
   390     
       
   391     return KErrNone;
       
   392     }
       
   393 
       
   394 // -----------------------------------------------------------------------------
       
   395 // CTestSDKUiFwUtil::TestAknTextUtilsDigitModeQuery
       
   396 // -----------------------------------------------------------------------------
       
   397 //
       
   398 TInt CTestSDKUiFwUtil::TestAknTextUtilsDigitModeQuery( CStifItemParser& /*aItem*/ )
       
   399     {
       
   400     AknTextUtils::DigitModeQuery( AknTextUtils::EDigitModeNumberEditor );
       
   401     
       
   402     return KErrNone;
       
   403     }
       
   404 
       
   405 // -----------------------------------------------------------------------------
       
   406 // CTestSDKUiFwUtil::TestAknTextUtilsConvertFileNameL
       
   407 // -----------------------------------------------------------------------------
       
   408 //
       
   409 TInt CTestSDKUiFwUtil::TestAknTextUtilsConvertFileNameL( CStifItemParser& /*aItem*/ )
       
   410     {
       
   411     TBuf<KBufSize> buf( KTextExample );
       
   412     AknTextUtils::ConvertFileNameL( buf );
       
   413     
       
   414     return KErrNone;
       
   415     }
       
   416 
       
   417 // -----------------------------------------------------------------------------
       
   418 // CTestSDKUiFwUtil::TestAknTextUtilsLoadTextL
       
   419 // -----------------------------------------------------------------------------
       
   420 //
       
   421 TInt CTestSDKUiFwUtil::TestAknTextUtilsLoadTextL( CStifItemParser& /*aItem*/ )
       
   422     {
       
   423     TBuf<64> buf;
       
   424     AknTextUtils::LoadScalableText( *(CCoeEnv::Static()), 
       
   425         R_AKNTEXTUTILS_BUFZERO, buf );
       
   426     AknTextUtils::LoadScalableTextL( *(CCoeEnv::Static()), R_AKNTEXTUTILS_BUF );
       
   427     AknTextUtils::LoadScalableTextLC( *(CCoeEnv::Static()), R_AKNTEXTUTILS_BUF );
       
   428     CleanupStack::PopAndDestroy();
       
   429     
       
   430     return KErrNone;
       
   431     }
       
   432 
       
   433 // -----------------------------------------------------------------------------
       
   434 // CTestSDKUiFwUtil::TestAknTextUtilsClipAccordingScreenOrientationLCL
       
   435 // -----------------------------------------------------------------------------
       
   436 //
       
   437 TInt CTestSDKUiFwUtil::TestAknTextUtilsClipAccordingScreenOrientationLCL( CStifItemParser& /*aItem*/ )
       
   438     {
       
   439     TBuf<KBufSize> buf( KTextExample );
       
   440     HBufC* hbuf = HBufC::NewL( KBufSize );
       
   441     *hbuf = buf;    
       
   442     AknTextUtils::ClipAccordingScreenOrientationLC( *(CCoeEnv::Static()), hbuf );
       
   443     CleanupStack::PopAndDestroy();
       
   444     
       
   445     return KErrNone;
       
   446     }
       
   447 
       
   448 // -----------------------------------------------------------------------------
       
   449 // CTestSDKUiFwUtil::TestAknTextUtilsChooseScalableText
       
   450 // -----------------------------------------------------------------------------
       
   451 //
       
   452 TInt CTestSDKUiFwUtil::TestAknTextUtilsChooseScalableText( CStifItemParser& /*aItem*/ )
       
   453     {
       
   454     TBuf<KBufSize> buf( KTextExample );
       
   455     const CFont& font = *(iEnv->TitleFont());
       
   456     AknTextUtils::ChooseScalableText( buf, font, KGeneralWidth );
       
   457     
       
   458     return KErrNone;
       
   459     }
       
   460 
       
   461 // -----------------------------------------------------------------------------
       
   462 // CTestSDKUiFwUtil::TestAknSelectServHandleSelectionListProcessCommandL
       
   463 // -----------------------------------------------------------------------------
       
   464 //
       
   465 TInt CTestSDKUiFwUtil::TestAknSelectServHandleSelectionListProcessCommandL( CStifItemParser& /*aItem*/ )
       
   466     {
       
   467     CEikListBox* list = new ( ELeave ) CEikListBox;
       
   468     CleanupStack::PushL( list );
       
   469     AknSelectionService::HandleSelectionListProcessCommandL( 0, list );
       
   470     CleanupStack::PopAndDestroy( list );
       
   471     
       
   472     return KErrNone;
       
   473     }
       
   474 
       
   475 // -----------------------------------------------------------------------------
       
   476 // CTestSDKUiFwUtil::TestAknSelectServHandleMultiselectionListProcessCommandL
       
   477 // -----------------------------------------------------------------------------
       
   478 //
       
   479 TInt CTestSDKUiFwUtil::TestAknSelectServHandleMultiselectionListProcessCommandL( CStifItemParser& /*aItem*/ )
       
   480     {
       
   481     CEikListBox* list = new ( ELeave ) CEikListBox;
       
   482     CleanupStack::PushL( list );
       
   483     AknSelectionService::HandleMultiselectionListProcessCommandL( 0, list );
       
   484     CleanupStack::PopAndDestroy( list );
       
   485     
       
   486     return KErrNone;
       
   487     }
       
   488 
       
   489 // -----------------------------------------------------------------------------
       
   490 // CTestSDKUiFwUtil::TestAknSelectServHandleMarkableListProcessCommandL
       
   491 // -----------------------------------------------------------------------------
       
   492 //
       
   493 TInt CTestSDKUiFwUtil::TestAknSelectServHandleMarkableListProcessCommandL( CStifItemParser& /*aItem*/ )
       
   494     {
       
   495     CEikListBox* list = new ( ELeave ) CEikListBox;
       
   496     CleanupStack::PushL( list );
       
   497     AknSelectionService::HandleMarkableListProcessCommandL( 0, list );
       
   498     CleanupStack::PopAndDestroy( list );
       
   499     
       
   500     return KErrNone;
       
   501     }
       
   502 
       
   503 // -----------------------------------------------------------------------------
       
   504 // CTestSDKUiFwUtil::TestAknSelectServHandleMenuListOfferKeyEventL
       
   505 // -----------------------------------------------------------------------------
       
   506 //
       
   507 TInt CTestSDKUiFwUtil::TestAknSelectServHandleMenuListOfferKeyEventL( CStifItemParser& /*aItem*/ )
       
   508     {
       
   509     CEikListBox* list = new ( ELeave ) CAknSingleStyleListBox;
       
   510     CleanupStack::PushL( list );
       
   511     list->SetContainerWindowL( *iContainer );
       
   512     iContainer->SetComponentControlL( list );
       
   513     TResourceReader reader;
       
   514     iEnv->CreateResourceReaderLC( reader, R_SINGLE_LISTBOX );
       
   515     list->ConstructFromResourceL( reader );
       
   516     CleanupStack::PopAndDestroy();
       
   517     TKeyEvent keyevent = { EKeyLeftShift, 0, 0, 0 };
       
   518     AknSelectionService::HandleMenuListOfferKeyEventL( keyevent, EEventKey, list );
       
   519     CleanupStack::PopAndDestroy( list );
       
   520     
       
   521     return KErrNone;
       
   522     }
       
   523 
       
   524 // -----------------------------------------------------------------------------
       
   525 // CTestSDKUiFwUtil::TestAknSelectServHandleMarkableListDynInitMenuPaneL
       
   526 // -----------------------------------------------------------------------------
       
   527 //
       
   528 TInt CTestSDKUiFwUtil::TestAknSelectServHandleMarkableListDynInitMenuPaneL( CStifItemParser& /*aItem*/ )
       
   529     {
       
   530     CAknDialog* dlg = new( ELeave ) CAknDialog();
       
   531     CleanupStack::PushL( dlg );
       
   532     CEikMenuPane* menuPane = new( ELeave ) CEikMenuPane( dlg );
       
   533     CleanupStack::PushL( menuPane );
       
   534     CEikListBox* list = new ( ELeave ) CEikListBox;
       
   535     CleanupStack::PushL( list );
       
   536     list->SetContainerWindowL( *iContainer );
       
   537     iContainer->SetComponentControlL( list );
       
   538     TResourceReader reader;
       
   539     iEnv->CreateResourceReaderLC( reader, R_SINGLE_LISTBOX );
       
   540     list->ConstructFromResourceL( reader );
       
   541     CleanupStack::PopAndDestroy();
       
   542     AknSelectionService::HandleMarkableListDynInitMenuPane(
       
   543             R_AKNSELECTIONSERVICE_MENUPANE, menuPane, list );
       
   544     CleanupStack::PopAndDestroy( 3 );
       
   545     
       
   546     return KErrNone;
       
   547     }
       
   548 
       
   549 // -----------------------------------------------------------------------------
       
   550 // CTestSDKUiFwUtil::TestAknSelectServHandleMarkableListDynInitMenuItemL
       
   551 // -----------------------------------------------------------------------------
       
   552 //
       
   553 TInt CTestSDKUiFwUtil::TestAknSelectServHandleMarkableListDynInitMenuItemL( CStifItemParser& /*aItem*/ )
       
   554     {
       
   555     CAknDialog* dlg = new( ELeave ) CAknDialog();
       
   556     CleanupStack::PushL( dlg );
       
   557     CEikMenuPane* menuPane = new( ELeave ) CEikMenuPane( dlg );
       
   558     CleanupStack::PushL( menuPane );
       
   559     menuPane->ConstructL( NULL, dlg );
       
   560     CEikMenuPaneItem::SData item;
       
   561     item.iCommandId = 0;
       
   562     item.iCascadeId = 0;
       
   563     item.iFlags = 0;
       
   564     item.iText.Copy( KTextExample );
       
   565         
       
   566     menuPane->AddMenuItemL( item );
       
   567     CEikListBox* list = new ( ELeave ) CEikListBox;
       
   568     CleanupStack::PushL( list );
       
   569     TResourceReader reader;
       
   570     iEnv->CreateResourceReaderLC( reader, R_SINGLE_LISTBOX );
       
   571     list->ConstructFromResourceL( reader );
       
   572     CleanupStack::PopAndDestroy();
       
   573     AknSelectionService::HandleMarkableListDynInitMenuItem(
       
   574             menuPane, list, 0, ETrue );
       
   575     CleanupStack::PopAndDestroy( 3 );
       
   576     
       
   577     return KErrNone;
       
   578     }
       
   579 
       
   580 // -----------------------------------------------------------------------------
       
   581 // CTestSDKUiFwUtil::TestAknSelectServHandleMarkableListUpdateAfterCommandExecutionL
       
   582 // -----------------------------------------------------------------------------
       
   583 //
       
   584 TInt CTestSDKUiFwUtil::TestAknSelectServHandleMarkableListUpdateAfterCommandExecutionL( CStifItemParser& /*aItem*/ )
       
   585     {
       
   586     CEikListBox* list = new ( ELeave ) CAknSingleNumberStyleListBox;
       
   587     CleanupStack::PushL( list );
       
   588     list->SetContainerWindowL( *iContainer );
       
   589     iContainer->SetComponentControlL( list );
       
   590     TResourceReader reader;
       
   591     iEnv->CreateResourceReaderLC( reader, R_SINGLE_LISTBOX );
       
   592     list->ConstructFromResourceL( reader );
       
   593     CleanupStack::PopAndDestroy();
       
   594     AknSelectionService::HandleMarkableListUpdateAfterCommandExecution( list );
       
   595     CleanupStack::PopAndDestroy( list );
       
   596     // these two methods fail for no view.
       
   597     return KErrNone;
       
   598     }
       
   599 
       
   600 // -----------------------------------------------------------------------------
       
   601 // CTestSDKUiFwUtil::TestAknSelectServHandleItemRemovalAndPositionHighlightL
       
   602 // -----------------------------------------------------------------------------
       
   603 // 
       
   604 TInt CTestSDKUiFwUtil::TestAknSelectServHandleItemRemovalAndPositionHighlightL( CStifItemParser& /*aItem*/ )
       
   605     {//!!! crash
       
   606     CAknDoubleLargeStyleListBox* list = new ( ELeave ) CAknDoubleLargeStyleListBox;
       
   607     CleanupStack::PushL( list );
       
   608     list->SetContainerWindowL( *iContainer );
       
   609     TResourceReader reader;
       
   610     iEnv->CreateResourceReaderLC( reader, R_SINGLE_LISTBOX );
       
   611     list->ConstructFromResourceL( reader );
       
   612     CleanupStack::PopAndDestroy();
       
   613     list->SetCurrentItemIndex( 0 );
       
   614     CArrayFixFlat<TInt>* indexArray = new( ELeave ) CArrayFixFlat<TInt>( 2 );
       
   615     CleanupStack::PushL( indexArray );
       
   616     indexArray->AppendL( 0 );
       
   617     list->SetTopItemIndex( 1 );
       
   618     CDesCArray* textArray = static_cast<CDesCArray*>( list->Model()->ItemTextArray() );
       
   619     TInt num = textArray->Count();
       
   620     textArray->Delete( 0 );
       
   621     AknSelectionService::HandleItemRemovalAndPositionHighlightL( list, 0, ETrue );
       
   622     list->HandleItemAdditionL();
       
   623     list->SetTopItemIndex( 1 );
       
   624     AknSelectionService::HandleItemRemovalAndPositionHighlightL( list, 0, *indexArray );
       
   625     CleanupStack::PopAndDestroy( indexArray );
       
   626     CleanupStack::PopAndDestroy( list );
       
   627     return KErrNone;
       
   628     }
       
   629 
       
   630 // -----------------------------------------------------------------------------
       
   631 // CTestSDKUiFwUtil::TestAknFindHandleFindPopupProcessCommandL
       
   632 // -----------------------------------------------------------------------------
       
   633 //
       
   634 TInt CTestSDKUiFwUtil::TestAknFindHandleFindPopupProcessCommandL( CStifItemParser& /*aItem*/ )
       
   635     {
       
   636     TInt cmd = 0;
       
   637     CEikListBox* list = new ( ELeave ) CAknSingleStyleListBox;
       
   638     CleanupStack::PushL( list );
       
   639     list->SetContainerWindowL( *iContainer );
       
   640     iContainer->SetComponentControlL( list );
       
   641     TResourceReader reader;
       
   642     iEnv->CreateResourceReaderLC( reader, R_SINGLE_LISTBOX );
       
   643     list->ConstructFromResourceL( reader );
       
   644     CleanupStack::PopAndDestroy();
       
   645     CAknSearchField* searchfield = CAknSearchField::NewL( *iContainer, 
       
   646             CAknSearchField::ESearch, NULL, KSearchFieldMaxLength );
       
   647     CleanupStack::PushL( searchfield );
       
   648     AknFind::HandleFindPopupProcessCommandL( cmd, list, searchfield, iContainer );
       
   649     
       
   650     CleanupStack::PopAndDestroy( 2 );
       
   651     
       
   652     return KErrNone;
       
   653     }
       
   654 
       
   655 // -----------------------------------------------------------------------------
       
   656 // CTestSDKUiFwUtil::TestAknFindHandleFindOfferKeyEventL
       
   657 // -----------------------------------------------------------------------------
       
   658 //
       
   659 TInt CTestSDKUiFwUtil::TestAknFindHandleFindOfferKeyEventL( CStifItemParser& /*aItem*/ )
       
   660     {
       
   661     TBool reflash = ETrue;
       
   662     TKeyEvent keyevent = { 'a', 'b', 1, 0 };
       
   663     CEikListBox* list = new ( ELeave ) CAknSingleStyleListBox;
       
   664     CleanupStack::PushL( list );
       
   665     list->SetContainerWindowL( *iContainer );
       
   666     iContainer->SetComponentControlL( list );
       
   667     TResourceReader reader;
       
   668     iEnv->CreateResourceReaderLC( reader, R_SINGLE_LISTBOX );
       
   669     list->ConstructFromResourceL( reader );
       
   670     CleanupStack::PopAndDestroy();
       
   671     AknFind::HandleFindOfferKeyEventL( keyevent, EEventKey, iContainer, list, NULL, ETrue, reflash );
       
   672     
       
   673     CleanupStack::PopAndDestroy( list );
       
   674     
       
   675     return KErrNone;
       
   676     }
       
   677 
       
   678 // -----------------------------------------------------------------------------
       
   679 // CTestSDKUiFwUtil::TestAknFindHandleSizeChangeL
       
   680 // -----------------------------------------------------------------------------
       
   681 //
       
   682 TInt CTestSDKUiFwUtil::TestAknFindHandleSizeChangeL( CStifItemParser& /*aItem*/ )
       
   683     {
       
   684     CEikListBox* list = new ( ELeave ) CAknSingleStyleListBox;
       
   685     CleanupStack::PushL( list );
       
   686     list->SetContainerWindowL( *iContainer );
       
   687     iContainer->SetComponentControlL( list );
       
   688     TResourceReader reader;
       
   689     iEnv->CreateResourceReaderLC( reader, R_SINGLE_LISTBOX );
       
   690     list->ConstructFromResourceL( reader );
       
   691     CleanupStack::PopAndDestroy();
       
   692     AknFind::HandleFindSizeChanged( iContainer, list, NULL );
       
   693     CAknColumnListBox* listbox = static_cast<CAknColumnListBox*>( list );
       
   694     AknFind::HandleFixedFindSizeChanged( iContainer, listbox, NULL );
       
   695     AknFind::HandlePopupFindSizeChanged( iContainer, list, NULL );
       
   696     TAknWindowLineLayout findarea;
       
   697     TAknWindowLineLayout listarea;
       
   698     TAknWindowLineLayout paraentarea;
       
   699     AknFind::HandleFindSizeChangedLayouts( iContainer, list, NULL, findarea, listarea, EFalse, paraentarea );
       
   700     
       
   701     CleanupStack::PopAndDestroy( list );
       
   702     
       
   703     return KErrNone;
       
   704     }
       
   705 
       
   706 // -----------------------------------------------------------------------------
       
   707 // CTestSDKUiFwUtil::TestAknFindProcessStrL
       
   708 // -----------------------------------------------------------------------------
       
   709 //
       
   710 TInt CTestSDKUiFwUtil::TestAknFindProcessStrL( CStifItemParser& /*aItem*/ )
       
   711     {
       
   712     TBuf<KBufSize> itembuf( KTextExample );
       
   713     TBuf<KBufSize> searchbuf( KTextExample );
       
   714     HBufC* hbuf = HBufC::NewL( KBufSize );
       
   715     CleanupStack::PushL( hbuf );
       
   716     *hbuf = itembuf;
       
   717     TChar ch( 'a' );
       
   718     AknFind::IsFindMatch( itembuf, searchbuf );
       
   719     AknFind::IsFindWordSeparator( ch );
       
   720     AknFind::IsAdaptiveFindMatch( itembuf, searchbuf, hbuf );
       
   721     AknFind::UpdateNextCharsFromString( hbuf,itembuf );
       
   722     AknFind::UpdateItemTextAccordingToFlag( itembuf, 0, searchbuf );
       
   723     CleanupStack::PopAndDestroy( hbuf );
       
   724     
       
   725     return KErrNone;
       
   726     }
       
   727 
       
   728 // -----------------------------------------------------------------------------
       
   729 // CTestSDKUiFwUtil::TestAknFindConstructEditingL
       
   730 // -----------------------------------------------------------------------------
       
   731 //
       
   732 TInt CTestSDKUiFwUtil::TestAknFindConstructEditingL( CStifItemParser& /*aItem*/ )
       
   733     {
       
   734     CEikEdwin* edwin = new( ELeave ) CEikEdwin;
       
   735     CleanupStack::PushL( edwin );
       
   736     AknEditUtils::ConstructEditingL( edwin, R_AKNEDITUTILS_EDWIN );
       
   737     CleanupStack::PopAndDestroy( edwin );
       
   738     edwin = NULL;
       
   739     edwin = new( ELeave ) CEikEdwin;
       
   740     CleanupStack::PushL( edwin );
       
   741     TResourceReader reader;
       
   742     iEnv->CreateResourceReaderLC( reader, R_AKNEDITUTILS_EDWIN );
       
   743     AknEditUtils::ConstructEditingL( edwin, reader );
       
   744     CleanupStack::PopAndDestroy( 2 );
       
   745     edwin = NULL;
       
   746     edwin = new( ELeave ) CEikEdwin;
       
   747     CleanupStack::PushL( edwin );
       
   748     AknEditUtils::SAknEditorParameters para;
       
   749     para.iEditingSpace = 1;
       
   750     para.iEditingWindow = 1;
       
   751     para.iCharacterCase = 1;
       
   752     para.iJustification = 1;
       
   753     para.iAllowedToMoveInsertionPoint = ETrue;
       
   754     para.iCursorYesNo = ETrue;
       
   755     para.iOverflowYesNo = ETrue;
       
   756     AknEditUtils::ConstructEditingL( edwin, para );
       
   757     CleanupStack::PopAndDestroy( edwin );
       
   758     edwin = NULL;
       
   759     edwin = new( ELeave ) CEikEdwin;
       
   760     CleanupStack::PushL( edwin );
       
   761     AknEditUtils::ConstructEditingL( edwin, 1, 1, 1, 1, ETrue, ETrue, ETrue );
       
   762     CleanupStack::PopAndDestroy( edwin );
       
   763     edwin = NULL;
       
   764     edwin = new( ELeave ) CEikEdwin;
       
   765     CleanupStack::PushL( edwin );
       
   766     AknEditUtils::ConstructEditingL( edwin, 1, 1, 1, 1, ETrue, ETrue, ETrue, EFalse );
       
   767     CleanupStack::PopAndDestroy( edwin );
       
   768     
       
   769     return KErrNone;
       
   770     }
       
   771 
       
   772 // -----------------------------------------------------------------------------
       
   773 // CTestSDKUiFwUtil::TestCListBoxNumbersL
       
   774 // -----------------------------------------------------------------------------
       
   775 //
       
   776 TInt CTestSDKUiFwUtil::TestCListBoxNumbersL( CStifItemParser& /*aItem*/ )
       
   777     {
       
   778     CEikColumnListBox* collist = new ( ELeave ) CAknSingleStyleListBox;
       
   779     CleanupStack::PushL( collist );
       
   780     collist->SetContainerWindowL( *iContainer );
       
   781     iContainer->SetComponentControlL( collist );
       
   782     TResourceReader reader;
       
   783     iEnv->CreateResourceReaderLC( reader, R_SINGLE_LISTBOX );
       
   784     collist->ConstructFromResourceL( reader );
       
   785     CleanupStack::PopAndDestroy();
       
   786     CListBoxNumbers* numberlist = new ( ELeave ) CListBoxNumbers( collist );
       
   787     CleanupStack::PushL( numberlist );
       
   788     numberlist->ConstructL();
       
   789     numberlist->UpdateL();
       
   790     CleanupStack::PopAndDestroy( numberlist );
       
   791     CleanupStack::PopAndDestroy( collist );
       
   792     
       
   793     return KErrNone;
       
   794     }
       
   795 
       
   796 // -----------------------------------------------------------------------------
       
   797 // CTestSDKUiFwUtil::TestFilterTextListBoxModelProcessFilterL
       
   798 // -----------------------------------------------------------------------------
       
   799 //
       
   800 TInt CTestSDKUiFwUtil::TestFilterTextListBoxModelProcessFilterL( CStifItemParser& /*aItem*/ )
       
   801     {
       
   802     CEikListBox* celllist = new ( ELeave ) CAknSingleNumberStyleListBox;
       
   803     CleanupStack::PushL( celllist );
       
   804     celllist->SetContainerWindowL( * iContainer );
       
   805     TResourceReader reader;
       
   806     iEnv->CreateResourceReaderLC( reader, R_DOUBLE_LISTBOX );
       
   807     celllist->ConstructFromResourceL( reader );
       
   808     CleanupStack::PopAndDestroy();
       
   809     CAknSearchField* search = CAknSearchField::NewL( *iContainer,
       
   810         CAknSearchField::ESearch, NULL, 10 );
       
   811     CleanupStack::PushL( search );
       
   812     CAknFilteredTextListBoxModel* model = 
       
   813         static_cast<CAknFilteredTextListBoxModel*>( celllist->Model() );
       
   814     model->CreateFilterL( celllist, search );
       
   815     model->Filter();
       
   816     model->RemoveFilter();
       
   817     CleanupStack::PopAndDestroy( search );
       
   818     CleanupStack::PopAndDestroy( celllist );
       
   819     
       
   820     return KErrNone;
       
   821     }
       
   822 
       
   823 
       
   824 // -----------------------------------------------------------------------------
       
   825 // CTestSDKUiFwUtil::TestFilterTextListBoxModelParaInfoL
       
   826 // -----------------------------------------------------------------------------
       
   827 //
       
   828 TInt CTestSDKUiFwUtil::TestFilterTextListBoxModelParaInfoL( CStifItemParser& /*aItem*/ )
       
   829     {
       
   830     CEikFormattedCellListBox* celllist = new ( ELeave ) CEikFormattedCellListBox;
       
   831     CleanupStack::PushL( celllist );
       
   832     celllist->SetContainerWindowL( * iContainer );
       
   833     
       
   834     TResourceReader reader;
       
   835     iEnv->CreateResourceReaderLC( reader, R_DOUBLE_LISTBOX );
       
   836     celllist->ConstructFromResourceL( reader );
       
   837     CleanupStack::PopAndDestroy();
       
   838     
       
   839     CAknFilteredTextListBoxModel* model = 
       
   840         static_cast<CAknFilteredTextListBoxModel*>( celllist->Model() );
       
   841     model->ItemText( 0 );
       
   842     model->NumberOfItems();
       
   843     model->MatchableTextArray();
       
   844     
       
   845     CleanupStack::PopAndDestroy( celllist );
       
   846     
       
   847     return KErrNone;
       
   848     }
       
   849 
       
   850 // -----------------------------------------------------------------------------
       
   851 // CTestSDKUiFwUtil::TestCAknListBoxFilterItemsConstructorL
       
   852 // -----------------------------------------------------------------------------
       
   853 //
       
   854 TInt CTestSDKUiFwUtil::TestCAknListBoxFilterItemsConstructorL( CStifItemParser& /*aItem*/ )
       
   855     {
       
   856     CEikFormattedCellListBox* celllist = new ( ELeave ) CEikFormattedCellListBox;
       
   857     CleanupStack::PushL( celllist );
       
   858     celllist->SetContainerWindowL( *iContainer );
       
   859     TResourceReader reader;
       
   860     iEnv->CreateResourceReaderLC( reader, R_DOUBLE_LISTBOX );
       
   861     celllist->ConstructFromResourceL( reader );
       
   862     CleanupStack::PopAndDestroy();
       
   863     
       
   864     CAknSearchField* search = CAknSearchField::NewL( *iContainer, 
       
   865             CAknSearchField::ESearch, NULL, KSearchFieldMaxLength );
       
   866     CleanupStack::PushL( search );
       
   867     
       
   868     CAknFilteredTextListBoxModel* model = 
       
   869             static_cast<CAknFilteredTextListBoxModel*>( celllist->Model() );
       
   870             
       
   871     CAknListBoxFilterItems* item = new( ELeave ) CAknListBoxFilterItems(
       
   872             celllist, search, model, celllist->View() );
       
   873     CleanupStack::PushL( item );
       
   874     
       
   875     STIF_ASSERT_NOT_NULL( item );
       
   876     
       
   877     CleanupStack::PopAndDestroy( 3 );
       
   878     return KErrNone;
       
   879     }
       
   880 
       
   881 
       
   882 
       
   883 // -----------------------------------------------------------------------------
       
   884 // CTestSDKUiFwUtil::TestCAknListBoxFilterItemsConstructL
       
   885 // -----------------------------------------------------------------------------
       
   886 //
       
   887 TInt CTestSDKUiFwUtil::TestCAknListBoxFilterItemsConstructL( CStifItemParser& /*aItem*/ )
       
   888     {
       
   889     CEikFormattedCellListBox* celllist = new ( ELeave ) CEikFormattedCellListBox;
       
   890     CleanupStack::PushL( celllist );
       
   891     celllist->SetContainerWindowL( * iContainer );
       
   892     TResourceReader reader;
       
   893     iEnv->CreateResourceReaderLC( reader, R_DOUBLE_LISTBOX );
       
   894     celllist->ConstructFromResourceL( reader );
       
   895     CleanupStack::PopAndDestroy();
       
   896     
       
   897     CAknSearchField* search = CAknSearchField::NewL( *iContainer, 
       
   898             CAknSearchField::ESearch, NULL, KSearchFieldMaxLength );
       
   899     CleanupStack::PushL( search );
       
   900     
       
   901     CAknFilteredTextListBoxModel* model = 
       
   902             static_cast<CAknFilteredTextListBoxModel*>( celllist->Model() );
       
   903             
       
   904     CAknListBoxFilterItems* item = new( ELeave ) CAknListBoxFilterItems(
       
   905             celllist, search, model, celllist->View() );
       
   906     CleanupStack::PushL( item );
       
   907     
       
   908     item->ConstructL();
       
   909     
       
   910     CleanupStack::PopAndDestroy( 3 );
       
   911     return KErrNone;
       
   912     }
       
   913 
       
   914 // -----------------------------------------------------------------------------
       
   915 // CTestSDKUiFwUtil::TestCAknListBoxFilterItemsResetFilteringL
       
   916 // -----------------------------------------------------------------------------
       
   917 //
       
   918 TInt CTestSDKUiFwUtil::TestCAknListBoxFilterItemsResetFilteringL( CStifItemParser& /*aItem*/ )
       
   919     {
       
   920     CEikFormattedCellListBox* celllist = new ( ELeave ) CEikFormattedCellListBox;
       
   921     CleanupStack::PushL( celllist );
       
   922     celllist->SetContainerWindowL( * iContainer );
       
   923     TResourceReader reader;
       
   924     iEnv->CreateResourceReaderLC( reader, R_DOUBLE_LISTBOX );
       
   925     celllist->ConstructFromResourceL( reader );
       
   926     CleanupStack::PopAndDestroy();
       
   927     
       
   928     CAknSearchField* search = CAknSearchField::NewL( *iContainer, 
       
   929             CAknSearchField::ESearch, NULL, KSearchFieldMaxLength );
       
   930     CleanupStack::PushL( search );
       
   931     
       
   932     CAknFilteredTextListBoxModel* model = 
       
   933             static_cast<CAknFilteredTextListBoxModel*>( celllist->Model() );
       
   934             
       
   935     CAknListBoxFilterItems* item = new( ELeave ) CAknListBoxFilterItems(
       
   936             celllist, search, model, celllist->View() );
       
   937     CleanupStack::PushL( item );
       
   938     item->ConstructL();
       
   939     item->ResetFilteringL();
       
   940     
       
   941     CleanupStack::PopAndDestroy( 3 );
       
   942     return KErrNone;
       
   943     }
       
   944 
       
   945 
       
   946 // -----------------------------------------------------------------------------
       
   947 // CTestSDKUiFwUtil::TestCAknListBoxFilterItemsUpdateCachedDataL
       
   948 // -----------------------------------------------------------------------------
       
   949 //
       
   950 TInt CTestSDKUiFwUtil::TestCAknListBoxFilterItemsUpdateCachedDataL( CStifItemParser& /*aItem*/ )
       
   951     {
       
   952     CEikFormattedCellListBox* celllist = new ( ELeave ) CEikFormattedCellListBox;
       
   953     CleanupStack::PushL( celllist );
       
   954     celllist->SetContainerWindowL( * iContainer );
       
   955     TResourceReader reader;
       
   956     iEnv->CreateResourceReaderLC( reader, R_DOUBLE_LISTBOX );
       
   957     celllist->ConstructFromResourceL( reader );
       
   958     CleanupStack::PopAndDestroy();
       
   959     
       
   960     CAknSearchField* search = CAknSearchField::NewL( *iContainer, 
       
   961             CAknSearchField::ESearch, NULL, KSearchFieldMaxLength );
       
   962     CleanupStack::PushL( search );
       
   963     
       
   964     CAknFilteredTextListBoxModel* model = 
       
   965             static_cast<CAknFilteredTextListBoxModel*>( celllist->Model() );
       
   966             
       
   967     CAknListBoxFilterItems* item = new( ELeave ) CAknListBoxFilterItems(
       
   968             celllist, search, model, celllist->View() );
       
   969     CleanupStack::PushL( item );
       
   970     item->ConstructL();
       
   971     item->UpdateCachedDataL();
       
   972     
       
   973     CleanupStack::PopAndDestroy( 3 );
       
   974     return KErrNone;
       
   975     }
       
   976 
       
   977 
       
   978 // -----------------------------------------------------------------------------
       
   979 // CTestSDKUiFwUtil::TestCAknListBoxFilterItemsProcessSelectionIndexL
       
   980 // -----------------------------------------------------------------------------
       
   981 //
       
   982 TInt CTestSDKUiFwUtil::TestCAknListBoxFilterItemsProcessSelectionIndexL( CStifItemParser& /*aItem*/ )
       
   983     {
       
   984     CEikFormattedCellListBox* celllist = new ( ELeave ) CEikFormattedCellListBox;
       
   985     CleanupStack::PushL( celllist );
       
   986     celllist->SetContainerWindowL( * iContainer );
       
   987     TResourceReader reader;
       
   988     iEnv->CreateResourceReaderLC( reader, R_DOUBLE_LISTBOX );
       
   989     celllist->ConstructFromResourceL( reader );
       
   990     CleanupStack::PopAndDestroy();
       
   991     
       
   992     CAknSearchField* search = CAknSearchField::NewL( *iContainer, 
       
   993             CAknSearchField::ESearch, NULL, KSearchFieldMaxLength );
       
   994     CleanupStack::PushL( search );
       
   995     
       
   996     CAknFilteredTextListBoxModel* model = 
       
   997             static_cast<CAknFilteredTextListBoxModel*>( celllist->Model() );
       
   998             
       
   999     CAknListBoxFilterItems* item = new( ELeave ) CAknListBoxFilterItems(
       
  1000             celllist, search, model, celllist->View() );
       
  1001     CleanupStack::PushL( item );
       
  1002     item->SetParentControl( iContainer );
       
  1003     item->ConstructL();
       
  1004     item->SelectionIndexes();
       
  1005     item->UpdateSelectionIndexesL();
       
  1006     item->UpdateSelectionIndexL( 0 );
       
  1007     
       
  1008     CleanupStack::PopAndDestroy( 3 );
       
  1009     return KErrNone;
       
  1010     }
       
  1011 
       
  1012 // -----------------------------------------------------------------------------
       
  1013 // CTestSDKUiFwUtil::TestCAknListBoxFilterItemsFilteredItemL
       
  1014 // -----------------------------------------------------------------------------
       
  1015 //
       
  1016 TInt CTestSDKUiFwUtil::TestCAknListBoxFilterItemsFilteredItemL( CStifItemParser& /*aItem*/ )
       
  1017     {
       
  1018     CEikFormattedCellListBox* celllist = new ( ELeave ) CEikFormattedCellListBox;
       
  1019     CleanupStack::PushL( celllist );
       
  1020     celllist->SetContainerWindowL( * iContainer );
       
  1021     TResourceReader reader;
       
  1022     iEnv->CreateResourceReaderLC( reader, R_DOUBLE_LISTBOX );
       
  1023     celllist->ConstructFromResourceL( reader );
       
  1024     CleanupStack::PopAndDestroy();
       
  1025     
       
  1026     CAknSearchField* search = CAknSearchField::NewL( *iContainer, 
       
  1027             CAknSearchField::ESearch, NULL, KSearchFieldMaxLength );
       
  1028     CleanupStack::PushL( search );
       
  1029     
       
  1030     CAknFilteredTextListBoxModel* model = 
       
  1031             static_cast<CAknFilteredTextListBoxModel*>( celllist->Model() );
       
  1032             
       
  1033     CAknListBoxFilterItems* item = new( ELeave ) CAknListBoxFilterItems(
       
  1034             celllist, search, model, celllist->View() );
       
  1035     CleanupStack::PushL( item );
       
  1036     item->SetParentControl( iContainer );
       
  1037     item->ConstructL();
       
  1038     item->FilteredNumberOfItems();
       
  1039     item->FilteredItemIndex( 0 );
       
  1040     item->NonFilteredNumberOfItems();
       
  1041     item->VisibleItemIndex( 0 );
       
  1042     TBufC<KBufSize> buf( KTextExample );
       
  1043     TPtrC ptrc( buf );
       
  1044     item->DefaultMatchableItemFromItem( ptrc );
       
  1045     CleanupStack::PopAndDestroy( 3 );
       
  1046     
       
  1047     return KErrNone;
       
  1048     }
       
  1049 
       
  1050 
       
  1051 // -----------------------------------------------------------------------------
       
  1052 // CTestSDKUiFwUtil::TestCAknListBoxFilterItemsHandleOfferkeyEventL
       
  1053 // -----------------------------------------------------------------------------
       
  1054 //
       
  1055 TInt CTestSDKUiFwUtil::TestCAknListBoxFilterItemsHandleOfferkeyEventL( CStifItemParser& /*aItem*/ )
       
  1056     {
       
  1057     CEikFormattedCellListBox* celllist = new ( ELeave ) CEikFormattedCellListBox;
       
  1058     CleanupStack::PushL( celllist );
       
  1059     celllist->SetContainerWindowL( * iContainer );
       
  1060     TResourceReader reader;
       
  1061     iEnv->CreateResourceReaderLC( reader, R_DOUBLE_LISTBOX );
       
  1062     celllist->ConstructFromResourceL( reader );
       
  1063     CleanupStack::PopAndDestroy();
       
  1064     
       
  1065     CAknSearchField* search = CAknSearchField::NewL( *iContainer, 
       
  1066             CAknSearchField::ESearch, NULL, KSearchFieldMaxLength );
       
  1067     CleanupStack::PushL( search );
       
  1068     
       
  1069     CAknFilteredTextListBoxModel* model = 
       
  1070             static_cast<CAknFilteredTextListBoxModel*>( celllist->Model() );
       
  1071             
       
  1072     CAknListBoxFilterItems* item = new( ELeave ) CAknListBoxFilterItems(
       
  1073             celllist, search, model, celllist->View() );
       
  1074     CleanupStack::PushL( item );
       
  1075     item->SetParentControl( iContainer );
       
  1076     item->ConstructL();
       
  1077     item->HandleOfferkeyEventL();
       
  1078     
       
  1079     CleanupStack::PopAndDestroy( 3 );
       
  1080     
       
  1081     return KErrNone;
       
  1082     }
       
  1083 
       
  1084 // -----------------------------------------------------------------------------
       
  1085 // CTestSDKUiFwUtil::TestCAknListBoxFilterItemsHandleItemArrayChangeL
       
  1086 // -----------------------------------------------------------------------------
       
  1087 //
       
  1088 TInt CTestSDKUiFwUtil::TestCAknListBoxFilterItemsHandleItemArrayChangeL( CStifItemParser& /*aItem*/ )
       
  1089     {
       
  1090     CEikFormattedCellListBox* celllist = new ( ELeave ) CEikFormattedCellListBox;
       
  1091     CleanupStack::PushL( celllist );
       
  1092     celllist->SetContainerWindowL( * iContainer );
       
  1093     TResourceReader reader;
       
  1094     iEnv->CreateResourceReaderLC( reader, R_DOUBLE_LISTBOX );
       
  1095     celllist->ConstructFromResourceL( reader );
       
  1096     CleanupStack::PopAndDestroy();
       
  1097     
       
  1098     CAknSearchField* search = CAknSearchField::NewL( *iContainer, 
       
  1099             CAknSearchField::ESearch, NULL, KSearchFieldMaxLength );
       
  1100     CleanupStack::PushL( search );
       
  1101     
       
  1102     CAknFilteredTextListBoxModel* model = 
       
  1103             static_cast<CAknFilteredTextListBoxModel*>( celllist->Model() );
       
  1104             
       
  1105     CAknListBoxFilterItems* item = new( ELeave ) CAknListBoxFilterItems(
       
  1106             celllist, search, model, celllist->View() );
       
  1107     CleanupStack::PushL( item );
       
  1108     item->SetParentControl( iContainer );
       
  1109     item->ConstructL();
       
  1110     item->HandleItemArrayChangeL();
       
  1111     
       
  1112     CleanupStack::PopAndDestroy( 3 );
       
  1113     
       
  1114     return KErrNone;
       
  1115     }
       
  1116 
       
  1117 // -----------------------------------------------------------------------------
       
  1118 // CTestSDKUiFwUtil::TestCAknListBoxFilterItemsDoObserverFuncL
       
  1119 // -----------------------------------------------------------------------------
       
  1120 //
       
  1121 TInt CTestSDKUiFwUtil::TestCAknListBoxFilterItemsDoObserverFuncL( CStifItemParser& /*aItem*/ )
       
  1122     {
       
  1123     CEikFormattedCellListBox* celllist = new ( ELeave ) CEikFormattedCellListBox;
       
  1124     CleanupStack::PushL( celllist );
       
  1125     celllist->SetContainerWindowL( * iContainer );
       
  1126     TResourceReader reader;
       
  1127     iEnv->CreateResourceReaderLC( reader, R_DOUBLE_LISTBOX );
       
  1128     celllist->ConstructFromResourceL( reader );
       
  1129     CleanupStack::PopAndDestroy();
       
  1130     
       
  1131     CAknSearchField* search = CAknSearchField::NewL( *iContainer, 
       
  1132             CAknSearchField::ESearch, NULL, KSearchFieldMaxLength );
       
  1133     CleanupStack::PushL( search );
       
  1134     
       
  1135     CAknFilteredTextListBoxModel* model = 
       
  1136             static_cast<CAknFilteredTextListBoxModel*>( celllist->Model() );
       
  1137             
       
  1138     CAknListBoxFilterItems* item = new( ELeave ) CAknListBoxFilterItems(
       
  1139             celllist, search, model, celllist->View() );
       
  1140     CleanupStack::PushL( item );
       
  1141     item->SetParentControl( iContainer );
       
  1142     item->ConstructL();
       
  1143     CControlObserver* ob = new ( ELeave ) CControlObserver;
       
  1144     CleanupStack::PushL( ob );
       
  1145     item->SetObserver( ob );
       
  1146     item->HandleControlEventL( celllist, MCoeControlObserver::EEventRequestCancel );
       
  1147     CleanupStack::PopAndDestroy( ob );
       
  1148     CleanupStack::PopAndDestroy( 3 );
       
  1149     
       
  1150     return KErrNone;
       
  1151     }
       
  1152 
       
  1153 
       
  1154 // -----------------------------------------------------------------------------
       
  1155 // CTestSDKUiFwUtil::TestCAknListBoxFilterItemsDoFuncFromFepL
       
  1156 // -----------------------------------------------------------------------------
       
  1157 //
       
  1158 TInt CTestSDKUiFwUtil::TestCAknListBoxFilterItemsDoFuncFromFepL( CStifItemParser& /*aItem*/ )
       
  1159     {
       
  1160     CEikFormattedCellListBox* celllist = new ( ELeave ) CEikFormattedCellListBox;
       
  1161     CleanupStack::PushL( celllist );
       
  1162     celllist->SetContainerWindowL( * iContainer );
       
  1163     
       
  1164     TResourceReader reader;
       
  1165     iEnv->CreateResourceReaderLC( reader, R_DOUBLE_LISTBOX );
       
  1166     celllist->ConstructFromResourceL( reader );
       
  1167     CleanupStack::PopAndDestroy();
       
  1168     
       
  1169     CAknSearchField* search = CAknSearchField::NewL( *iContainer, 
       
  1170             CAknSearchField::ESearch, NULL, KSearchFieldMaxLength );
       
  1171     CleanupStack::PushL( search );
       
  1172     
       
  1173     CAknFilteredTextListBoxModel* model = 
       
  1174             static_cast<CAknFilteredTextListBoxModel*>( celllist->Model() );
       
  1175             
       
  1176     CAknListBoxFilterItems* item = new( ELeave ) CAknListBoxFilterItems(
       
  1177             celllist, search, model, celllist->View() );
       
  1178     CleanupStack::PushL( item );
       
  1179     item->SetParentControl( iContainer );
       
  1180     item->ConstructL();
       
  1181     item->DeferredSendKeyEventToFepL( 0 );
       
  1182     CleanupStack::PopAndDestroy( 3 );
       
  1183     
       
  1184     return KErrNone;
       
  1185     }
       
  1186 
       
  1187 // -----------------------------------------------------------------------------
       
  1188 // CTestSDKUiFwUtil::TestCAknListBoxFilterItemsSetNewParaL
       
  1189 // -----------------------------------------------------------------------------
       
  1190 //
       
  1191 TInt CTestSDKUiFwUtil::TestCAknListBoxFilterItemsSetNewParaL( CStifItemParser& /*aItem*/ )
       
  1192     {
       
  1193     CEikFormattedCellListBox* celllist = new ( ELeave ) CEikFormattedCellListBox;
       
  1194     CleanupStack::PushL( celllist );
       
  1195     celllist->SetContainerWindowL( * iContainer );
       
  1196     
       
  1197     TResourceReader reader;
       
  1198     iEnv->CreateResourceReaderLC( reader, R_DOUBLE_LISTBOX );
       
  1199     celllist->ConstructFromResourceL( reader );
       
  1200     CleanupStack::PopAndDestroy();
       
  1201     
       
  1202     CAknSearchField* search = CAknSearchField::NewL( *iContainer, 
       
  1203             CAknSearchField::ESearch, NULL, KSearchFieldMaxLength );
       
  1204     CleanupStack::PushL( search );
       
  1205     
       
  1206     CAknFilteredTextListBoxModel* model = 
       
  1207             static_cast<CAknFilteredTextListBoxModel*>( celllist->Model() );
       
  1208             
       
  1209     CAknListBoxFilterItems* item = new( ELeave ) CAknListBoxFilterItems(
       
  1210             celllist, search, model, celllist->View() );
       
  1211     CleanupStack::PushL( item );
       
  1212     item->SetParentControl( iContainer );
       
  1213     item->ConstructL();
       
  1214     item->SetListBox( celllist );
       
  1215     item->SetSearchField( search );
       
  1216     item->SetModel( model );
       
  1217     item->SetView( celllist->View() );
       
  1218     CleanupStack::PopAndDestroy( 3 );
       
  1219     
       
  1220     return KErrNone;
       
  1221     }
       
  1222 
       
  1223 // -----------------------------------------------------------------------------
       
  1224 // CTestSDKUiFwUtil::TestCAknListBoxFilterItemsProcessControlL
       
  1225 // -----------------------------------------------------------------------------
       
  1226 //
       
  1227 TInt CTestSDKUiFwUtil::TestCAknListBoxFilterItemsProcessControlL( CStifItemParser& /*aItem*/ )
       
  1228     {
       
  1229     CEikFormattedCellListBox* celllist = new ( ELeave ) CEikFormattedCellListBox;
       
  1230     CleanupStack::PushL( celllist );
       
  1231     celllist->SetContainerWindowL( * iContainer );
       
  1232     
       
  1233     TResourceReader reader;
       
  1234     iEnv->CreateResourceReaderLC( reader, R_DOUBLE_LISTBOX );
       
  1235     celllist->ConstructFromResourceL( reader );
       
  1236     CleanupStack::PopAndDestroy();
       
  1237     
       
  1238     CAknSearchField* search = CAknSearchField::NewL( *iContainer, 
       
  1239             CAknSearchField::ESearch, NULL, KSearchFieldMaxLength );
       
  1240     CleanupStack::PushL( search );
       
  1241     
       
  1242     CAknFilteredTextListBoxModel* model = 
       
  1243             static_cast<CAknFilteredTextListBoxModel*>( celllist->Model() );
       
  1244             
       
  1245     CAknListBoxFilterItems* item = new( ELeave ) CAknListBoxFilterItems(
       
  1246             celllist, search, model, celllist->View() );
       
  1247     CleanupStack::PushL( item );
       
  1248     item->SetParentControl( iContainer );
       
  1249     item->ConstructL();
       
  1250     item->SetPopup();
       
  1251     item->FindBox();
       
  1252     CleanupStack::PopAndDestroy( 3 );
       
  1253     
       
  1254     return KErrNone;
       
  1255     }
       
  1256 
       
  1257 // -----------------------------------------------------------------------------
       
  1258 // CTestSDKUiFwUtil::TestAknLAFUtilsReplaceColumn
       
  1259 // -----------------------------------------------------------------------------
       
  1260 //
       
  1261 TInt CTestSDKUiFwUtil::TestAknLAFUtilsReplaceColumn( CStifItemParser& /*aItem*/ )
       
  1262     {
       
  1263     TBuf<KBufSize> bufsrc( KTextExample );
       
  1264     TBuf<KBufSize> bufdst( KTextExample );
       
  1265     TPtr ptr = bufdst.MidTPtr( 0 );
       
  1266     TChar ch( 'a' );
       
  1267     TInt column = 0;
       
  1268     AknLAFUtils::ReplaceColumn( ptr, &bufsrc, &bufdst, ch, column );
       
  1269     
       
  1270     return KErrNone;
       
  1271     }
       
  1272 
       
  1273 // -----------------------------------------------------------------------------
       
  1274 // CTestSDKUiFwUtil::TestCAknGenericReaderFuncsL
       
  1275 // -----------------------------------------------------------------------------
       
  1276 //
       
  1277 TInt CTestSDKUiFwUtil::TestCAknGenericReaderFuncsL( CStifItemParser& /*aItem*/ )
       
  1278     {
       
  1279     CAknGenericReader* reader = new ( ELeave ) CAknGenericReader;
       
  1280     CleanupStack::PushL( reader );
       
  1281     reader->ConstructL( R_CAKNGENERICREADER_RESOURCE );
       
  1282     CleanupStack::PopAndDestroy();
       
  1283     reader = NULL;
       
  1284     reader = new ( ELeave ) CAknGenericReader;
       
  1285     CleanupStack::PushL( reader );
       
  1286     TResourceReader resreader;
       
  1287     iEnv->CreateResourceReaderLC( resreader, R_CAKNGENERICREADER_RESOURCE );
       
  1288     reader->ConstructFromResourceL( resreader );
       
  1289     CleanupStack::PopAndDestroy();
       
  1290     reader->GfxItem( 0 );
       
  1291     reader->TextItem( 0 );
       
  1292     reader->CmdItem( 0 );
       
  1293     reader->AreaItem( 0 );
       
  1294     CleanupStack::PopAndDestroy();
       
  1295     
       
  1296     return KErrNone;
       
  1297     }
       
  1298 
       
  1299 // -----------------------------------------------------------------------------
       
  1300 // CTestSDKUiFwUtil::TestAknLayoutUtilsLayoutLabelL
       
  1301 // -----------------------------------------------------------------------------
       
  1302 //
       
  1303 TInt CTestSDKUiFwUtil::TestAknLayoutUtilsLayoutLabelL( CStifItemParser& /*aItem*/ )
       
  1304     {
       
  1305     CEikLabel* label  = new ( ELeave ) CEikLabel;
       
  1306     CleanupStack::PushL( label );
       
  1307     TRect rect( 20, 20, 40, 40 );
       
  1308     AknLayoutUtils::LayoutLabel( label, rect, R_AKNLAYOUTUTILS_LABEL );
       
  1309     CleanupStack::PopAndDestroy( label );
       
  1310     label = NULL;
       
  1311     
       
  1312     label  = new ( ELeave ) CEikLabel;
       
  1313     CleanupStack::PushL( label );
       
  1314     TResourceReader reader;
       
  1315     iEnv->CreateResourceReaderLC( reader, R_AKNLAYOUTUTILS_LABEL );
       
  1316     AknLayoutUtils::LayoutLabel( label, rect, reader );
       
  1317     CleanupStack::PopAndDestroy();
       
  1318     CleanupStack::PopAndDestroy( label );
       
  1319     label = NULL;
       
  1320     
       
  1321     label  = new ( ELeave ) CEikLabel;
       
  1322     CleanupStack::PushL( label );
       
  1323     AknLayoutUtils::SAknLayoutLabel labellayout = { ELatinBold12, 0, 1, 1, 1, 5, ELayoutAlignCenter, 1, 1 };
       
  1324     AknLayoutUtils::LayoutLabel( label, rect, labellayout );
       
  1325     CleanupStack::PopAndDestroy( label );
       
  1326     label = NULL;
       
  1327     
       
  1328     label  = new ( ELeave ) CEikLabel;
       
  1329     CleanupStack::PushL( label );
       
  1330     TAknMultiLineTextLayout multxtlayout;
       
  1331     multxtlayout.iC = 0;
       
  1332     multxtlayout.il = 1;
       
  1333     multxtlayout.ir = 1;
       
  1334     multxtlayout.iB = 1;
       
  1335     multxtlayout.iW = 5;
       
  1336     multxtlayout.iJ = ELayoutAlignCenter;
       
  1337     multxtlayout.iFont = ELatinBold12;
       
  1338     multxtlayout.iBaselineSkip = 0;
       
  1339     multxtlayout.iNumberOfLinesShown = 1;
       
  1340     AknLayoutUtils::LayoutLabel( label, rect, multxtlayout );
       
  1341     CleanupStack::PopAndDestroy( label );
       
  1342     label = NULL;
       
  1343     
       
  1344     label  = new ( ELeave ) CEikLabel;
       
  1345     CleanupStack::PushL( label );
       
  1346     TAknTextLineLayout txtlayout;
       
  1347     txtlayout.iC = 0;
       
  1348     txtlayout.il = 1;
       
  1349     txtlayout.ir = 1;
       
  1350     txtlayout.iB = 1;
       
  1351     txtlayout.iW = 5;
       
  1352     txtlayout.iJ = ELayoutAlignCenter;
       
  1353     txtlayout.iFont = ELatinBold12;
       
  1354     txtlayout.iBaselineSkip = 0;
       
  1355     txtlayout.iNumberOfLinesShown = 1;
       
  1356     AknLayoutUtils::LayoutLabel( label, rect, txtlayout );
       
  1357     CleanupStack::PopAndDestroy( label );
       
  1358     label = NULL;
       
  1359     
       
  1360     label  = new ( ELeave ) CEikLabel;
       
  1361     CleanupStack::PushL( label );
       
  1362     AknLayoutUtils::LayoutLabel( label, rect, ELatinBold12, 0, 1, 1, 1, 5, ELayoutAlignCenter );
       
  1363     CleanupStack::PopAndDestroy( label );
       
  1364     label = NULL;
       
  1365     
       
  1366     
       
  1367     return KErrNone;
       
  1368     }
       
  1369 
       
  1370 // -----------------------------------------------------------------------------
       
  1371 // CTestSDKUiFwUtil::TestAknLayoutUtilsLayoutEdwinL
       
  1372 // -----------------------------------------------------------------------------
       
  1373 //
       
  1374 TInt CTestSDKUiFwUtil::TestAknLayoutUtilsLayoutEdwinL( CStifItemParser& /*aItem*/ )
       
  1375     {
       
  1376     TBuf<KBufSize> buf( KTextExample );
       
  1377     TRect rect( 20, 20, 40, 40 );
       
  1378     CEikEdwin* edwin = new ( ELeave ) CEikEdwin;
       
  1379     CleanupStack::PushL( edwin );
       
  1380     edwin->ConstructL( 0, 5, 20, 1 );
       
  1381     edwin->SetTextL( &buf );
       
  1382     AknLayoutUtils::LayoutEdwin( edwin, rect, R_AKNLAYOUTUTILS_EDWIN );
       
  1383     CleanupStack::PopAndDestroy( edwin );
       
  1384     edwin = NULL;
       
  1385     
       
  1386     edwin = new ( ELeave ) CEikEdwin;
       
  1387     CleanupStack::PushL( edwin );
       
  1388     edwin->ConstructL( 0, 5, 20, 1 );
       
  1389     edwin->SetTextL( &buf );
       
  1390     TResourceReader reader;
       
  1391     iEnv->CreateResourceReaderLC( reader, R_AKNLAYOUTUTILS_EDWIN );
       
  1392     AknLayoutUtils::LayoutEdwin( edwin, rect, reader );
       
  1393     CleanupStack::PopAndDestroy();
       
  1394     CleanupStack::PopAndDestroy( edwin );
       
  1395     edwin = NULL;
       
  1396     
       
  1397     edwin = new ( ELeave ) CEikEdwin;
       
  1398     CleanupStack::PushL( edwin );
       
  1399     edwin->ConstructL( 0, 5, 20, 1 );
       
  1400     edwin->SetTextL( &buf );
       
  1401     AknLayoutUtils::SAknLayoutEdwin edwinLayout = { ELatinBold12, 0, 5, 5, 5, 100, ELayoutAlignLeft, 1, 25 };
       
  1402     AknLayoutUtils::LayoutEdwin( edwin, rect, edwinLayout );
       
  1403     CleanupStack::PopAndDestroy( edwin );
       
  1404     edwin = NULL;
       
  1405     
       
  1406     edwin = new ( ELeave ) CEikEdwin;
       
  1407     CleanupStack::PushL( edwin );
       
  1408     edwin->ConstructL( 0, 5, 20, 1 );
       
  1409     edwin->SetTextL( &buf );
       
  1410     TAknMultiLineTextLayout multxtlayout;
       
  1411     multxtlayout.iC = 0;
       
  1412     multxtlayout.il = 1;
       
  1413     multxtlayout.ir = 1;
       
  1414     multxtlayout.iB = 1;
       
  1415     multxtlayout.iW = 5;
       
  1416     multxtlayout.iJ = ELayoutAlignCenter;
       
  1417     multxtlayout.iFont = ELatinBold12;
       
  1418     multxtlayout.iBaselineSkip = 0;
       
  1419     multxtlayout.iNumberOfLinesShown = 1;
       
  1420     AknLayoutUtils::LayoutEdwin( edwin, rect, multxtlayout );
       
  1421     CleanupStack::PopAndDestroy( edwin );
       
  1422     edwin = NULL;
       
  1423     
       
  1424     edwin = new ( ELeave ) CEikEdwin;
       
  1425     CleanupStack::PushL( edwin );
       
  1426     edwin->ConstructL( 0, 5, 20, 1 );
       
  1427     edwin->SetTextL( &buf );
       
  1428     AknLayoutUtils::LayoutEdwin( edwin, rect, multxtlayout, EAknsCIQsnTextColorsCG1 );
       
  1429     CleanupStack::PopAndDestroy( edwin );
       
  1430     edwin = NULL;
       
  1431     
       
  1432     edwin = new ( ELeave ) CEikEdwin;
       
  1433     CleanupStack::PushL( edwin );
       
  1434     edwin->ConstructL( 0, 5, 20, 1 );
       
  1435     edwin->SetTextL( &buf );
       
  1436     TAknTextLineLayout txtlayout;
       
  1437     txtlayout.iC = 0;
       
  1438     txtlayout.il = 1;
       
  1439     txtlayout.ir = 1;
       
  1440     txtlayout.iB = 1;
       
  1441     txtlayout.iW = 5;
       
  1442     txtlayout.iJ = ELayoutAlignCenter;
       
  1443     txtlayout.iFont = ELatinBold12;
       
  1444     txtlayout.iBaselineSkip = 0;
       
  1445     txtlayout.iNumberOfLinesShown = 1;
       
  1446     AknLayoutUtils::LayoutEdwin( edwin, rect, txtlayout );
       
  1447     CleanupStack::PopAndDestroy( edwin );
       
  1448     edwin = NULL;
       
  1449     
       
  1450     edwin = new ( ELeave ) CEikEdwin;
       
  1451     CleanupStack::PushL( edwin );
       
  1452     edwin->ConstructL( 0, 5, 20, 1 );
       
  1453     edwin->SetTextL( &buf );
       
  1454     AknLayoutUtils::LayoutEdwin( edwin, rect, txtlayout, EAknsCIQsnTextColorsCG1 );
       
  1455     CleanupStack::PopAndDestroy( edwin );
       
  1456     edwin = NULL;
       
  1457     
       
  1458     edwin = new ( ELeave ) CEikEdwin;
       
  1459     CleanupStack::PushL( edwin );
       
  1460     edwin->ConstructL( 0, 5, 20, 1 );
       
  1461     edwin->SetTextL( &buf );
       
  1462     TInt numofvisibleline = 1;
       
  1463     AknLayoutUtils::LayoutEdwin( edwin, rect, txtlayout, 1, 1, EAknsCIQsnTextColorsCG1, numofvisibleline );
       
  1464     CleanupStack::PopAndDestroy( edwin );
       
  1465     edwin = NULL;
       
  1466     
       
  1467     edwin = new ( ELeave ) CEikEdwin;
       
  1468     CleanupStack::PushL( edwin );
       
  1469     edwin->ConstructL( 0, 5, 20, 1 );
       
  1470     edwin->SetTextL( &buf);
       
  1471     AknLayoutUtils::LayoutEdwin( edwin, rect, ELatinBold12, 0, 5, 5, 5, 100, ELayoutAlignLeft, 1, 25 );
       
  1472     CleanupStack::PopAndDestroy( edwin );
       
  1473     edwin = NULL;
       
  1474     
       
  1475     edwin = new ( ELeave ) CEikEdwin;
       
  1476     CleanupStack::PushL( edwin );
       
  1477     edwin->ConstructL( 0, 5, 20, 1 );
       
  1478     edwin->SetTextL( &buf );
       
  1479     
       
  1480     AknLayoutUtils::LayoutEdwin( edwin, rect, ELatinBold12, 0, 5, 5, 5, 100, ELayoutAlignLeft, 1, 25, EAknsCIQsnTextColorsCG1 );
       
  1481     CleanupStack::PopAndDestroy( edwin );
       
  1482     
       
  1483     return KErrNone;
       
  1484     }
       
  1485 
       
  1486 // -----------------------------------------------------------------------------
       
  1487 // CTestSDKUiFwUtil::TestAknLayoutUtilsMinimizedEdwinRectL
       
  1488 // -----------------------------------------------------------------------------
       
  1489 //
       
  1490 TInt CTestSDKUiFwUtil::TestAknLayoutUtilsMinimizedEdwinRectL( CStifItemParser& /*aItem*/ )
       
  1491     {
       
  1492     TBuf<KBufSize> buf( KTextExample );
       
  1493     CEikEdwin* edwin = new ( ELeave ) CEikEdwin;
       
  1494     CleanupStack::PushL( edwin );
       
  1495     edwin->ConstructL( 0, 5, 20, 1 );
       
  1496     edwin->SetTextL( &buf );
       
  1497     AknLayoutUtils::MinimizedEdwinRect( edwin );
       
  1498     CleanupStack::PopAndDestroy( edwin );
       
  1499     
       
  1500     return KErrNone;
       
  1501     }
       
  1502     
       
  1503 
       
  1504 // -----------------------------------------------------------------------------
       
  1505 // CTestSDKUiFwUtil::TestAknLayoutUtilsLayoutMfneL
       
  1506 // -----------------------------------------------------------------------------
       
  1507 //
       
  1508 TInt CTestSDKUiFwUtil::TestAknLayoutUtilsLayoutMfneL( CStifItemParser& /*aItem*/ )
       
  1509     {
       
  1510     TRect rect( 20, 20, 40, 40 );
       
  1511     CEikNumberEditor* mfne = new( ELeave ) CEikNumberEditor();
       
  1512     CleanupStack::PushL( mfne );
       
  1513     mfne->ConstructL( 0, 1000, 100 );
       
  1514     AknLayoutUtils::LayoutMfne( mfne, rect, R_CEIKMFNE_LAYOUT );
       
  1515     CleanupStack::PopAndDestroy( mfne );
       
  1516     mfne = NULL;
       
  1517     
       
  1518     mfne = new( ELeave ) CEikNumberEditor();
       
  1519     CleanupStack::PushL( mfne );
       
  1520     TResourceReader reader;
       
  1521     iEnv->CreateResourceReaderLC( reader, R_AKNLAYOUTUTILS_NUMBEREDWIN );
       
  1522     mfne->ConstructFromResourceL( reader );
       
  1523     CleanupStack::PopAndDestroy();
       
  1524     iEnv->CreateResourceReaderLC( reader, R_CEIKMFNE_LAYOUT );
       
  1525     AknLayoutUtils::LayoutMfne( mfne, rect, reader );
       
  1526     CleanupStack::PopAndDestroy();
       
  1527     CleanupStack::PopAndDestroy( mfne );
       
  1528     mfne = NULL;
       
  1529     
       
  1530     mfne = new( ELeave ) CEikNumberEditor();
       
  1531     CleanupStack::PushL( mfne );
       
  1532     mfne->ConstructL( 0, 1000, 100 );
       
  1533     AknLayoutUtils::SAknLayoutMfne mfneLayout;
       
  1534     mfneLayout.iFont = ELatinPlain12;
       
  1535     mfneLayout.iC = 0;
       
  1536     mfneLayout.iL = 5;
       
  1537     mfneLayout.iR = 5;
       
  1538     mfneLayout.iB = 5;
       
  1539     mfneLayout.iW = 100;
       
  1540     mfneLayout.iJ = ELayoutAlignLeft;
       
  1541     AknLayoutUtils::LayoutMfne( mfne, rect, mfneLayout );
       
  1542     CleanupStack::PopAndDestroy( mfne );
       
  1543     mfne = NULL;
       
  1544     
       
  1545     mfne = new( ELeave ) CEikNumberEditor();
       
  1546     CleanupStack::PushL( mfne );
       
  1547     mfne->ConstructL( 0, 1000, 100 );
       
  1548     TAknTextLineLayout txtlayout;
       
  1549     txtlayout.iC = 0;
       
  1550     txtlayout.il = 1;
       
  1551     txtlayout.ir = 1;
       
  1552     txtlayout.iB = 1;
       
  1553     txtlayout.iW = 5;
       
  1554     txtlayout.iJ = ELayoutAlignCenter;
       
  1555     txtlayout.iFont = ELatinBold12;
       
  1556     txtlayout.iBaselineSkip = 0;
       
  1557     txtlayout.iNumberOfLinesShown = 1;
       
  1558     AknLayoutUtils::LayoutMfne( mfne, rect, txtlayout );
       
  1559     CleanupStack::PopAndDestroy( mfne );
       
  1560     mfne = NULL;
       
  1561     
       
  1562     mfne = new( ELeave ) CEikNumberEditor();
       
  1563     CleanupStack::PushL( mfne );
       
  1564     mfne->ConstructL( 0, 1000, 100 );
       
  1565     AknLayoutUtils::LayoutMfne( mfne, rect, ELatinBold12, 0, 1, 1, 1, 5, ELayoutAlignCenter );
       
  1566     CleanupStack::PopAndDestroy( mfne );
       
  1567     mfne = NULL;
       
  1568 
       
  1569     return KErrNone;
       
  1570     }
       
  1571 
       
  1572 
       
  1573 // -----------------------------------------------------------------------------
       
  1574 // CTestSDKUiFwUtil::TestAknLayoutUtilsLayoutControlL
       
  1575 // -----------------------------------------------------------------------------
       
  1576 //
       
  1577 TInt CTestSDKUiFwUtil::TestAknLayoutUtilsLayoutControlL( CStifItemParser& /*aItem*/ )
       
  1578     {
       
  1579     TRect rect( 20, 20, 40, 40 );
       
  1580     CEikNumberEditor* mfne = new( ELeave ) CEikNumberEditor();
       
  1581     CleanupStack::PushL( mfne );
       
  1582     mfne->ConstructL( 0, 1000, 100 );
       
  1583     AknLayoutUtils::LayoutControl( mfne, rect, R_CEIKMFNE_LAYOUT );
       
  1584     CleanupStack::PopAndDestroy( mfne );
       
  1585     mfne = NULL;
       
  1586     
       
  1587     mfne = new( ELeave ) CEikNumberEditor();
       
  1588     CleanupStack::PushL( mfne );
       
  1589     mfne->ConstructL( 0, 1000, 100 );
       
  1590     TResourceReader reader;
       
  1591     iEnv->CreateResourceReaderLC( reader, R_CEIKMFNE_LAYOUT );
       
  1592     AknLayoutUtils::LayoutControl( mfne, rect, reader );
       
  1593     CleanupStack::PopAndDestroy();
       
  1594     CleanupStack::PopAndDestroy( mfne );
       
  1595     mfne = NULL;
       
  1596     
       
  1597     mfne = new( ELeave ) CEikNumberEditor();
       
  1598     CleanupStack::PushL( mfne );
       
  1599     mfne->ConstructL( 0, 1000, 100 );
       
  1600     AknLayoutUtils::SAknLayoutRect layoutrect;
       
  1601     layoutrect.iC = 0;
       
  1602     layoutrect.iL = 5;
       
  1603     layoutrect.iT = 5;
       
  1604     layoutrect.iR = 65;
       
  1605     layoutrect.iB = 35;
       
  1606     layoutrect.iW = 60;
       
  1607     layoutrect.iH = 30;
       
  1608     AknLayoutUtils::LayoutControl( mfne, rect, layoutrect );
       
  1609     CleanupStack::PopAndDestroy( mfne );
       
  1610     mfne = NULL;
       
  1611     
       
  1612     mfne = new( ELeave ) CEikNumberEditor();
       
  1613     CleanupStack::PushL( mfne );
       
  1614     mfne->ConstructL( 0, 1000, 100 );
       
  1615     TAknWindowLineLayout windowlinelayout;
       
  1616     windowlinelayout.iC = 2;
       
  1617     windowlinelayout.il = 1;
       
  1618     windowlinelayout.ir = 1;
       
  1619     windowlinelayout.ib = 1;
       
  1620     windowlinelayout.iW = 5;
       
  1621     windowlinelayout.iH = 5;
       
  1622     AknLayoutUtils::LayoutControl( mfne, rect, windowlinelayout );
       
  1623     CleanupStack::PopAndDestroy( mfne );
       
  1624     mfne = NULL;
       
  1625     
       
  1626     mfne = new( ELeave ) CEikNumberEditor();
       
  1627     CleanupStack::PushL( mfne );
       
  1628     mfne->ConstructL( 0, 1000, 100 );
       
  1629     AknLayoutUtils::LayoutMfne( mfne, rect, 1, 2, 1, 1, 1, 5, 5 );
       
  1630     CleanupStack::PopAndDestroy( mfne );
       
  1631     mfne = NULL;
       
  1632 
       
  1633     return KErrNone;
       
  1634     }
       
  1635 
       
  1636 // -----------------------------------------------------------------------------
       
  1637 // CTestSDKUiFwUtil::TestAknLayoutUtilsLayoutImageL
       
  1638 // -----------------------------------------------------------------------------
       
  1639 //
       
  1640 TInt CTestSDKUiFwUtil::TestAknLayoutUtilsLayoutImageL( CStifItemParser& /*aItem*/ )
       
  1641     {
       
  1642     TRect rect( 20, 20, 40, 40 );
       
  1643     CEikImage* image = new ( ELeave ) CEikImage;
       
  1644     CleanupStack::PushL( image );
       
  1645     AknLayoutUtils::LayoutImage( image, rect, R_AKNLAYOUTUTILS_IMAGE );
       
  1646     CleanupStack::PopAndDestroy( image );
       
  1647     image = NULL;
       
  1648     
       
  1649     image = new ( ELeave ) CEikImage;
       
  1650     CleanupStack::PushL( image );
       
  1651     TResourceReader reader;
       
  1652     iEnv->CreateResourceReaderLC( reader, R_AKNLAYOUTUTILS_IMAGE );
       
  1653     AknLayoutUtils::LayoutImage( image, rect, reader );
       
  1654     CleanupStack::PopAndDestroy();
       
  1655     CleanupStack::PopAndDestroy( image );
       
  1656     image = NULL;
       
  1657     
       
  1658     image = new ( ELeave ) CEikImage;
       
  1659     CleanupStack::PushL( image );
       
  1660     
       
  1661     AknLayoutUtils::SAknLayoutRect layoutrect;
       
  1662     layoutrect.iC = 0;
       
  1663     layoutrect.iL = 5;
       
  1664     layoutrect.iT = 5;
       
  1665     layoutrect.iR = 10;
       
  1666     layoutrect.iB = 15;
       
  1667     layoutrect.iW = 15;
       
  1668     layoutrect.iH = 12;
       
  1669     AknLayoutUtils::LayoutImage( image, rect, layoutrect );
       
  1670     CleanupStack::PopAndDestroy( image );
       
  1671     image = NULL;
       
  1672     
       
  1673     image = new ( ELeave ) CEikImage;
       
  1674     CleanupStack::PushL( image );
       
  1675     TAknWindowLineLayout windowlinelayout;
       
  1676     windowlinelayout.iC = 2;
       
  1677     windowlinelayout.il = 1;
       
  1678     windowlinelayout.ir = 1;
       
  1679     windowlinelayout.ib = 1;
       
  1680     windowlinelayout.iW = 5;
       
  1681     windowlinelayout.iH = 5;
       
  1682     AknLayoutUtils::LayoutImage( image, rect, windowlinelayout );
       
  1683     CleanupStack::PopAndDestroy( image );
       
  1684     image = NULL;
       
  1685     
       
  1686     image = new ( ELeave ) CEikImage;
       
  1687     CleanupStack::PushL( image );
       
  1688     AknLayoutUtils::LayoutImage( image, rect, 1, 2, 1, 1, 1, 5, 5 );
       
  1689     CleanupStack::PopAndDestroy( image );
       
  1690     return KErrNone;
       
  1691     }
       
  1692 
       
  1693 
       
  1694 // -----------------------------------------------------------------------------
       
  1695 // CTestSDKUiFwUtil::TestAknLayoutUtilsLayoutSecretEditorL
       
  1696 // -----------------------------------------------------------------------------
       
  1697 //
       
  1698 TInt CTestSDKUiFwUtil::TestAknLayoutUtilsLayoutSecretEditorL( CStifItemParser& /*aItem*/ )
       
  1699     {
       
  1700     TRect rect( 20, 20, 40, 40 );
       
  1701     CEikSecretEditor* secretedwin = new ( ELeave ) CEikSecretEditor;
       
  1702     CleanupStack::PushL( secretedwin );
       
  1703     TResourceReader reader;
       
  1704     iEnv->CreateResourceReaderLC( reader, R_AKNLAYOUTUTILS_SECRETEDITOR );
       
  1705     secretedwin->ConstructFromResourceL( reader );
       
  1706     CleanupStack::PopAndDestroy();
       
  1707     AknLayoutUtils::SAknLayoutText layouttext = { ELatinBold12, 0, 5, 5, 10, 10, 20 };
       
  1708     AknLayoutUtils::LayoutSecretEditor( secretedwin, rect, layouttext );
       
  1709     CleanupStack::PopAndDestroy( secretedwin );
       
  1710     secretedwin = NULL;
       
  1711     
       
  1712     secretedwin = new ( ELeave ) CEikSecretEditor;
       
  1713     CleanupStack::PushL( secretedwin );
       
  1714     iEnv->CreateResourceReaderLC( reader, R_AKNLAYOUTUTILS_SECRETEDITOR );
       
  1715     secretedwin->ConstructFromResourceL( reader );
       
  1716     CleanupStack::PopAndDestroy();
       
  1717     TAknTextLineLayout txtlayout;
       
  1718     txtlayout.iC = 0;
       
  1719     txtlayout.il = 1;
       
  1720     txtlayout.ir = 1;
       
  1721     txtlayout.iB = 1;
       
  1722     txtlayout.iW = 5;
       
  1723     txtlayout.iJ = ELayoutAlignCenter;
       
  1724     txtlayout.iFont = ELatinBold12;
       
  1725     txtlayout.iBaselineSkip = 0;
       
  1726     txtlayout.iNumberOfLinesShown = 1;
       
  1727     AknLayoutUtils::LayoutSecretEditor( secretedwin, rect, txtlayout );
       
  1728     CleanupStack::PopAndDestroy( secretedwin );
       
  1729     
       
  1730     return KErrNone;
       
  1731     }
       
  1732 
       
  1733 // -----------------------------------------------------------------------------
       
  1734 // CTestSDKUiFwUtil::TestAknLayoutUtilsRectFromCoords
       
  1735 // -----------------------------------------------------------------------------
       
  1736 //
       
  1737 TInt CTestSDKUiFwUtil::TestAknLayoutUtilsRectFromCoords( CStifItemParser& /*aItem*/ )
       
  1738     {
       
  1739     TRect rect( 20, 20, 40, 40 );
       
  1740     const CFont* font = iEnv->NormalFont();
       
  1741     AknLayoutUtils::TextRectFromCoords( rect, font, 5, 5, 10, 10, 1 );
       
  1742     AknLayoutUtils::RectFromCoords( rect, 5, 5, 10, 10, 10, 10 );
       
  1743     return KErrNone;
       
  1744     }
       
  1745 
       
  1746 
       
  1747 // -----------------------------------------------------------------------------
       
  1748 // CTestSDKUiFwUtil::TestAknLayoutUtilsFontFromId
       
  1749 // -----------------------------------------------------------------------------
       
  1750 //
       
  1751 TInt CTestSDKUiFwUtil::TestAknLayoutUtilsFontFromId( CStifItemParser& /*aItem*/ )
       
  1752     {
       
  1753     AknLayoutUtils::FontFromId( 0 );
       
  1754     AknLayoutUtils::LayoutFontFromId( 0 );
       
  1755     return KErrNone;
       
  1756     }
       
  1757 
       
  1758 // -----------------------------------------------------------------------------
       
  1759 // CTestSDKUiFwUtil::TestAknLayoutUtilsCreateLayoutFontFromSpecificationL
       
  1760 // -----------------------------------------------------------------------------
       
  1761 //
       
  1762 TInt CTestSDKUiFwUtil::TestAknLayoutUtilsCreateLayoutFontFromSpecificationL( CStifItemParser& /*aItem*/ )
       
  1763     {
       
  1764     TAknFontSpecification specialfont( 0 );
       
  1765     AknLayoutUtils::CreateLayoutFontFromSpecificationL( specialfont );
       
  1766     TTypeface type;
       
  1767     type.SetAttributes( 0 );
       
  1768     type.SetIsProportional( ETrue );
       
  1769     type.SetIsSerif( ETrue );
       
  1770     type.SetScriptTypeForMetrics( 0 );
       
  1771     AknLayoutUtils::CreateLayoutFontFromSpecificationL( type, specialfont );
       
  1772     return KErrNone;
       
  1773     }
       
  1774 
       
  1775 // -----------------------------------------------------------------------------
       
  1776 // CTestSDKUiFwUtil::TestAknLayoutUtilsSomeSimpleFunc
       
  1777 // -----------------------------------------------------------------------------
       
  1778 //
       
  1779 TInt CTestSDKUiFwUtil::TestAknLayoutUtilsSomeSimpleFunc( CStifItemParser& /*aItem*/ )
       
  1780     {
       
  1781     _LIT(KLatinPlain12,"LatinPlain12");
       
  1782     AknLayoutUtils::FontFromName( KLatinPlain12 );
       
  1783     AknLayoutUtils::TextAlignFromId( 0 );
       
  1784     AknLayoutUtils::GulAlignFromId( 0 );
       
  1785     TTypeface type;
       
  1786     type.SetAttributes( 0 );
       
  1787     type.SetIsProportional( ETrue );
       
  1788     type.SetIsSerif( ETrue );
       
  1789     type.SetScriptTypeForMetrics( 0 );
       
  1790     TFontSpec fonspec( KLatinPlain12, 5 );
       
  1791     fonspec.iTypeface = type;
       
  1792     AknLayoutUtils::CursorHeightFromFont( fonspec );
       
  1793     AknLayoutUtils::CursorWidthFromFont( fonspec );
       
  1794     AknLayoutUtils::CursorAscentFromFont( fonspec );
       
  1795     TInt firstex = 1;
       
  1796     TInt secondex = 1;
       
  1797     AknLayoutUtils::CursorExtensionsFromFont( fonspec, firstex, secondex );
       
  1798     AknLayoutUtils::HighlightLeftPixelsFromFont( fonspec );
       
  1799     AknLayoutUtils::HighlightRightPixelsFromFont( fonspec );
       
  1800     AknLayoutUtils::LayoutMirrored();
       
  1801     AknLayoutUtils::Variant();
       
  1802     AknLayoutUtils::SubVariant();
       
  1803     
       
  1804     return KErrNone;
       
  1805     }
       
  1806 
       
  1807 // -----------------------------------------------------------------------------
       
  1808 // CTestSDKUiFwUtil::TestAknLayoutUtilsOverrideControlColorL
       
  1809 // -----------------------------------------------------------------------------
       
  1810 //
       
  1811 TInt CTestSDKUiFwUtil::TestAknLayoutUtilsOverrideControlColorL( CStifItemParser& /*aItem*/ )
       
  1812     {
       
  1813     TBuf<KBufSize> buf( KTextExample );
       
  1814     CEikEdwin* edwin = new ( ELeave ) CEikEdwin;
       
  1815     CleanupStack::PushL( edwin );
       
  1816     TResourceReader reader;
       
  1817     iEnv->CreateResourceReaderLC( reader, R_AKNLAYOUTUTILS_EDWIN );
       
  1818     edwin->ConstructFromResourceL( reader );
       
  1819     CleanupStack::PopAndDestroy();
       
  1820     edwin->SetTextL( &buf );
       
  1821     AknLayoutUtils::OverrideControlColorL( *edwin, EColorWindowBackground, KRgbBlue );
       
  1822     CleanupStack::PopAndDestroy( edwin );
       
  1823     return KErrNone;
       
  1824     }
       
  1825 
       
  1826 // -----------------------------------------------------------------------------
       
  1827 // CTestSDKUiFwUtil::TestAknLayoutUtilsScrollBarTypeL
       
  1828 // -----------------------------------------------------------------------------
       
  1829 //
       
  1830 TInt CTestSDKUiFwUtil::TestAknLayoutUtilsScrollBarTypeL( CStifItemParser& /*aItem*/ )
       
  1831     {
       
  1832     TAknWindowLineLayout windowlinelayout;
       
  1833     windowlinelayout.iC = 2;
       
  1834     windowlinelayout.il = 1;
       
  1835     windowlinelayout.ir = 1;
       
  1836     windowlinelayout.ib = 1;
       
  1837     windowlinelayout.iW = 5;
       
  1838     windowlinelayout.iH = 5;
       
  1839     CAknAppUiBase* uibase = new ( ELeave ) CAknAppUiBase;
       
  1840     CleanupStack::PushL( uibase );
       
  1841     uibase->BaseConstructL( CEikAppUi::ENoAppResourceFile );
       
  1842     AknLayoutUtils::DefaultScrollBarType( uibase );
       
  1843     CScrollBarObserver* ob = new ( ELeave ) CScrollBarObserver;
       
  1844     CleanupStack::PushL( ob );
       
  1845     CEikScrollBarFrame* scrollbar = new ( ELeave ) CEikScrollBarFrame( iContainer, ob );
       
  1846     AknLayoutUtils::LayoutVerticalScrollBar( scrollbar, iContainer->ControlRect(), windowlinelayout );
       
  1847     AknLayoutUtils::LayoutHorizontalScrollBar( scrollbar, iContainer->ControlRect(), windowlinelayout );
       
  1848     CleanupStack::PopAndDestroy( ob );
       
  1849     CleanupStack::PopAndDestroy( uibase );
       
  1850     return KErrNone;
       
  1851     }
       
  1852 
       
  1853 // -----------------------------------------------------------------------------
       
  1854 // CTestSDKUiFwUtil::TestAknLayoutUtilsLayoutMetrics
       
  1855 // -----------------------------------------------------------------------------
       
  1856 //
       
  1857 TInt CTestSDKUiFwUtil::TestAknLayoutUtilsLayoutMetrics( CStifItemParser& /*aItem*/ )
       
  1858     {
       
  1859     TRect rect;
       
  1860     TSize size;
       
  1861     TPoint point;
       
  1862     AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EMainPane, rect );
       
  1863     AknLayoutUtils::LayoutMetricsSize( AknLayoutUtils::EMainPane, size );
       
  1864     AknLayoutUtils::LayoutMetricsPosition( AknLayoutUtils::EMainPane, point );
       
  1865     return KErrNone;
       
  1866     }
       
  1867 
       
  1868 // -----------------------------------------------------------------------------
       
  1869 // CTestSDKUiFwUtil::TestAknLayoutUtilsScalableLayoutInterfaceAvailable
       
  1870 // -----------------------------------------------------------------------------
       
  1871 //
       
  1872 TInt CTestSDKUiFwUtil::TestAknLayoutUtilsScalableLayoutInterfaceAvailable( CStifItemParser& /*aItem*/ )
       
  1873     {
       
  1874     AknLayoutUtils::ScalableLayoutInterfaceAvailable();
       
  1875     return KErrNone;
       
  1876     }
       
  1877 
       
  1878 
       
  1879 // -----------------------------------------------------------------------------
       
  1880 // CTestSDKUiFwUtil::TestAknLayoutUtilsSimpleFunc
       
  1881 // -----------------------------------------------------------------------------
       
  1882 //
       
  1883 TInt CTestSDKUiFwUtil::TestAknLayoutUtilsSimpleFunc( CStifItemParser& /*aItem*/ )
       
  1884     {
       
  1885     AknLayoutUtils::CbaLocation();
       
  1886     AknLayoutUtils::MainPaneState();
       
  1887     AknLayoutUtils::PenEnabled();
       
  1888     AknLayoutUtils::MSKEnabled();
       
  1889     return KErrNone;
       
  1890     }
       
  1891 
       
  1892 // -----------------------------------------------------------------------------
       
  1893 // CTestSDKUiFwUtil::TestAknLayoutUtilsEdwinLine
       
  1894 // -----------------------------------------------------------------------------
       
  1895 //
       
  1896 TInt CTestSDKUiFwUtil::TestAknLayoutUtilsEdwinLine( CStifItemParser& /*aItem*/ )
       
  1897     {
       
  1898     TInt vertical = 5;
       
  1899     TInt edwinheight = 10;
       
  1900     TAknTextLineLayout txtlayout;
       
  1901     txtlayout.iC = 0;
       
  1902     txtlayout.il = 1;
       
  1903     txtlayout.ir = 1;
       
  1904     txtlayout.iB = 1;
       
  1905     txtlayout.iW = 5;
       
  1906     txtlayout.iJ = ELayoutAlignCenter;
       
  1907     txtlayout.iFont = ELatinBold12;
       
  1908     txtlayout.iBaselineSkip = 0;
       
  1909     txtlayout.iNumberOfLinesShown = 1;
       
  1910     AknLayoutUtils::GetEdwinVerticalPositionAndHeightFromLines( 20, txtlayout, 1, 1, vertical, edwinheight );
       
  1911     AknLayoutUtils::EdwinLinesWithinHeight( txtlayout, 1, 20, edwinheight );
       
  1912     
       
  1913     return KErrNone;
       
  1914     }
       
  1915 
       
  1916 
       
  1917 // -----------------------------------------------------------------------------
       
  1918 // CTestSDKUiFwUtil::TestTAknLayoutTextConstructorL
       
  1919 // -----------------------------------------------------------------------------
       
  1920 //
       
  1921 TInt CTestSDKUiFwUtil::TestTAknLayoutTextConstructorL( CStifItemParser& /*aItem*/ )
       
  1922     {
       
  1923     TAknLayoutText* txt  = new ( ELeave ) TAknLayoutText;
       
  1924     CleanupStack::PushL( txt );
       
  1925     STIF_ASSERT_NOT_NULL( txt );
       
  1926     CleanupStack::PopAndDestroy( txt );
       
  1927     
       
  1928     return KErrNone;
       
  1929     }
       
  1930 
       
  1931 // -----------------------------------------------------------------------------
       
  1932 // CTestSDKUiFwUtil::TestTAknLayoutTextLayoutTextL
       
  1933 // -----------------------------------------------------------------------------
       
  1934 //
       
  1935 TInt CTestSDKUiFwUtil::TestTAknLayoutTextLayoutTextL( CStifItemParser& /*aItem*/ )
       
  1936     {
       
  1937     TRect rect( 20, 20, 40, 40 );
       
  1938     TAknLayoutText* txt  = new ( ELeave ) TAknLayoutText;
       
  1939     CleanupStack::PushL( txt );
       
  1940     txt->LayoutText( rect, R_CEIKMFNE_LAYOUT );
       
  1941     CleanupStack::PopAndDestroy( txt );
       
  1942     txt = NULL;
       
  1943     
       
  1944     txt  = new ( ELeave ) TAknLayoutText;
       
  1945     CleanupStack::PushL( txt );
       
  1946     TResourceReader reader;
       
  1947     iEnv->CreateResourceReaderLC( reader, R_CEIKMFNE_LAYOUT );
       
  1948     txt->LayoutText( rect, reader );
       
  1949     CleanupStack::PopAndDestroy();
       
  1950     CleanupStack::PopAndDestroy( txt );
       
  1951     txt = NULL;
       
  1952     
       
  1953     txt  = new ( ELeave ) TAknLayoutText;
       
  1954     CleanupStack::PushL( txt );
       
  1955     AknLayoutUtils::SAknLayoutText layouttext = { ELatinBold12, 0, 5, 5, 10, 10, 20 };
       
  1956     txt->LayoutText( rect, layouttext );
       
  1957     CleanupStack::PopAndDestroy( txt );
       
  1958     txt = NULL;
       
  1959     
       
  1960     txt  = new ( ELeave ) TAknLayoutText;
       
  1961     CleanupStack::PushL( txt );
       
  1962     TAknTextLineLayout txtlayout;
       
  1963     txtlayout.iC = 0;
       
  1964     txtlayout.il = 1;
       
  1965     txtlayout.ir = 1;
       
  1966     txtlayout.iB = 1;
       
  1967     txtlayout.iW = 5;
       
  1968     txtlayout.iJ = ELayoutAlignCenter;
       
  1969     txtlayout.iFont = ELatinBold12;
       
  1970     txtlayout.iBaselineSkip = 0;
       
  1971     txtlayout.iNumberOfLinesShown = 1;
       
  1972     txt->LayoutText( rect, txtlayout );
       
  1973     CleanupStack::PopAndDestroy( txt );
       
  1974     txt = NULL;
       
  1975     
       
  1976     txt  = new ( ELeave ) TAknLayoutText;
       
  1977     CleanupStack::PushL( txt );
       
  1978     txt->LayoutText( rect, ELatinBold12, 0, 1, 1, 1, 5, ELayoutAlignCenter );
       
  1979     CleanupStack::PopAndDestroy( txt );
       
  1980     
       
  1981     return KErrNone;
       
  1982     }
       
  1983 
       
  1984 // -----------------------------------------------------------------------------
       
  1985 // CTestSDKUiFwUtil::TestTAknLayoutTextDrawTextL
       
  1986 // -----------------------------------------------------------------------------
       
  1987 //
       
  1988 TInt CTestSDKUiFwUtil::TestTAknLayoutTextDrawTextL( CStifItemParser& /*aItem*/ )
       
  1989     {
       
  1990     TRect rect( 20, 20, 40, 40 );
       
  1991     TAknLayoutText* txt  = new ( ELeave ) TAknLayoutText;
       
  1992     CleanupStack::PushL( txt );
       
  1993     AknLayoutUtils::SAknLayoutText layouttext = { ELatinBold12, 0, 5, 5, 10, 10, 20 };
       
  1994     txt->LayoutText( rect, layouttext );
       
  1995     CWindowGc& gc = iContainer->SystemGc();
       
  1996     iContainer->ActiveControlGc();
       
  1997     txt->DrawText( gc, KTextExample );
       
  1998     txt->DrawText( gc, KTextExample, EFalse );
       
  1999     txt->DrawText( gc, KTextExample, EFalse, KRgbBlack );
       
  2000     txt->TextRect();
       
  2001     CleanupStack::PopAndDestroy( txt );
       
  2002     iContainer->DeActiveControlGc();
       
  2003     
       
  2004     return KErrNone;
       
  2005     }
       
  2006 
       
  2007 // -----------------------------------------------------------------------------
       
  2008 // CTestSDKUiFwUtil::TestTAknLayoutRectConstructorL
       
  2009 // -----------------------------------------------------------------------------
       
  2010 //
       
  2011 TInt CTestSDKUiFwUtil::TestTAknLayoutRectConstructorL( CStifItemParser& /*aItem*/ )
       
  2012     {
       
  2013     TAknLayoutRect* rect  = new ( ELeave ) TAknLayoutRect;
       
  2014     CleanupStack::PushL( rect );
       
  2015     STIF_ASSERT_NOT_NULL( rect );
       
  2016     CleanupStack::PopAndDestroy( rect );
       
  2017     
       
  2018     return KErrNone;
       
  2019     }
       
  2020 
       
  2021 // -----------------------------------------------------------------------------
       
  2022 // CTestSDKUiFwUtil::TestTAknLayoutRectLayoutRectL
       
  2023 // -----------------------------------------------------------------------------
       
  2024 //
       
  2025 TInt CTestSDKUiFwUtil::TestTAknLayoutRectLayoutRectL( CStifItemParser& /*aItem*/ )
       
  2026     {
       
  2027     TRect rect( 20, 20, 40, 40 );
       
  2028     TAknLayoutRect* layoutrect  = new ( ELeave ) TAknLayoutRect;
       
  2029     CleanupStack::PushL( layoutrect );
       
  2030     layoutrect->LayoutRect( rect, R_CEIKMFNE_LAYOUT );
       
  2031     CleanupStack::PopAndDestroy( layoutrect );
       
  2032     layoutrect = NULL;
       
  2033     
       
  2034     layoutrect  = new ( ELeave ) TAknLayoutRect;
       
  2035     CleanupStack::PushL( layoutrect );
       
  2036     TResourceReader reader;
       
  2037     iEnv->CreateResourceReaderLC( reader, R_CEIKMFNE_LAYOUT );
       
  2038     layoutrect->LayoutRect( rect, reader );
       
  2039     CleanupStack::PopAndDestroy();
       
  2040     CleanupStack::PopAndDestroy( layoutrect );
       
  2041     layoutrect = NULL;
       
  2042     
       
  2043     layoutrect  = new ( ELeave ) TAknLayoutRect;
       
  2044     CleanupStack::PushL( layoutrect );
       
  2045     AknLayoutUtils::SAknLayoutRect layout;
       
  2046     layout.iC = 0;
       
  2047     layout.iL = 5;
       
  2048     layout.iT = 5;
       
  2049     layout.iR = 10;
       
  2050     layout.iB = 15;
       
  2051     layout.iW = 15;
       
  2052     layout.iH = 12;
       
  2053     layoutrect->LayoutRect( rect, layout );
       
  2054     CleanupStack::PopAndDestroy( layoutrect );
       
  2055     layoutrect = NULL;
       
  2056     
       
  2057     layoutrect  = new ( ELeave ) TAknLayoutRect;
       
  2058     CleanupStack::PushL( layoutrect );
       
  2059     TAknWindowLineLayout winlinelayout;
       
  2060     TAknWindowLineLayout windowlinelayout;
       
  2061     windowlinelayout.iC = 2;
       
  2062     windowlinelayout.il = 1;
       
  2063     windowlinelayout.ir = 1;
       
  2064     windowlinelayout.ib = 1;
       
  2065     windowlinelayout.iW = 5;
       
  2066     windowlinelayout.iH = 5;
       
  2067     layoutrect->LayoutRect( rect, windowlinelayout );
       
  2068     CleanupStack::PopAndDestroy( layoutrect );
       
  2069     layoutrect = NULL;
       
  2070     
       
  2071     layoutrect  = new ( ELeave ) TAknLayoutRect;
       
  2072     CleanupStack::PushL( layoutrect );
       
  2073     layoutrect->LayoutRect( rect, ELatinBold12, 0, 1, 1, 1, 5, ELayoutAlignCenter );
       
  2074     CleanupStack::PopAndDestroy( layoutrect );
       
  2075     
       
  2076     return KErrNone;
       
  2077     }
       
  2078 
       
  2079 // -----------------------------------------------------------------------------
       
  2080 // CTestSDKUiFwUtil::TestTAknLayoutRectSimpleFuncL
       
  2081 // -----------------------------------------------------------------------------
       
  2082 //
       
  2083 TInt CTestSDKUiFwUtil::TestTAknLayoutRectSimpleFuncL( CStifItemParser& /*aItem*/ )
       
  2084     {
       
  2085     TRect rect( 20, 20, 40, 40 );
       
  2086     TAknLayoutRect* layoutrect  = new ( ELeave ) TAknLayoutRect;
       
  2087     CleanupStack::PushL( layoutrect );
       
  2088     layoutrect->LayoutRect( rect, ELatinBold12, 0, 1, 1, 1, 5, ELayoutAlignCenter );
       
  2089     CWindowGc& gc = iContainer->SystemGc();
       
  2090     iContainer->ActiveControlGc();
       
  2091     layoutrect->DrawRect( gc );
       
  2092     layoutrect->DrawOutLineRect( gc );
       
  2093     CFbsBitmap* bitmap = NULL;
       
  2094     CFbsBitmap* mask = NULL;
       
  2095     AknIconUtils::CreateIconL( bitmap, mask, KBitmapFile, EMbmAvkonQgn_indi_mic, EMbmAvkonQgn_indi_mic_mask );
       
  2096     CleanupStack::PushL( bitmap );
       
  2097     CleanupStack::PushL( mask );
       
  2098     layoutrect->DrawImage( gc, bitmap, mask );
       
  2099     layoutrect->Color();
       
  2100     layoutrect->Rect();
       
  2101     iContainer->DeActiveControlGc();
       
  2102     CleanupStack::PopAndDestroy( 3 );// bitmap, mask, layoutrect
       
  2103     
       
  2104     return KErrNone;
       
  2105     }
       
  2106 
       
  2107 
       
  2108 // -----------------------------------------------------------------------------
       
  2109 // CTestSDKUiFwUtil::TestAknDrawDoDrawFuncsL
       
  2110 // -----------------------------------------------------------------------------
       
  2111 //
       
  2112 TInt CTestSDKUiFwUtil::TestAknDrawDoDrawFuncsL( CStifItemParser& /*aItem*/ )
       
  2113     {
       
  2114     TRect rect( 20, 20, 40, 40 );
       
  2115     CWindowGc& gc = iContainer->SystemGc();
       
  2116     iContainer->ActiveControlGc();
       
  2117     TBufC<KBufSize> buf( KTextExample );
       
  2118     TPtrC ptrc( buf );
       
  2119     AknDraw::DrawEmptyList( rect, gc, ptrc );
       
  2120     AknDraw::DrawEmptyListForSettingPage( rect, gc, ptrc );
       
  2121     AknDraw::DrawEmptyListWithFind( rect, gc, ptrc );
       
  2122     AknDraw::DrawEmptyListHeading( rect, gc, ptrc );
       
  2123     AknDraw::DrawEmptyListImpl( rect, gc, ptrc, 1, 1 );
       
  2124     TAknLayoutRect* layoutrect  = new ( ELeave ) TAknLayoutRect;
       
  2125     CleanupStack::PushL( layoutrect );
       
  2126     AknLayoutUtils::SAknLayoutRect layout;
       
  2127     layout.iC = 0;
       
  2128     layout.iL = 5;
       
  2129     layout.iT = 5;
       
  2130     layout.iR = 10;
       
  2131     layout.iB = 15;
       
  2132     layout.iW = 15;
       
  2133     layout.iH = 12;
       
  2134     layoutrect->LayoutRect( rect, layout );
       
  2135     AknDraw::DrawWindowShadow( gc, *layoutrect, *layoutrect, *layoutrect, *layoutrect, *layoutrect );
       
  2136     CleanupStack::PopAndDestroy( layoutrect );
       
  2137     iContainer->DeActiveControlGc();
       
  2138     
       
  2139     return KErrNone;
       
  2140     }
       
  2141 
       
  2142 
       
  2143 // -----------------------------------------------------------------------------
       
  2144 // CTestSDKUiFwUtil::TestAknDrawWithSkinsDoDrawFuncsL
       
  2145 // -----------------------------------------------------------------------------
       
  2146 //
       
  2147 TInt CTestSDKUiFwUtil::TestAknDrawWithSkinsDoDrawFuncsL( CStifItemParser& /*aItem*/ )
       
  2148     {
       
  2149     TRect rect( 20, 20, 40, 40 );
       
  2150     CWindowGc& gc = iContainer->SystemGc();
       
  2151     iContainer->ActiveControlGc();
       
  2152     TBufC<KBufSize> buf( KTextExample );
       
  2153     TPtrC ptrc( buf );
       
  2154     AknDrawWithSkins::DrawEmptyList( rect, gc, ptrc, iContainer );
       
  2155     AknDrawWithSkins::DrawEmptyListForSettingPage( rect, gc, ptrc, iContainer );
       
  2156     AknDrawWithSkins::DrawEmptyListWithFind( rect, gc, ptrc, iContainer );
       
  2157     AknDrawWithSkins::DrawEmptyListHeading( rect, gc, ptrc, iContainer );
       
  2158     TAknLayoutRect* layoutrect  = new ( ELeave ) TAknLayoutRect;
       
  2159     CleanupStack::PushL( layoutrect );
       
  2160     AknLayoutUtils::SAknLayoutRect layout;
       
  2161     layout.iC = 0;
       
  2162     layout.iL = 5;
       
  2163     layout.iT = 5;
       
  2164     layout.iR = 10;
       
  2165     layout.iB = 15;
       
  2166     layout.iW = 15;
       
  2167     layout.iH = 12;
       
  2168     layoutrect->LayoutRect( rect, layout );
       
  2169     AknDrawWithSkins::DrawWindowShadow( gc, *layoutrect, *layoutrect, *layoutrect, *layoutrect, *layoutrect, iContainer );
       
  2170     CleanupStack::PopAndDestroy( layoutrect );
       
  2171     iContainer->DeActiveControlGc();
       
  2172     
       
  2173     return KErrNone;
       
  2174     }
       
  2175 
       
  2176 // -----------------------------------------------------------------------------
       
  2177 // CTestSDKUiFwUtil::TestAknUtilsGlobalFuncsL
       
  2178 // -----------------------------------------------------------------------------
       
  2179 //
       
  2180 TInt CTestSDKUiFwUtil::TestAknUtilsGlobalFuncsL( CStifItemParser& /*aItem*/ )
       
  2181     {
       
  2182     LatinPlain12();
       
  2183     LatinBold12();
       
  2184     LatinBold13();
       
  2185     LatinBold16();
       
  2186     LatinBold17();
       
  2187     LatinBold19(); 
       
  2188     NumberPlain5();
       
  2189     ClockBold30();
       
  2190     LatinClock14();
       
  2191     ApacPlain12();
       
  2192     ApacPlain16();
       
  2193     
       
  2194     TBuf<KBufSize> buf( KTextExample );
       
  2195     CompleteWithAppPath( buf );
       
  2196     DefaultInputLanguageFromUILanguage( 0 );
       
  2197     SetKeyblockMode( EDefaultBlockMode );
       
  2198     TTime time;
       
  2199     time.HomeTime();
       
  2200     AknDateTimeUtils::ConvertUtcTimeToHomeTime( time );
       
  2201     AknLangUtils::DisplayLanguageTagL();
       
  2202     
       
  2203     return KErrNone;
       
  2204     }
       
  2205 
       
  2206 // -----------------------------------------------------------------------------
       
  2207 // CTestSDKUiFwUtil::TestFilterTextListBoxModelRemoveFilterL
       
  2208 // -----------------------------------------------------------------------------
       
  2209 //
       
  2210 TInt CTestSDKUiFwUtil::TestFilterTextListBoxModelRemoveFilterL( CStifItemParser& /*aItem*/ )
       
  2211     {
       
  2212     CEikListBox* celllist = new ( ELeave ) CAknSingleNumberStyleListBox;
       
  2213     CleanupStack::PushL( celllist );
       
  2214     celllist->SetContainerWindowL( * iContainer );
       
  2215     
       
  2216     TResourceReader reader;
       
  2217     iEnv->CreateResourceReaderLC( reader, R_DOUBLE_LISTBOX );
       
  2218     celllist->ConstructFromResourceL( reader );
       
  2219     CleanupStack::PopAndDestroy();
       
  2220     CAknSearchField* search = CAknSearchField::NewL( *iContainer, 
       
  2221             CAknSearchField::ESearch, NULL, KSearchFieldMaxLength );
       
  2222     CleanupStack::PushL( search );
       
  2223     
       
  2224     CAknFilteredTextListBoxModel* model = 
       
  2225         static_cast<CAknFilteredTextListBoxModel*>( celllist->Model() );
       
  2226     
       
  2227     model->RemoveFilter();
       
  2228     
       
  2229     CleanupStack::PopAndDestroy( search );
       
  2230     CleanupStack::PopAndDestroy( celllist );
       
  2231     
       
  2232     
       
  2233     return KErrNone;
       
  2234     }
       
  2235 
       
  2236 
       
  2237 // -----------------------------------------------------------------------------
       
  2238 // CTestSDKUiFwUtil::TestAknPopupUtilsPosition
       
  2239 // -----------------------------------------------------------------------------
       
  2240 //
       
  2241 TInt CTestSDKUiFwUtil::TestAknPopupUtilsPositionFuncs( 
       
  2242     CStifItemParser& /*aItem*/ )
       
  2243     {
       
  2244     //TPoint position( AknPopupUtils::Position( TSize(), ETrue ) );
       
  2245     //position = ( AknPopupUtils::Position( TSize(), EFalse ) );
       
  2246     //position = ( AknPopupUtils::Position( TSize(), NULL ) );
       
  2247     return KErrNone;
       
  2248     }
       
  2249 
       
  2250 // End of file
       
  2251