classicui_plat/ganes_api/tsrc/src/testplatganeblockshgscroller.cpp
changeset 47 2f0c06423c72
parent 46 0e1e0022bd03
child 53 3c67ea82fafc
equal deleted inserted replaced
46:0e1e0022bd03 47:2f0c06423c72
     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:  ganes_api
       
    15 *
       
    16 */
       
    17 
       
    18 // [INCLUDE FILES]
       
    19 #include "testplatgane.h"
       
    20 
       
    21 // --------------------------------------------------------------------------
       
    22 // CTestPlatGane::TestCHgScrollerInitScreenL1
       
    23 // --------------------------------------------------------------------------
       
    24 //
       
    25 TInt CTestPlatGane::TestCHgScrollerInitScreenL1( CStifItemParser& /*aItem*/ )
       
    26     {
       
    27     _LIT(Kctestplatgane, "CTestPlatGane");
       
    28     _LIT(Ktestchgscrollerinitscreenl1, "In TestCHgScrollerInitScreenL1");
       
    29     TestModuleIf().Printf(0, Kctestplatgane, Ktestchgscrollerinitscreenl1);
       
    30     iLog->Log(Ktestchgscrollerinitscreenl1);
       
    31 
       
    32     // DSA not supported anymore.
       
    33 
       
    34     return KErrNone;
       
    35     }
       
    36 
       
    37 // --------------------------------------------------------------------------
       
    38 // CTestPlatGane::TestCHgScrollerInitScreenL2L
       
    39 // --------------------------------------------------------------------------
       
    40 //
       
    41 TInt CTestPlatGane::TestCHgScrollerInitScreenL2L( CStifItemParser& /*aItem*/ )
       
    42     {
       
    43     _LIT(Kctestplatgane, "CTestPlatGane");
       
    44     _LIT(Ktestchgscrollerinitscreenl2l, "In TestCHgScrollerInitScreenL2L");
       
    45     TestModuleIf().Printf(0, Kctestplatgane, Ktestchgscrollerinitscreenl2l);
       
    46     iLog->Log(Ktestchgscrollerinitscreenl2l);
       
    47 
       
    48     TInt left = 0;
       
    49     TInt wrigth = KTest;
       
    50     TInt item = 0;
       
    51     TRect rect(TPoint( left, left), TPoint( wrigth, wrigth) );
       
    52     
       
    53     CHgScrollerWithTitle* scroler = CHgScrollerWithTitle::NewL( rect, item, 
       
    54     		                  CHgScrollerWithTitle::EHgScrollerDoubleGraphicList );
       
    55     CleanupStack::PushL( scroler );
       
    56 
       
    57     CHgScroller& temp = scroler->Scroller();
       
    58     temp.InitScreenL( rect );
       
    59     
       
    60     CleanupStack::PopAndDestroy( scroler );
       
    61 
       
    62     return KErrNone;
       
    63     }
       
    64 
       
    65 // --------------------------------------------------------------------------
       
    66 // CTestPlatGane::TestCHgScrollerRefreshScreenL
       
    67 // --------------------------------------------------------------------------
       
    68 //
       
    69 TInt CTestPlatGane::TestCHgScrollerRefreshScreenL( CStifItemParser& /*aItem*/ )
       
    70     {
       
    71     _LIT(Kctestplatgane, "CTestPlatGane");
       
    72     _LIT(Ktestchgscrollerrefreshscreenl, "In TestCHgScrollerRefreshScreenL");
       
    73     TestModuleIf().Printf(0, Kctestplatgane, Ktestchgscrollerrefreshscreenl);
       
    74     iLog->Log(Ktestchgscrollerrefreshscreenl);
       
    75 
       
    76     TInt left = 0;
       
    77     TInt wrigth = KTest;
       
    78     TInt item = 0;
       
    79     TRect rect(TPoint( left, left), TPoint( wrigth, wrigth) );
       
    80     
       
    81     CHgScrollerWithTitle* scroler = CHgScrollerWithTitle::NewL( rect, item , 
       
    82     		                  CHgScrollerWithTitle::EHgScrollerDoubleGraphicList );
       
    83     CleanupStack::PushL( scroler );
       
    84 
       
    85     CHgScroller& temp = scroler->Scroller();
       
    86     temp.RefreshScreen( item );
       
    87     
       
    88     CleanupStack::PopAndDestroy( scroler );
       
    89     return KErrNone;
       
    90     }
       
    91 
       
    92 // --------------------------------------------------------------------------
       
    93 // CTestPlatGane::TestCHgScrollerFirstIndexOnScreenL
       
    94 // --------------------------------------------------------------------------
       
    95 //
       
    96 TInt CTestPlatGane::TestCHgScrollerFirstIndexOnScreenL( CStifItemParser& /*aItem*/ )
       
    97     {
       
    98     _LIT(Kctestplatgane, "CTestPlatGane");
       
    99     _LIT(Ktestchgscrollerfirstindexonscreenl, "In TestCHgScrollerFirstIndexOnScreenL");
       
   100     TestModuleIf().Printf(0, Kctestplatgane, Ktestchgscrollerfirstindexonscreenl);
       
   101     iLog->Log(Ktestchgscrollerfirstindexonscreenl);
       
   102 
       
   103     TInt left = 0;
       
   104     TInt wrigth = KTest;
       
   105     TInt item = 0;
       
   106     TRect rect(TPoint( left, left), TPoint( wrigth, wrigth) );
       
   107     
       
   108     CHgScrollerWithTitle* scroler = CHgScrollerWithTitle::NewL( rect, item , 
       
   109     		                  CHgScrollerWithTitle::EHgScrollerDoubleGraphicList );
       
   110     CleanupStack::PushL( scroler );
       
   111 
       
   112     CHgScroller& temp = scroler->Scroller();
       
   113     temp.FirstIndexOnScreen();
       
   114     
       
   115     CleanupStack::PopAndDestroy( scroler );
       
   116         
       
   117     return KErrNone;
       
   118     }
       
   119 
       
   120 // --------------------------------------------------------------------------
       
   121 // CTestPlatGane::TestCHgScrollerItemsOnScreenL
       
   122 // --------------------------------------------------------------------------
       
   123 //
       
   124 TInt CTestPlatGane::TestCHgScrollerItemsOnScreenL( CStifItemParser& /*aItem*/ )
       
   125     {
       
   126     _LIT(Kctestplatgane, "CTestPlatGane");
       
   127     _LIT(Ktestchgscrolleritemsonscreenl, "In TestCHgScrollerItemsOnScreenL");
       
   128     TestModuleIf().Printf(0, Kctestplatgane, Ktestchgscrolleritemsonscreenl);
       
   129     iLog->Log(Ktestchgscrolleritemsonscreenl);
       
   130 
       
   131     TInt left = 0;
       
   132     TInt wrigth = KTest;
       
   133     TInt item = 0;
       
   134     TRect rect(TPoint( left, left), TPoint( wrigth, wrigth) );
       
   135     
       
   136     CHgScrollerWithTitle* scroler = CHgScrollerWithTitle::NewL( rect, item , 
       
   137     		                  CHgScrollerWithTitle::EHgScrollerDoubleGraphicList );
       
   138     CleanupStack::PushL( scroler );
       
   139 
       
   140     CHgScroller& temp = scroler->Scroller();
       
   141     temp.ItemsOnScreen();
       
   142     
       
   143     CleanupStack::PopAndDestroy( scroler );
       
   144     
       
   145     return KErrNone;
       
   146     }
       
   147 
       
   148 // --------------------------------------------------------------------------
       
   149 // CTestPlatGane::TestCHgScrollerItemL
       
   150 // --------------------------------------------------------------------------
       
   151 //
       
   152 TInt CTestPlatGane::TestCHgScrollerItemL( CStifItemParser& /*aItem*/ )
       
   153     {
       
   154     _LIT(Kctestplatgane, "CTestPlatGane");
       
   155     _LIT(Ktestchgscrolleriteml, "In TestCHgScrollerItemL");
       
   156     TestModuleIf().Printf(0, Kctestplatgane, Ktestchgscrolleriteml);
       
   157     iLog->Log(Ktestchgscrolleriteml);
       
   158 
       
   159     TInt left = 0;
       
   160     TInt wrigth = KTest;
       
   161     TInt item = 0;
       
   162     TRect rect(TPoint( left, left), TPoint( wrigth, wrigth) );
       
   163     
       
   164     CHgScrollerWithTitle* scroler = CHgScrollerWithTitle::NewL( rect, item , 
       
   165     		                  CHgScrollerWithTitle::EHgScrollerDoubleGraphicList );
       
   166     CleanupStack::PushL( scroler );
       
   167 
       
   168     CHgScroller& temp = scroler->Scroller();
       
   169     
       
   170     CHgItem* newItem = CHgItem::NewL();
       
   171     CleanupStack::PushL( newItem );
       
   172     
       
   173     temp.AddItem( newItem );
       
   174     temp.ItemL( item );
       
   175     
       
   176     CleanupStack::Pop( newItem );
       
   177     CleanupStack::PopAndDestroy( scroler );
       
   178     
       
   179     return KErrNone;
       
   180     }
       
   181 
       
   182 // --------------------------------------------------------------------------
       
   183 // CTestPlatGane::TestCHgScrollerSetItemL
       
   184 // --------------------------------------------------------------------------
       
   185 //
       
   186 TInt CTestPlatGane::TestCHgScrollerSetItemL( CStifItemParser& /*aItem*/ )
       
   187     {
       
   188     _LIT(Kctestplatgane, "CTestPlatGane");
       
   189     _LIT(Ktestchgscrollersetiteml, "In TestCHgScrollerSetItemL");
       
   190     TestModuleIf().Printf(0, Kctestplatgane, Ktestchgscrollersetiteml);
       
   191     iLog->Log(Ktestchgscrollersetiteml);
       
   192 
       
   193     TInt left = 0;
       
   194     TInt wrigth = KTest;
       
   195     TInt item = 0;
       
   196     TRect rect(TPoint( left, left), TPoint( wrigth, wrigth) );
       
   197     
       
   198     CHgScrollerWithTitle* scroler = CHgScrollerWithTitle::NewL( rect, item , 
       
   199     		                  CHgScrollerWithTitle::EHgScrollerDoubleGraphicList );
       
   200     CleanupStack::PushL( scroler );
       
   201 
       
   202     CHgScroller& temp = scroler->Scroller();
       
   203     CHgItem* newItem = CHgItem::NewL();
       
   204   
       
   205     temp.SetItem( newItem, item );
       
   206     
       
   207     CleanupStack::PopAndDestroy( scroler );
       
   208     
       
   209     return KErrNone;
       
   210     }
       
   211 
       
   212 // --------------------------------------------------------------------------
       
   213 // CTestPlatGane::TestCHgScrollerAddItemL
       
   214 // --------------------------------------------------------------------------
       
   215 //
       
   216 TInt CTestPlatGane::TestCHgScrollerAddItemL( CStifItemParser& /*aItem*/ )
       
   217     {
       
   218     _LIT(Kctestplatgane, "CTestPlatGane");
       
   219     _LIT(Ktestchgscrolleradditeml, "In TestCHgScrollerAddItemL");
       
   220     TestModuleIf().Printf(0, Kctestplatgane, Ktestchgscrolleradditeml);
       
   221     iLog->Log(Ktestchgscrolleradditeml);
       
   222 
       
   223     TInt left = 0;
       
   224     TInt wrigth = KTest;
       
   225     TInt item = 0;
       
   226     TRect rect(TPoint( left, left), TPoint( wrigth, wrigth) );
       
   227     
       
   228     CHgScrollerWithTitle* scroler = CHgScrollerWithTitle::NewL( rect, item , 
       
   229     		                  CHgScrollerWithTitle::EHgScrollerDoubleGraphicList );
       
   230     CleanupStack::PushL( scroler );
       
   231 
       
   232     CHgScroller& temp = scroler->Scroller();
       
   233   
       
   234     CHgItem* newItem = CHgItem::NewL();
       
   235 
       
   236     temp.AddItem( newItem );
       
   237 
       
   238     CleanupStack::PopAndDestroy( scroler );
       
   239     
       
   240     return KErrNone;
       
   241     }
       
   242 
       
   243 // --------------------------------------------------------------------------
       
   244 // CTestPlatGane::TestCHgScrollerInsertItemL
       
   245 // --------------------------------------------------------------------------
       
   246 //
       
   247 TInt CTestPlatGane::TestCHgScrollerInsertItemL( CStifItemParser& /*aItem*/ )
       
   248     {
       
   249     _LIT(Kctestplatgane, "CTestPlatGane");
       
   250     _LIT(Ktestchgscrollerinsertiteml, "In TestCHgScrollerInsertItemL");
       
   251     TestModuleIf().Printf(0, Kctestplatgane, Ktestchgscrollerinsertiteml);
       
   252     iLog->Log(Ktestchgscrollerinsertiteml);
       
   253 
       
   254     TInt left = 0;
       
   255     TInt wrigth = KTest;
       
   256     TInt item = 0;
       
   257     TRect rect(TPoint( left, left), TPoint( wrigth, wrigth) );
       
   258     
       
   259     CHgScrollerWithTitle* scroler = CHgScrollerWithTitle::NewL( rect, item , 
       
   260     		                  CHgScrollerWithTitle::EHgScrollerDoubleGraphicList );
       
   261     CleanupStack::PushL( scroler );
       
   262 
       
   263     CHgScroller& temp = scroler->Scroller();
       
   264     CHgItem* newItem = CHgItem::NewL();
       
   265 
       
   266     temp.InsertItem( newItem, item );
       
   267  
       
   268     CleanupStack::PopAndDestroy( scroler );
       
   269     
       
   270     return KErrNone;
       
   271     
       
   272     }
       
   273 
       
   274 // --------------------------------------------------------------------------
       
   275 // CTestPlatGane::TestCHgScrollerRemoveItemL
       
   276 // --------------------------------------------------------------------------
       
   277 //
       
   278 TInt CTestPlatGane::TestCHgScrollerRemoveItemL( CStifItemParser& /*aItem*/ )
       
   279     {
       
   280     _LIT(Kctestplatgane, "CTestPlatGane");
       
   281     _LIT(Ktestchgscrollerremoveiteml, "In TestCHgScrollerRemoveItemL");
       
   282     TestModuleIf().Printf(0, Kctestplatgane, Ktestchgscrollerremoveiteml);
       
   283     iLog->Log(Ktestchgscrollerremoveiteml);
       
   284 
       
   285     TInt left = 0;
       
   286     TInt wrigth = KTest;
       
   287     TInt item = 0;
       
   288     TRect rect(TPoint( left, left), TPoint( wrigth, wrigth) );
       
   289     
       
   290     CHgScrollerWithTitle* scroler = CHgScrollerWithTitle::NewL( rect, item , 
       
   291     		                  CHgScrollerWithTitle::EHgScrollerDoubleGraphicList );
       
   292     CleanupStack::PushL( scroler );
       
   293 
       
   294     CHgScroller& temp = scroler->Scroller();
       
   295     item = 0;
       
   296 
       
   297     CHgItem* newItem = CHgItem::NewL();
       
   298 
       
   299     temp.AddItem( newItem );
       
   300     temp.RemoveItem( item );
       
   301     
       
   302     CleanupStack::PopAndDestroy( scroler );
       
   303     
       
   304 
       
   305     return KErrNone;
       
   306     }
       
   307 
       
   308 // --------------------------------------------------------------------------
       
   309 // CTestPlatGane::TestCHgScrollerSelectedIndexL
       
   310 // --------------------------------------------------------------------------
       
   311 //
       
   312 TInt CTestPlatGane::TestCHgScrollerSelectedIndexL( CStifItemParser& /*aItem*/ )
       
   313     {
       
   314     _LIT(Kctestplatgane, "CTestPlatGane");
       
   315     _LIT(Ktestchgscrollerselectedindexl, "In TestCHgScrollerSelectedIndexL");
       
   316     TestModuleIf().Printf(0, Kctestplatgane, Ktestchgscrollerselectedindexl);
       
   317     iLog->Log(Ktestchgscrollerselectedindexl);
       
   318 
       
   319     TInt left = 0;
       
   320     TInt wrigth = KTest;
       
   321     TInt item = 0;
       
   322     TRect rect(TPoint( left, left), TPoint( wrigth, wrigth) );
       
   323     
       
   324     CHgScrollerWithTitle* scroler = CHgScrollerWithTitle::NewL( rect, item , 
       
   325     		                  CHgScrollerWithTitle::EHgScrollerDoubleGraphicList );
       
   326     CleanupStack::PushL( scroler );
       
   327 
       
   328     CHgScroller& temp = scroler->Scroller();
       
   329 
       
   330     temp.SelectedIndex();
       
   331     
       
   332     CleanupStack::PopAndDestroy( scroler );
       
   333 
       
   334     return KErrNone;
       
   335     }
       
   336 
       
   337 // --------------------------------------------------------------------------
       
   338 // CTestPlatGane::TestCHgScrollerSetSelectedIndexL
       
   339 // --------------------------------------------------------------------------
       
   340 //
       
   341 TInt CTestPlatGane::TestCHgScrollerSetSelectedIndexL( CStifItemParser& /*aItem*/ )
       
   342     {
       
   343     _LIT(Kctestplatgane, "CTestPlatGane");
       
   344     _LIT(Ktestchgscrollersetselectedindexl, "In TestCHgScrollerSetSelectedIndexL");
       
   345     TestModuleIf().Printf(0, Kctestplatgane, Ktestchgscrollersetselectedindexl);
       
   346     iLog->Log(Ktestchgscrollersetselectedindexl);
       
   347 
       
   348     TInt left = 0;
       
   349     TInt wrigth = KTest;
       
   350     TInt item = 0;
       
   351     TRect rect(TPoint( left, left), TPoint( wrigth, wrigth) );
       
   352     
       
   353     CHgScrollerWithTitle* scroler = CHgScrollerWithTitle::NewL( rect, item , 
       
   354     		                  CHgScrollerWithTitle::EHgScrollerDoubleGraphicList );
       
   355     CleanupStack::PushL( scroler );
       
   356 
       
   357     CHgScroller& temp = scroler->Scroller();
       
   358     item = 0;
       
   359 
       
   360     CHgItem* newItem = CHgItem::NewL();
       
   361 
       
   362     temp.AddItem( newItem );
       
   363     temp.SetSelectedIndex( item );
       
   364     
       
   365     CleanupStack::PopAndDestroy( scroler );
       
   366 
       
   367     return KErrNone;
       
   368     }
       
   369 
       
   370 // --------------------------------------------------------------------------
       
   371 // CTestPlatGane::TestCHgScrollerMarkL
       
   372 // --------------------------------------------------------------------------
       
   373 //
       
   374 TInt CTestPlatGane::TestCHgScrollerMarkL( CStifItemParser& /*aItem*/ )
       
   375     {
       
   376     _LIT(Kctestplatgane, "CTestPlatGane");
       
   377     _LIT(Ktestchgscrollermarkl, "In TestCHgScrollerMarkL");
       
   378     TestModuleIf().Printf(0, Kctestplatgane, Ktestchgscrollermarkl);
       
   379     iLog->Log(Ktestchgscrollermarkl);
       
   380     
       
   381     TInt left = 0;
       
   382     TInt wrigth = KTest;
       
   383     TInt item = 0;
       
   384     TRect rect(TPoint( left, left), TPoint( wrigth, wrigth) );
       
   385     
       
   386     CHgScrollerWithTitle* scroler = CHgScrollerWithTitle::NewL( rect, item , 
       
   387     		                  CHgScrollerWithTitle::EHgScrollerDoubleGraphicList );
       
   388     CleanupStack::PushL( scroler );
       
   389 
       
   390     CHgScroller& temp = scroler->Scroller();
       
   391     TInt itemmark = 0;
       
   392     temp.Mark( itemmark );
       
   393     
       
   394     CleanupStack::PopAndDestroy( scroler );
       
   395     
       
   396     return KErrNone;
       
   397     }
       
   398 
       
   399 // --------------------------------------------------------------------------
       
   400 // CTestPlatGane::TestCHgScrollerUnMarkL
       
   401 // --------------------------------------------------------------------------
       
   402 //
       
   403 TInt CTestPlatGane::TestCHgScrollerUnMarkL( CStifItemParser& /*aItem*/ )
       
   404     {
       
   405     _LIT(Kctestplatgane, "CTestPlatGane");
       
   406     _LIT(Ktestchgscrollerunmarkl, "In TestCHgScrollerUnMarkL");
       
   407     TestModuleIf().Printf(0, Kctestplatgane, Ktestchgscrollerunmarkl);
       
   408     iLog->Log(Ktestchgscrollerunmarkl);
       
   409 
       
   410     TInt left = 0;
       
   411     TInt wrigth = KTest;
       
   412     TInt item = 0;
       
   413     TRect rect(TPoint( left, left), TPoint( wrigth, wrigth) );
       
   414     
       
   415     CHgScrollerWithTitle* scroler = CHgScrollerWithTitle::NewL( rect, item , 
       
   416     		                  CHgScrollerWithTitle::EHgScrollerDoubleGraphicList );
       
   417     CleanupStack::PushL( scroler );
       
   418 
       
   419     CHgScroller& temp = scroler->Scroller();
       
   420     TInt itemmark = 0;
       
   421     temp.Mark( itemmark );
       
   422     temp.UnMark( itemmark );
       
   423     
       
   424     CleanupStack::PopAndDestroy( scroler );
       
   425     return KErrNone;
       
   426     }
       
   427 
       
   428 // --------------------------------------------------------------------------
       
   429 // CTestPlatGane::TestCHgScrollerMarkAllL
       
   430 // --------------------------------------------------------------------------
       
   431 //
       
   432 TInt CTestPlatGane::TestCHgScrollerMarkAllL( CStifItemParser& /*aItem*/ )
       
   433     {
       
   434     _LIT(Kctestplatgane, "CTestPlatGane");
       
   435     _LIT(Ktestchgscrollermarkalll, "In TestCHgScrollerMarkAllL");
       
   436     TestModuleIf().Printf(0, Kctestplatgane, Ktestchgscrollermarkalll);
       
   437     iLog->Log(Ktestchgscrollermarkalll);
       
   438     
       
   439     TInt left = 0;
       
   440     TInt wrigth = KTest;
       
   441     TInt item = 0;
       
   442     TRect rect(TPoint( left, left), TPoint( wrigth, wrigth) );
       
   443     
       
   444     CHgScrollerWithTitle* scroler = CHgScrollerWithTitle::NewL( rect, item , 
       
   445     		                  CHgScrollerWithTitle::EHgScrollerDoubleGraphicList );
       
   446     CleanupStack::PushL( scroler );
       
   447 
       
   448     CHgScroller& temp = scroler->Scroller();
       
   449     temp.MarkAll();
       
   450     
       
   451     CleanupStack::PopAndDestroy( scroler );
       
   452     return KErrNone;
       
   453     }
       
   454 
       
   455 // --------------------------------------------------------------------------
       
   456 // CTestPlatGane::TestCHgScrollerUnMarkAllL
       
   457 // --------------------------------------------------------------------------
       
   458 //
       
   459 TInt CTestPlatGane::TestCHgScrollerUnMarkAllL( CStifItemParser& /*aItem*/ )
       
   460     {
       
   461     _LIT(Kctestplatgane, "CTestPlatGane");
       
   462     _LIT(Ktestchgscrollerunmarkalll, "In TestCHgScrollerUnMarkAllL");
       
   463     TestModuleIf().Printf(0, Kctestplatgane, Ktestchgscrollerunmarkalll);
       
   464     iLog->Log(Ktestchgscrollerunmarkalll);
       
   465 
       
   466     TInt left = 0;
       
   467     TInt wrigth = KTest;
       
   468     TInt item = 0;
       
   469     TRect rect(TPoint( left, left), TPoint( wrigth, wrigth) );
       
   470     
       
   471     CHgScrollerWithTitle* scroler = CHgScrollerWithTitle::NewL( rect, item , 
       
   472     		                  CHgScrollerWithTitle::EHgScrollerDoubleGraphicList );
       
   473     CleanupStack::PushL( scroler );
       
   474 
       
   475     CHgScroller& temp = scroler->Scroller();
       
   476     temp.MarkAll();
       
   477     temp.UnMarkAll();
       
   478     
       
   479     CleanupStack::PopAndDestroy( scroler );
       
   480 
       
   481     return KErrNone;
       
   482     }
       
   483 
       
   484 // --------------------------------------------------------------------------
       
   485 // CTestPlatGane::TestCHgScrollerGetMarkedItemsL
       
   486 // --------------------------------------------------------------------------
       
   487 //
       
   488 TInt CTestPlatGane::TestCHgScrollerGetMarkedItemsL( CStifItemParser& /*aItem*/ )
       
   489     {
       
   490     _LIT(Kctestplatgane, "CTestPlatGane");
       
   491     _LIT(Ktestchgscrollergetmarkeditemsl, "In TestCHgScrollerGetMarkedItemsL");
       
   492     TestModuleIf().Printf(0, Kctestplatgane, Ktestchgscrollergetmarkeditemsl);
       
   493     iLog->Log(Ktestchgscrollergetmarkeditemsl);
       
   494 
       
   495     TInt left = 0;
       
   496     TInt wrigth = KTest;
       
   497     TInt item = 0;
       
   498     TRect rect(TPoint( left, left), TPoint( wrigth, wrigth) );
       
   499     
       
   500     CHgScrollerWithTitle* scroler = CHgScrollerWithTitle::NewL( rect, item , 
       
   501     		                  CHgScrollerWithTitle::EHgScrollerDoubleGraphicList );
       
   502     CleanupStack::PushL( scroler );
       
   503 
       
   504     CHgScroller& temp = scroler->Scroller();
       
   505     RArray<TInt> indexes;
       
   506     CleanupClosePushL( indexes );
       
   507     temp.GetMarkedItemsL( indexes );
       
   508     indexes.Reset();
       
   509     CleanupStack::PopAndDestroy();
       
   510     CleanupStack::PopAndDestroy( scroler );
       
   511 
       
   512     return KErrNone;
       
   513     }
       
   514 
       
   515 // --------------------------------------------------------------------------
       
   516 // CTestPlatGane::TestCHgScrollerResetL
       
   517 // --------------------------------------------------------------------------
       
   518 //
       
   519 TInt CTestPlatGane::TestCHgScrollerResetL( CStifItemParser& /*aItem*/ )
       
   520     {
       
   521     _LIT(Kctestplatgane, "CTestPlatGane");
       
   522     _LIT(Ktestchgscrollerresetl, "In TestCHgScrollerResetL");
       
   523     TestModuleIf().Printf(0, Kctestplatgane, Ktestchgscrollerresetl);
       
   524     iLog->Log(Ktestchgscrollerresetl);
       
   525 
       
   526     TInt left = 0;
       
   527     TInt wrigth = KTest;
       
   528     TInt item = 0;
       
   529     TRect rect(TPoint( left, left), TPoint( wrigth, wrigth) );
       
   530     
       
   531     CHgScrollerWithTitle* scroler = CHgScrollerWithTitle::NewL( rect, item , 
       
   532     		                  CHgScrollerWithTitle::EHgScrollerDoubleGraphicList );
       
   533     CleanupStack::PushL( scroler );
       
   534 
       
   535     CHgScroller& temp = scroler->Scroller();
       
   536 
       
   537     temp.Reset();
       
   538     
       
   539     CleanupStack::PopAndDestroy( scroler );
       
   540 
       
   541     return KErrNone;
       
   542     }
       
   543 
       
   544 // --------------------------------------------------------------------------
       
   545 // CTestPlatGane::TestCHgScrollerResizeL
       
   546 // --------------------------------------------------------------------------
       
   547 //
       
   548 TInt CTestPlatGane::TestCHgScrollerResizeL( CStifItemParser& /*aItem*/ )
       
   549     {
       
   550     _LIT(Kctestplatgane, "CTestPlatGane");
       
   551     _LIT(Ktestchgscrollerresizel, "In TestCHgScrollerResizeL");
       
   552     TestModuleIf().Printf(0, Kctestplatgane, Ktestchgscrollerresizel);
       
   553     iLog->Log(Ktestchgscrollerresizel);
       
   554 
       
   555     TInt left = 0;
       
   556     TInt wrigth = KTest;
       
   557     TInt item = 0;
       
   558     TRect rect(TPoint( left, left), TPoint( wrigth, wrigth) );
       
   559     
       
   560     CHgScrollerWithTitle* scroler = CHgScrollerWithTitle::NewL( rect, item , 
       
   561     		                  CHgScrollerWithTitle::EHgScrollerDoubleGraphicList );
       
   562     CleanupStack::PushL( scroler );
       
   563 
       
   564     CHgScroller& temp = scroler->Scroller();
       
   565     TInt tmp = 0;
       
   566     temp.ResizeL( tmp );
       
   567     
       
   568     CleanupStack::PopAndDestroy( scroler );
       
   569 
       
   570     return KErrNone;
       
   571     }
       
   572 
       
   573 // --------------------------------------------------------------------------
       
   574 // CTestPlatGane::TestCHgScrollerSetEmptyTextL
       
   575 // --------------------------------------------------------------------------
       
   576 //
       
   577 TInt CTestPlatGane::TestCHgScrollerSetEmptyTextL( CStifItemParser& /*aItem*/ )
       
   578     {
       
   579     _LIT(Kctestplatgane, "CTestPlatGane");
       
   580     _LIT(Ktestchgscrollersetemptytextl, "In TestCHgScrollerSetEmptyTextL");
       
   581     TestModuleIf().Printf(0, Kctestplatgane, Ktestchgscrollersetemptytextl);
       
   582     iLog->Log(Ktestchgscrollersetemptytextl);
       
   583 
       
   584     TInt left = 0;
       
   585     TInt wrigth = KTest;
       
   586     TInt item = 0;
       
   587     TRect rect(TPoint( left, left), TPoint( wrigth, wrigth) );
       
   588     
       
   589     CHgScrollerWithTitle* scroler = CHgScrollerWithTitle::NewL( rect, item , 
       
   590     		                  CHgScrollerWithTitle::EHgScrollerDoubleGraphicList );
       
   591     CleanupStack::PushL( scroler );
       
   592 
       
   593     CHgScroller& temp = scroler->Scroller();
       
   594     
       
   595     TBufC<KStringSize> tmp( _L("Hi") );
       
   596     temp.SetEmptyTextL( tmp );
       
   597     
       
   598     CleanupStack::PopAndDestroy( scroler );
       
   599 
       
   600     return KErrNone;
       
   601     }
       
   602 
       
   603 // --------------------------------------------------------------------------
       
   604 // CTestPlatGane::TestCHgScrollerItemCountL
       
   605 // --------------------------------------------------------------------------
       
   606 //
       
   607 TInt CTestPlatGane::TestCHgScrollerItemCountL( CStifItemParser& /*aItem*/ )
       
   608     {
       
   609     _LIT(Kctestplatgane, "CTestPlatGane");
       
   610     _LIT(Ktestchgscrolleritemcountl, "In TestCHgScrollerItemCountL");
       
   611     TestModuleIf().Printf(0, Kctestplatgane, Ktestchgscrolleritemcountl);
       
   612     iLog->Log(Ktestchgscrolleritemcountl);
       
   613 
       
   614     TInt left = 0;
       
   615     TInt wrigth = KTest;
       
   616     TInt item = 0;
       
   617     TRect rect(TPoint( left, left), TPoint( wrigth, wrigth) );
       
   618     
       
   619     CHgScrollerWithTitle* scroler = CHgScrollerWithTitle::NewL( rect, item , 
       
   620     		                  CHgScrollerWithTitle::EHgScrollerDoubleGraphicList );
       
   621     CleanupStack::PushL( scroler );
       
   622 
       
   623     CHgScroller& temp = scroler->Scroller();
       
   624     temp.ItemCount();
       
   625     
       
   626     CleanupStack::PopAndDestroy( scroler );
       
   627 
       
   628     return KErrNone;
       
   629     }
       
   630 
       
   631 // --------------------------------------------------------------------------
       
   632 // CTestPlatGane::TestCHgScrollerSetScrollBarTypeL
       
   633 // --------------------------------------------------------------------------
       
   634 //
       
   635 TInt CTestPlatGane::TestCHgScrollerSetScrollBarTypeL( CStifItemParser& /*aItem*/ )
       
   636     {
       
   637     _LIT(Kctestplatgane, "CTestPlatGane");
       
   638     _LIT(Ktestchgscrollersetscrollbartypel, "In TestCHgScrollerSetScrollBarTypeL");
       
   639     TestModuleIf().Printf(0, Kctestplatgane, Ktestchgscrollersetscrollbartypel);
       
   640     iLog->Log(Ktestchgscrollersetscrollbartypel);
       
   641 
       
   642     TInt left = 0;
       
   643     TInt wrigth = KTest;
       
   644     TInt item = 0;
       
   645     TRect rect(TPoint( left, left), TPoint( wrigth, wrigth) );
       
   646     
       
   647     CHgScrollerWithTitle* scroler = CHgScrollerWithTitle::NewL( rect, item , 
       
   648     		                  CHgScrollerWithTitle::EHgScrollerDoubleGraphicList );
       
   649     CleanupStack::PushL( scroler );
       
   650 
       
   651     CHgScroller& temp = scroler->Scroller();
       
   652     temp.SetScrollBarTypeL( CHgScroller::EHgScrollerScrollBar );
       
   653     
       
   654     CleanupStack::PopAndDestroy( scroler );
       
   655     return KErrNone;
       
   656     }
       
   657 
       
   658 // --------------------------------------------------------------------------
       
   659 // CTestPlatGane::TestCHgScrollerSetFlagsL
       
   660 // --------------------------------------------------------------------------
       
   661 //
       
   662 TInt CTestPlatGane::TestCHgScrollerSetFlagsL( CStifItemParser& /*aItem*/ )
       
   663     {
       
   664     _LIT(Kctestplatgane, "CTestPlatGane");
       
   665     _LIT(Ktestchgscrollersetflagsl, "In TestCHgScrollerSetFlagsL");
       
   666     TestModuleIf().Printf(0, Kctestplatgane, Ktestchgscrollersetflagsl);
       
   667     iLog->Log(Ktestchgscrollersetflagsl);
       
   668 
       
   669     TInt left = 0;
       
   670     TInt wrigth = KTest;
       
   671     TInt item = 0;
       
   672     TRect rect(TPoint( left, left), TPoint( wrigth, wrigth) );
       
   673     
       
   674     CHgScrollerWithTitle* scroler = CHgScrollerWithTitle::NewL( rect, item , 
       
   675     		                  CHgScrollerWithTitle::EHgScrollerDoubleGraphicList );
       
   676     CleanupStack::PushL( scroler );
       
   677 
       
   678     CHgScroller& temp = scroler->Scroller();
       
   679     TInt tmp = 0;
       
   680     temp.SetFlags( tmp );
       
   681     
       
   682     CleanupStack::PopAndDestroy( scroler );
       
   683 
       
   684     return KErrNone;
       
   685     }
       
   686 
       
   687 // --------------------------------------------------------------------------
       
   688 // CTestPlatGane::TestCHgScrollerClearFlagsL
       
   689 // --------------------------------------------------------------------------
       
   690 //
       
   691 TInt CTestPlatGane::TestCHgScrollerClearFlagsL( CStifItemParser& /*aItem*/ )
       
   692     {
       
   693     _LIT(Kctestplatgane, "CTestPlatGane");
       
   694     _LIT(Ktestchgscrollerclearflagsl, "In TestCHgScrollerClearFlagsL");
       
   695     TestModuleIf().Printf(0, Kctestplatgane, Ktestchgscrollerclearflagsl);
       
   696     iLog->Log(Ktestchgscrollerclearflagsl);
       
   697 
       
   698     TInt left = 0;
       
   699     TInt wrigth = KTest;
       
   700     TInt item = 0;
       
   701     TRect rect(TPoint( left, left), TPoint( wrigth, wrigth) );
       
   702     
       
   703     CHgScrollerWithTitle* scroler = CHgScrollerWithTitle::NewL( rect, item , 
       
   704     		                  CHgScrollerWithTitle::EHgScrollerDoubleGraphicList );
       
   705     CleanupStack::PushL( scroler );
       
   706 
       
   707     CHgScroller& temp = scroler->Scroller();
       
   708     TInt tmp = 0;
       
   709     temp.ClearFlags( tmp );
       
   710     
       
   711     CleanupStack::PopAndDestroy( scroler );
       
   712     
       
   713     return KErrNone;
       
   714     }
       
   715 
       
   716 // --------------------------------------------------------------------------
       
   717 // CTestPlatGane::TestCHgScrollerFlagsL
       
   718 // --------------------------------------------------------------------------
       
   719 //
       
   720 TInt CTestPlatGane::TestCHgScrollerFlagsL( CStifItemParser& /*aItem*/ )
       
   721     {
       
   722     _LIT(Kctestplatgane, "CTestPlatGane");
       
   723     _LIT(Ktestchgscrollerflagsl, "In TestCHgScrollerFlagsL");
       
   724     TestModuleIf().Printf(0, Kctestplatgane, Ktestchgscrollerflagsl);
       
   725     iLog->Log(Ktestchgscrollerflagsl);
       
   726     
       
   727     TInt left = 0;
       
   728     TInt wrigth = KTest;
       
   729     TInt item = 0;
       
   730     TRect rect(TPoint( left, left), TPoint( wrigth, wrigth) );
       
   731     
       
   732     CHgScrollerWithTitle* scroler = CHgScrollerWithTitle::NewL( rect, item , 
       
   733     		                  CHgScrollerWithTitle::EHgScrollerDoubleGraphicList );
       
   734     CleanupStack::PushL( scroler );
       
   735 
       
   736     CHgScroller& temp = scroler->Scroller();
       
   737     temp.Flags();
       
   738    
       
   739     CleanupStack::PopAndDestroy( scroler );
       
   740     
       
   741     return KErrNone;
       
   742     }
       
   743 
       
   744 // --------------------------------------------------------------------------
       
   745 // CTestPlatGane::TestCHgScrollerHightlightItemL
       
   746 // --------------------------------------------------------------------------
       
   747 //
       
   748 TInt CTestPlatGane::TestCHgScrollerHightlightItemL( CStifItemParser& /*aItem*/ )
       
   749     {
       
   750     _LIT(Kctestplatgane, "CTestPlatGane");
       
   751     _LIT(Ktestchgscrollerhightlightiteml, "In TestCHgScrollerHightlightItemL");
       
   752     TestModuleIf().Printf(0, Kctestplatgane, Ktestchgscrollerhightlightiteml);
       
   753     iLog->Log(Ktestchgscrollerhightlightiteml);
       
   754 
       
   755     TInt left = 0;
       
   756     TInt wrigth = KTest;
       
   757     TInt item = 0;
       
   758     TRect rect(TPoint( left, left), TPoint( wrigth, wrigth) );
       
   759     
       
   760     CHgScrollerWithTitle* scroler = CHgScrollerWithTitle::NewL( rect, item , 
       
   761     		                  CHgScrollerWithTitle::EHgScrollerDoubleGraphicList );
       
   762     CleanupStack::PushL( scroler );
       
   763 
       
   764     CHgScroller& temp = scroler->Scroller();
       
   765     temp.HightlightItem( _L("Test") );
       
   766     
       
   767     CleanupStack::PopAndDestroy( scroler );
       
   768     
       
   769     return KErrNone;
       
   770     }
       
   771 
       
   772 // --------------------------------------------------------------------------
       
   773 // CTestPlatGane::TestCHgScrollerSetDefaultIconL
       
   774 // --------------------------------------------------------------------------
       
   775 //
       
   776 TInt CTestPlatGane::TestCHgScrollerSetDefaultIconL( CStifItemParser& /*aItem*/ )
       
   777     {
       
   778     _LIT(Kctestplatgane, "CTestPlatGane");
       
   779     _LIT(Ktestchgscrollersetdefaulticonl, "In TestCHgScrollerSetDefaultIconL");
       
   780     TestModuleIf().Printf(0, Kctestplatgane, Ktestchgscrollersetdefaulticonl);
       
   781     iLog->Log(Ktestchgscrollersetdefaulticonl);
       
   782 
       
   783     TInt left = 0;
       
   784     TInt wrigth = KTest;
       
   785     TInt item = 0;
       
   786     TRect rect(TPoint( left, left), TPoint( wrigth, wrigth) );
       
   787     
       
   788     CHgScrollerWithTitle* scroler = CHgScrollerWithTitle::NewL( rect, item , 
       
   789     		                  CHgScrollerWithTitle::EHgScrollerDoubleGraphicList );
       
   790     CleanupStack::PushL( scroler );
       
   791 
       
   792     CHgScroller& temp = scroler->Scroller();
       
   793     temp.SetDefaultIconL( NULL );
       
   794     
       
   795     CleanupStack::PopAndDestroy( scroler );
       
   796     
       
   797     return KErrNone;
       
   798     }
       
   799 
       
   800 // --------------------------------------------------------------------------
       
   801 // CTestPlatGane::TestCHgScrollerDisableScrollBufferL
       
   802 // --------------------------------------------------------------------------
       
   803 //
       
   804 TInt CTestPlatGane::TestCHgScrollerDisableScrollBufferL( CStifItemParser& /*aItem*/ )
       
   805     {
       
   806     _LIT(Kctestplatgane, "CTestPlatGane");
       
   807     _LIT(Ktestchgscrollerdisablescrollbufferl, "In TestCHgScrollerDisableScrollBufferL");
       
   808     TestModuleIf().Printf(0, Kctestplatgane, Ktestchgscrollerdisablescrollbufferl);
       
   809     iLog->Log(Ktestchgscrollerdisablescrollbufferl);
       
   810     
       
   811     TInt left = 0;
       
   812     TInt wrigth = KTest;
       
   813     TInt item = 0;
       
   814     TRect rect(TPoint( left, left), TPoint( wrigth, wrigth) );
       
   815     
       
   816     CHgScrollerWithTitle* scroler = CHgScrollerWithTitle::NewL( rect, item , 
       
   817     		                  CHgScrollerWithTitle::EHgScrollerDoubleGraphicList );
       
   818     CleanupStack::PushL( scroler );
       
   819 
       
   820     CHgScroller& temp = scroler->Scroller();
       
   821     temp.DisableScrollBuffer();
       
   822     
       
   823     CleanupStack::PopAndDestroy( scroler );
       
   824     
       
   825     return KErrNone;
       
   826     }
       
   827 
       
   828 
       
   829 // --------------------------------------------------------------------------
       
   830 // CTestPlatGane::TestCHgScrollerEnableScrollBufferL
       
   831 // --------------------------------------------------------------------------
       
   832 //
       
   833 TInt CTestPlatGane::TestCHgScrollerEnableScrollBufferL( CStifItemParser& /*aItem*/ )
       
   834     {
       
   835     _LIT(Kctestplatgane, "CTestPlatGane");
       
   836     _LIT(Ktestchgscrollerdisablescrollbufferl, "In TestCHgScrollerDisableScrollBufferL");
       
   837     TestModuleIf().Printf(0, Kctestplatgane, Ktestchgscrollerdisablescrollbufferl);
       
   838     iLog->Log(Ktestchgscrollerdisablescrollbufferl);
       
   839     
       
   840     TInt left = 0;
       
   841     TInt wrigth = KTest;
       
   842     TInt item = 0;
       
   843     TRect rect(TPoint( left, left), TPoint( wrigth, wrigth) );
       
   844     
       
   845     CHgScrollerWithTitle* scroler = CHgScrollerWithTitle::NewL( rect, item , 
       
   846                               CHgScrollerWithTitle::EHgScrollerDoubleGraphicList );
       
   847     CleanupStack::PushL( scroler );
       
   848 
       
   849     CHgScroller& temp = scroler->Scroller();
       
   850     TDummyObserver obs;
       
   851     temp.EnableScrollBufferL(obs, 80, 20);
       
   852         
       
   853     CleanupStack::PopAndDestroy( scroler );
       
   854     
       
   855     return KErrNone;    
       
   856     }
       
   857 
       
   858 // --------------------------------------------------------------------------
       
   859 // CTestPlatGane::TestCHgScrollerSetSelectionObserver
       
   860 // --------------------------------------------------------------------------
       
   861 //
       
   862 TInt CTestPlatGane::TestCHgScrollerSetSelectionObserver( CStifItemParser& /*aItem*/ )
       
   863     {
       
   864     _LIT(Kctestplatgane, "CTestPlatGane");
       
   865     _LIT(Ktestchgscrollerdisablescrollbufferl, "In TestCHgScrollerDisableScrollBufferL");
       
   866     TestModuleIf().Printf(0, Kctestplatgane, Ktestchgscrollerdisablescrollbufferl);
       
   867     iLog->Log(Ktestchgscrollerdisablescrollbufferl);
       
   868     
       
   869     TInt left = 0;
       
   870     TInt wrigth = KTest;
       
   871     TInt item = 0;
       
   872     TRect rect(TPoint( left, left), TPoint( wrigth, wrigth) );
       
   873     
       
   874     CHgScrollerWithTitle* scroler = CHgScrollerWithTitle::NewL( rect, item , 
       
   875                               CHgScrollerWithTitle::EHgScrollerDoubleGraphicList );
       
   876     CleanupStack::PushL( scroler );
       
   877 
       
   878     CHgScroller& temp = scroler->Scroller();
       
   879     TDummyObserver obs;
       
   880     temp.SetSelectionObserver(obs);
       
   881     
       
   882     CleanupStack::PopAndDestroy( scroler );
       
   883     
       
   884     return KErrNone;    
       
   885     }
       
   886 
       
   887 // --------------------------------------------------------------------------
       
   888 // CTestPlatGane::TestCHgScrollerSetMarkingObserver
       
   889 // --------------------------------------------------------------------------
       
   890 //
       
   891 TInt CTestPlatGane::TestCHgScrollerSetMarkingObserver( CStifItemParser& /*aItem*/ )
       
   892     {
       
   893     _LIT(Kctestplatgane, "CTestPlatGane");
       
   894     _LIT(Ktestchgscrollerdisablescrollbufferl, "In TestCHgScrollerDisableScrollBufferL");
       
   895     TestModuleIf().Printf(0, Kctestplatgane, Ktestchgscrollerdisablescrollbufferl);
       
   896     iLog->Log(Ktestchgscrollerdisablescrollbufferl);
       
   897     
       
   898     TInt left = 0;
       
   899     TInt wrigth = KTest;
       
   900     TInt item = 0;
       
   901     TRect rect(TPoint( left, left), TPoint( wrigth, wrigth) );
       
   902     
       
   903     CHgScrollerWithTitle* scroler = CHgScrollerWithTitle::NewL( rect, item , 
       
   904                               CHgScrollerWithTitle::EHgScrollerDoubleGraphicList );
       
   905     CleanupStack::PushL( scroler );
       
   906 
       
   907     CHgScroller& temp = scroler->Scroller();
       
   908     TDummyObserver obs;
       
   909     temp.SetMarkingObserver(obs);
       
   910     
       
   911     CleanupStack::PopAndDestroy( scroler );
       
   912     
       
   913     return KErrNone;    
       
   914     }
       
   915 
       
   916