uiaccelerator_plat/alf_core_toolkit_api/tsrc/src/testuiaifctkitblockshuicurve.cpp
branchRCL_3
changeset 20 31fccae4f8a7
parent 10 7c5dd702d6d3
equal deleted inserted replaced
19:e5af45d51884 20:31fccae4f8a7
       
     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:  For test alf core toolkit api modules
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 // [INCLUDE FILES]
       
    21 #include <e32svr.h>
       
    22 #include <stifparser.h>
       
    23 #include <stiftestinterface.h>
       
    24 #include <uiacceltk/huienv.h>
       
    25 #include <uiacceltk/huicontrol.h>
       
    26 #include <uiacceltk/huicontrolgroup.h>
       
    27 #include <uiacceltk/huivisual.h>
       
    28 #include <uiacceltk/huianchorlayout.h>
       
    29 #include <uiacceltk/huievent.h>
       
    30 #include <uiacceltk/huicurvepath.h>
       
    31 #include <uiacceltk/huicurvepathlayout.h>
       
    32 #include <eikenv.h>
       
    33 #include <e32err.h>
       
    34 
       
    35 #include "testuiaifcoretoolkit.h"
       
    36 // -----------------------------------------------------------------------------
       
    37 // CTestUiAifCoreToolkit::TestCHuiCurvePathNewL
       
    38 // -----------------------------------------------------------------------------
       
    39 //
       
    40 TInt CTestUiAifCoreToolkit::TestCHuiCurvePathNewL( CStifItemParser& /*aItem*/ )
       
    41     {
       
    42 
       
    43     // Print to UI
       
    44     _LIT( Ktestuiaifcoretoolkit, "testuiaifcoretoolkit" );
       
    45     _LIT( KTestCHuiCurvePathNewL, "In TestCHuiCurvePathNewL" );
       
    46     TestModuleIf().Printf( 0, Ktestuiaifcoretoolkit, KTestCHuiCurvePathNewL );
       
    47     // Print to log file
       
    48     iLog->Log( KTestCHuiCurvePathNewL );
       
    49 
       
    50     STIF_ASSERT_NOT_NULL( iHuiEnv );
       
    51     STIF_ASSERT_NOT_NULL( iHuiControl );
       
    52     CHuiControl* otherControl = new( ELeave ) CHuiControl( *iHuiEnv );
       
    53     STIF_ASSERT_NOT_NULL( otherControl );
       
    54     CleanupStack::PushL( otherControl );
       
    55     iHuiControl->SetId( 0 );
       
    56     STIF_ASSERT_NOT_NULL( iHuiControlGroup );
       
    57     CHuiCurvePath* curvePath = CHuiCurvePath::NewL();
       
    58     STIF_ASSERT_NOT_NULL( curvePath );
       
    59     CleanupStack::PushL( curvePath );
       
    60     CleanupStack::PopAndDestroy( curvePath );
       
    61     CleanupStack::Pop( 1 );
       
    62     
       
    63     return KErrNone;
       
    64     
       
    65     }
       
    66 // -----------------------------------------------------------------------------
       
    67 // CTestUiAifCoreToolkit::TestCHuiCurvePathNewCL
       
    68 // -----------------------------------------------------------------------------
       
    69 //
       
    70 TInt CTestUiAifCoreToolkit::TestCHuiCurvePathNewCL( CStifItemParser& /*aItem*/ )
       
    71     {
       
    72 
       
    73     // Print to UI
       
    74     _LIT( Ktestuiaifcoretoolkit, "testuiaifcoretoolkit" );
       
    75     _LIT( KTestCHuiCurvePathNewCL, "In TestCHuiCurvePathNewCL" );
       
    76     TestModuleIf().Printf( 0, Ktestuiaifcoretoolkit, KTestCHuiCurvePathNewCL );
       
    77     // Print to log file
       
    78     iLog->Log( KTestCHuiCurvePathNewCL );
       
    79 
       
    80     STIF_ASSERT_NOT_NULL( iHuiEnv );
       
    81     STIF_ASSERT_NOT_NULL( iHuiControl );
       
    82     CHuiControl* otherControl = new( ELeave ) CHuiControl( *iHuiEnv );
       
    83     STIF_ASSERT_NOT_NULL( otherControl );
       
    84     CleanupStack::PushL( otherControl );
       
    85     iHuiControl->SetId( 0 );
       
    86     STIF_ASSERT_NOT_NULL( iHuiControlGroup );
       
    87     CHuiCurvePath* curvePath = CHuiCurvePath::NewL();
       
    88     STIF_ASSERT_NOT_NULL( curvePath );
       
    89     CleanupStack::PushL( curvePath );
       
    90     CleanupStack::PopAndDestroy( curvePath );
       
    91     CleanupStack::Pop( 1 );
       
    92     
       
    93     return KErrNone;
       
    94     
       
    95     }
       
    96 // -----------------------------------------------------------------------------
       
    97 // CTestUiAifCoreToolkit::TestCHuiCurvePathDestructL
       
    98 // -----------------------------------------------------------------------------
       
    99 //
       
   100 TInt CTestUiAifCoreToolkit::TestCHuiCurvePathDestructL( CStifItemParser& /*aItem*/ )
       
   101     {
       
   102 
       
   103     // Print to UI
       
   104     _LIT( Ktestuiaifcoretoolkit, "testuiaifcoretoolkit" );
       
   105     _LIT( KTestCHuiCurvePathDestructL, "In TestCHuiCurvePathDestructL" );
       
   106     TestModuleIf().Printf( 0, Ktestuiaifcoretoolkit, KTestCHuiCurvePathDestructL );
       
   107     // Print to log file
       
   108     iLog->Log( KTestCHuiCurvePathDestructL );
       
   109 
       
   110     STIF_ASSERT_NOT_NULL( iHuiEnv );
       
   111     STIF_ASSERT_NOT_NULL( iHuiControl );
       
   112     CHuiControl* otherControl = new( ELeave ) CHuiControl( *iHuiEnv );
       
   113     STIF_ASSERT_NOT_NULL( otherControl );
       
   114     CleanupStack::PushL( otherControl );
       
   115     iHuiControl->SetId( 0 );
       
   116     STIF_ASSERT_NOT_NULL( iHuiControlGroup );
       
   117     CHuiCurvePath* curvePath = CHuiCurvePath::NewL();
       
   118     STIF_ASSERT_NOT_NULL( curvePath );
       
   119     CleanupStack::PushL( curvePath );
       
   120     CleanupStack::PopAndDestroy( curvePath );
       
   121     CleanupStack::Pop( 1 );
       
   122     
       
   123     return KErrNone;
       
   124     
       
   125     }
       
   126 // -----------------------------------------------------------------------------
       
   127 // CTestUiAifCoreToolkit::TestCHuiCurvePathResetL
       
   128 // -----------------------------------------------------------------------------
       
   129 //
       
   130 TInt CTestUiAifCoreToolkit::TestCHuiCurvePathResetL( CStifItemParser& /*aItem*/ )
       
   131     {
       
   132 
       
   133     // Print to UI
       
   134     _LIT( Ktestuiaifcoretoolkit, "testuiaifcoretoolkit" );
       
   135     _LIT( KTestCHuiCurvePathResetL, "In TestCHuiCurvePathResetL" );
       
   136     TestModuleIf().Printf( 0, Ktestuiaifcoretoolkit, KTestCHuiCurvePathResetL );
       
   137     // Print to log file
       
   138     iLog->Log( KTestCHuiCurvePathResetL );
       
   139 
       
   140     STIF_ASSERT_NOT_NULL( iHuiEnv );
       
   141     STIF_ASSERT_NOT_NULL( iHuiControl );
       
   142     CHuiControl* otherControl = new( ELeave ) CHuiControl( *iHuiEnv );
       
   143     STIF_ASSERT_NOT_NULL( otherControl );
       
   144     CleanupStack::PushL( otherControl );
       
   145     iHuiControl->SetId( 0 );
       
   146     STIF_ASSERT_NOT_NULL( iHuiControlGroup );
       
   147     CHuiCurvePath* curvePath = CHuiCurvePath::NewL();
       
   148     STIF_ASSERT_NOT_NULL( curvePath );
       
   149     CleanupStack::PushL( curvePath );
       
   150     curvePath->Reset();
       
   151     CleanupStack::PopAndDestroy( curvePath );
       
   152     CleanupStack::Pop( 1 );
       
   153     
       
   154     return KErrNone;
       
   155     
       
   156     }
       
   157 // -----------------------------------------------------------------------------
       
   158 // CTestUiAifCoreToolkit::TestCHuiCurvePathEnableLoopL
       
   159 // -----------------------------------------------------------------------------
       
   160 //
       
   161 TInt CTestUiAifCoreToolkit::TestCHuiCurvePathEnableLoopL( CStifItemParser& /*aItem*/ )
       
   162     {
       
   163 
       
   164     // Print to UI
       
   165     _LIT( Ktestuiaifcoretoolkit, "testuiaifcoretoolkit" );
       
   166     _LIT( KTestCHuiCurvePathEnableLoopL, "In TestCHuiCurvePathEnableLoopL" );
       
   167     TestModuleIf().Printf( 0, Ktestuiaifcoretoolkit, KTestCHuiCurvePathEnableLoopL );
       
   168     // Print to log file
       
   169     iLog->Log( KTestCHuiCurvePathEnableLoopL );
       
   170 
       
   171     STIF_ASSERT_NOT_NULL( iHuiEnv );
       
   172     STIF_ASSERT_NOT_NULL( iHuiControl );
       
   173     CHuiControl* otherControl = new( ELeave ) CHuiControl( *iHuiEnv );
       
   174     STIF_ASSERT_NOT_NULL( otherControl );
       
   175     CleanupStack::PushL( otherControl );
       
   176     iHuiControl->SetId( 0 );
       
   177     STIF_ASSERT_NOT_NULL( iHuiControlGroup );
       
   178     CHuiCurvePath* curvePath = CHuiCurvePath::NewL();
       
   179     STIF_ASSERT_NOT_NULL( curvePath );
       
   180     CleanupStack::PushL( curvePath );
       
   181     curvePath->Reset();
       
   182     curvePath->EnableLoop();
       
   183     CleanupStack::PopAndDestroy( curvePath );
       
   184     CleanupStack::Pop( 1 );
       
   185     
       
   186     return KErrNone;
       
   187     
       
   188     }
       
   189 // -----------------------------------------------------------------------------
       
   190 // CTestUiAifCoreToolkit::TestCHuiCurvePathLoopL
       
   191 // -----------------------------------------------------------------------------
       
   192 //
       
   193 TInt CTestUiAifCoreToolkit::TestCHuiCurvePathLoopL( CStifItemParser& /*aItem*/ )
       
   194     {
       
   195 
       
   196     // Print to UI
       
   197     _LIT( Ktestuiaifcoretoolkit, "testuiaifcoretoolkit" );
       
   198     _LIT( KTestCHuiCurvePathLoopL, "In TestCHuiCurvePathLoopL" );
       
   199     TestModuleIf().Printf( 0, Ktestuiaifcoretoolkit, KTestCHuiCurvePathLoopL );
       
   200     // Print to log file
       
   201     iLog->Log( KTestCHuiCurvePathLoopL );
       
   202 
       
   203     STIF_ASSERT_NOT_NULL( iHuiEnv );
       
   204     STIF_ASSERT_NOT_NULL( iHuiControl );
       
   205     CHuiControl* otherControl = new( ELeave ) CHuiControl( *iHuiEnv );
       
   206     STIF_ASSERT_NOT_NULL( otherControl );
       
   207     CleanupStack::PushL( otherControl );
       
   208     iHuiControl->SetId( 0 );
       
   209     STIF_ASSERT_NOT_NULL( iHuiControlGroup );
       
   210     CHuiCurvePath* curvePath = CHuiCurvePath::NewL();
       
   211     STIF_ASSERT_NOT_NULL( curvePath );
       
   212     CleanupStack::PushL( curvePath );
       
   213     curvePath->Reset();
       
   214     curvePath->EnableLoop();
       
   215     curvePath->Loop();
       
   216     CleanupStack::PopAndDestroy( curvePath );
       
   217     CleanupStack::Pop( 1 );
       
   218     
       
   219     return KErrNone;
       
   220     
       
   221     }
       
   222 // -----------------------------------------------------------------------------
       
   223 // CTestUiAifCoreToolkit::TestCHuiCurvePathSetOriginL
       
   224 // -----------------------------------------------------------------------------
       
   225 //
       
   226 TInt CTestUiAifCoreToolkit::TestCHuiCurvePathSetOriginL( CStifItemParser& /*aItem*/ )
       
   227     {
       
   228 
       
   229     // Print to UI
       
   230     _LIT( Ktestuiaifcoretoolkit, "testuiaifcoretoolkit" );
       
   231     _LIT( KTestCHuiCurvePathSetOriginL, "In TestCHuiCurvePathSetOriginL" );
       
   232     TestModuleIf().Printf( 0, Ktestuiaifcoretoolkit, KTestCHuiCurvePathSetOriginL );
       
   233     // Print to log file
       
   234     iLog->Log( KTestCHuiCurvePathSetOriginL );
       
   235 
       
   236     STIF_ASSERT_NOT_NULL( iHuiEnv );
       
   237     STIF_ASSERT_NOT_NULL( iHuiControl );
       
   238     CHuiControl* otherControl = new( ELeave ) CHuiControl( *iHuiEnv );
       
   239     STIF_ASSERT_NOT_NULL( otherControl );
       
   240     CleanupStack::PushL( otherControl );
       
   241     iHuiControl->SetId( 0 );
       
   242     STIF_ASSERT_NOT_NULL( iHuiControlGroup );
       
   243     CHuiCurvePath* curvePath = CHuiCurvePath::NewL();
       
   244     STIF_ASSERT_NOT_NULL( curvePath );
       
   245     CleanupStack::PushL( curvePath );
       
   246     curvePath->SetOrigin( 0 );
       
   247     CleanupStack::PopAndDestroy( curvePath );
       
   248     CleanupStack::Pop( 1 );
       
   249     
       
   250     return KErrNone;
       
   251     
       
   252     }
       
   253 // -----------------------------------------------------------------------------
       
   254 // CTestUiAifCoreToolkit::TestCHuiCurvePathAppendLineL
       
   255 // -----------------------------------------------------------------------------
       
   256 //
       
   257 TInt CTestUiAifCoreToolkit::TestCHuiCurvePathAppendLineL( CStifItemParser& /*aItem*/ )
       
   258     {
       
   259 
       
   260     // Print to UI
       
   261     _LIT( Ktestuiaifcoretoolkit, "testuiaifcoretoolkit" );
       
   262     _LIT( KTestCHuiCurvePathAppendLineL, "In TestCHuiCurvePathAppendLineL" );
       
   263     TestModuleIf().Printf( 0, Ktestuiaifcoretoolkit, KTestCHuiCurvePathAppendLineL );
       
   264     // Print to log file
       
   265     iLog->Log( KTestCHuiCurvePathAppendLineL );
       
   266 
       
   267     STIF_ASSERT_NOT_NULL( iHuiEnv );
       
   268     STIF_ASSERT_NOT_NULL( iHuiControl );
       
   269     CHuiControl* otherControl = new( ELeave ) CHuiControl( *iHuiEnv );
       
   270     STIF_ASSERT_NOT_NULL( otherControl );
       
   271     CleanupStack::PushL( otherControl );
       
   272     iHuiControl->SetId( 0 );
       
   273     STIF_ASSERT_NOT_NULL( iHuiControlGroup );
       
   274     CHuiCurvePath* curvePath = CHuiCurvePath::NewL();
       
   275     STIF_ASSERT_NOT_NULL( curvePath );
       
   276     CleanupStack::PushL( curvePath );
       
   277     curvePath->SetOrigin( 0 );
       
   278     TPoint start( 0, 0 );
       
   279     TPoint end( 1, 1 );
       
   280     curvePath->AppendLineL( start, end );
       
   281     CleanupStack::PopAndDestroy( curvePath );
       
   282     CleanupStack::Pop( 1 );
       
   283     
       
   284     return KErrNone;
       
   285     
       
   286     }
       
   287 // -----------------------------------------------------------------------------
       
   288 // CTestUiAifCoreToolkit::TestCHuiCurvePathAppendRealLineL
       
   289 // -----------------------------------------------------------------------------
       
   290 //
       
   291 TInt CTestUiAifCoreToolkit::TestCHuiCurvePathAppendRealLineL( CStifItemParser& /*aItem*/ )
       
   292     {
       
   293 
       
   294     // Print to UI
       
   295     _LIT( Ktestuiaifcoretoolkit, "testuiaifcoretoolkit" );
       
   296     _LIT( KTestCHuiCurvePathAppendRealLineL, "In TestCHuiCurvePathAppendRealLineL" );
       
   297     TestModuleIf().Printf( 0, Ktestuiaifcoretoolkit, KTestCHuiCurvePathAppendRealLineL );
       
   298     // Print to log file
       
   299     iLog->Log( KTestCHuiCurvePathAppendRealLineL );
       
   300 
       
   301     STIF_ASSERT_NOT_NULL( iHuiEnv );
       
   302     STIF_ASSERT_NOT_NULL( iHuiControl );
       
   303     CHuiControl* otherControl = new( ELeave ) CHuiControl( *iHuiEnv );
       
   304     STIF_ASSERT_NOT_NULL( otherControl );
       
   305     CleanupStack::PushL( otherControl );
       
   306     iHuiControl->SetId( 0 );
       
   307     STIF_ASSERT_NOT_NULL( iHuiControlGroup );
       
   308     CHuiCurvePath* curvePath = CHuiCurvePath::NewL();
       
   309     STIF_ASSERT_NOT_NULL( curvePath );
       
   310     CleanupStack::PushL( curvePath );
       
   311     curvePath->SetOrigin( 0 );
       
   312     const THuiRealPoint realStart( 0, 0 );
       
   313     const THuiRealPoint realEnd( 1, 1 );
       
   314     curvePath->AppendLineL( realStart, realEnd );
       
   315     CleanupStack::PopAndDestroy( curvePath );
       
   316     CleanupStack::Pop( 1 );
       
   317 
       
   318     return KErrNone;
       
   319     
       
   320     }
       
   321 // -----------------------------------------------------------------------------
       
   322 // CTestUiAifCoreToolkit::TestCHuiCurvePathAppendArcL
       
   323 // -----------------------------------------------------------------------------
       
   324 //
       
   325 TInt CTestUiAifCoreToolkit::TestCHuiCurvePathAppendArcL( CStifItemParser& /*aItem*/ )
       
   326     {
       
   327 
       
   328     // Print to UI
       
   329     _LIT( Ktestuiaifcoretoolkit, "testuiaifcoretoolkit" );
       
   330     _LIT( KTestCHuiCurvePathAppendArcL, "In TestCHuiCurvePathAppendArcL" );
       
   331     TestModuleIf().Printf( 0, Ktestuiaifcoretoolkit, KTestCHuiCurvePathAppendArcL );
       
   332     // Print to log file
       
   333     iLog->Log( KTestCHuiCurvePathAppendArcL );
       
   334 
       
   335     STIF_ASSERT_NOT_NULL( iHuiEnv );
       
   336     STIF_ASSERT_NOT_NULL( iHuiControl );
       
   337     CHuiControl* otherControl = new( ELeave ) CHuiControl( *iHuiEnv );
       
   338     STIF_ASSERT_NOT_NULL( otherControl );
       
   339     CleanupStack::PushL( otherControl );
       
   340     iHuiControl->SetId( 0 );
       
   341     STIF_ASSERT_NOT_NULL( iHuiControlGroup );
       
   342     CHuiCurvePath* curvePath = CHuiCurvePath::NewL();
       
   343     STIF_ASSERT_NOT_NULL( curvePath );
       
   344     CleanupStack::PushL( curvePath );
       
   345     curvePath->SetOrigin( 0 );
       
   346     const TPoint aOrigin( 0, 0 );
       
   347     const TSize aSize( 3, 7 );
       
   348     TReal32 aStartAngle = 2;
       
   349     TReal32 aEndAngle = 4;
       
   350     curvePath->AppendArcL( aOrigin, aSize, aStartAngle, aEndAngle );
       
   351     CleanupStack::PopAndDestroy( curvePath );
       
   352     CleanupStack::Pop( 1 );
       
   353 
       
   354     return KErrNone;
       
   355     
       
   356     }
       
   357 // -----------------------------------------------------------------------------
       
   358 // CTestUiAifCoreToolkit::TestCHuiCurvePathAppendHuiArcL
       
   359 // -----------------------------------------------------------------------------
       
   360 //
       
   361 TInt CTestUiAifCoreToolkit::TestCHuiCurvePathAppendHuiArcL( CStifItemParser& /*aItem*/ )
       
   362     {
       
   363 
       
   364     // Print to UI
       
   365     _LIT( Ktestuiaifcoretoolkit, "testuiaifcoretoolkit" );
       
   366     _LIT( KTestCHuiCurvePathAppendHuiArcL, "In TestCHuiCurvePathAppendHuiArcL" );
       
   367     TestModuleIf().Printf( 0, Ktestuiaifcoretoolkit, KTestCHuiCurvePathAppendHuiArcL );
       
   368     // Print to log file
       
   369     iLog->Log( KTestCHuiCurvePathAppendHuiArcL );
       
   370 
       
   371     STIF_ASSERT_NOT_NULL( iHuiEnv );
       
   372     STIF_ASSERT_NOT_NULL( iHuiControl );
       
   373     CHuiControl* otherControl = new( ELeave ) CHuiControl( *iHuiEnv );
       
   374     STIF_ASSERT_NOT_NULL( otherControl );
       
   375     CleanupStack::PushL( otherControl );
       
   376     iHuiControl->SetId( 0 );
       
   377     STIF_ASSERT_NOT_NULL( iHuiControlGroup );
       
   378     CHuiCurvePath* curvePath = CHuiCurvePath::NewL();
       
   379     STIF_ASSERT_NOT_NULL( curvePath );
       
   380     CleanupStack::PushL( curvePath );
       
   381     curvePath->SetOrigin( 0 );
       
   382     const THuiRealPoint aOrigin( 0, 0 );
       
   383     const THuiRealSize aSize( 6, 9 );
       
   384     TReal32 aStartAngle = 2;
       
   385     TReal32 aEndAngle =8;
       
   386     curvePath->AppendArcL( aOrigin, aSize, aStartAngle, aEndAngle );
       
   387     CleanupStack::PopAndDestroy( curvePath );
       
   388     CleanupStack::Pop( 1 );
       
   389     
       
   390     return KErrNone;
       
   391     
       
   392     }
       
   393 // -----------------------------------------------------------------------------
       
   394 // CTestUiAifCoreToolkit::TestCHuiCurvePathLengthL
       
   395 // -----------------------------------------------------------------------------
       
   396 //
       
   397 TInt CTestUiAifCoreToolkit::TestCHuiCurvePathLengthL( CStifItemParser& /*aItem*/ )
       
   398     {
       
   399 
       
   400     // Print to UI
       
   401     _LIT( Ktestuiaifcoretoolkit, "testuiaifcoretoolkit" );
       
   402     _LIT( KTestCHuiCurvePathLengthL, "In TestCHuiCurvePathLengthL" );
       
   403     TestModuleIf().Printf( 0, Ktestuiaifcoretoolkit, KTestCHuiCurvePathLengthL );
       
   404     // Print to log file
       
   405     iLog->Log( KTestCHuiCurvePathLengthL );
       
   406 
       
   407     STIF_ASSERT_NOT_NULL( iHuiEnv );
       
   408     STIF_ASSERT_NOT_NULL( iHuiControl );
       
   409     CHuiControl* otherControl = new( ELeave ) CHuiControl( *iHuiEnv );
       
   410     STIF_ASSERT_NOT_NULL( otherControl );
       
   411     CleanupStack::PushL( otherControl );
       
   412     iHuiControl->SetId( 0 );
       
   413     STIF_ASSERT_NOT_NULL( iHuiControlGroup );
       
   414     CHuiCurvePath* curvePath = CHuiCurvePath::NewL();
       
   415     STIF_ASSERT_NOT_NULL( curvePath );
       
   416     CleanupStack::PushL( curvePath );
       
   417     curvePath->SetOrigin( 0 );
       
   418     TInt length = curvePath->Length();
       
   419     CleanupStack::PopAndDestroy( curvePath );
       
   420     CleanupStack::Pop( 1 );
       
   421     
       
   422     return KErrNone;
       
   423     
       
   424     }
       
   425 // -----------------------------------------------------------------------------
       
   426 // CTestUiAifCoreToolkit::TestCHuiCurvePathEvaluateL
       
   427 // -----------------------------------------------------------------------------
       
   428 //
       
   429 TInt CTestUiAifCoreToolkit::TestCHuiCurvePathEvaluateL( CStifItemParser& /*aItem*/ )
       
   430     {
       
   431 
       
   432     // Print to UI
       
   433     _LIT( Ktestuiaifcoretoolkit, "testuiaifcoretoolkit" );
       
   434     _LIT( KTestCHuiCurvePathEvaluateL, "In TestCHuiCurvePathLengthL" );
       
   435     TestModuleIf().Printf( 0, Ktestuiaifcoretoolkit, KTestCHuiCurvePathEvaluateL );
       
   436     // Print to log file
       
   437     iLog->Log( KTestCHuiCurvePathEvaluateL );
       
   438 
       
   439     STIF_ASSERT_NOT_NULL( iHuiEnv );
       
   440     STIF_ASSERT_NOT_NULL( iHuiControl );
       
   441     CHuiControl* otherControl = new( ELeave ) CHuiControl( *iHuiEnv );
       
   442     STIF_ASSERT_NOT_NULL( otherControl );
       
   443     CleanupStack::PushL( otherControl );
       
   444     iHuiControl->SetId( 0 );
       
   445     STIF_ASSERT_NOT_NULL( iHuiControlGroup );
       
   446     CHuiCurvePath* curvePath = CHuiCurvePath::NewL();
       
   447     STIF_ASSERT_NOT_NULL( curvePath );
       
   448     CleanupStack::PushL( curvePath );
       
   449     curvePath->SetOrigin( 0 );
       
   450     TInt length = curvePath->Length();
       
   451     TReal32 aPos = 2; 
       
   452     THuiRealPoint aPoint( 3, 3 );
       
   453     curvePath->Evaluate( aPos, aPoint ); 
       
   454     CleanupStack::PopAndDestroy( curvePath );
       
   455     CHuiCurvePathLayout* pathLayout = CHuiCurvePathLayout::AddNewL( *iHuiControl );
       
   456     STIF_ASSERT_NOT_NULL( pathLayout );
       
   457     CleanupStack::PushL( pathLayout );
       
   458     CleanupStack::Pop( 2 );
       
   459     
       
   460     return KErrNone;
       
   461     
       
   462     }
       
   463 
       
   464 //  [End of File]