classicui_pub/grids_api/tsrc/src/testsdkgridsblocksakncolourselectiongrid.cpp
branchRCL_3
changeset 20 d48ab3b357f1
parent 0 2f259fa3e83a
equal deleted inserted replaced
19:aecbbf00d063 20:d48ab3b357f1
       
     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 akncolourselectiongrid.h
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 /*
       
    20  *  [INCLUDE FILES]
       
    21  */
       
    22 #include <akncolourselectiongrid.h>
       
    23 #include <eiklbo.h>
       
    24 #include <coeaui.h>
       
    25 #include <coecobs.h>
       
    26 
       
    27 #include "testsdkgrids.h"
       
    28 
       
    29 // ============================ MEMBER FUNCTIONS ===============================
       
    30 
       
    31 // -----------------------------------------------------------------------------
       
    32 // Ctestsdkgrids::TestGridsCCSGNewL
       
    33 // -----------------------------------------------------------------------------
       
    34 //
       
    35 TInt CTestSDKGrids::TestGridsCCSGNewL( CStifItemParser& /*aItem*/ )
       
    36     {
       
    37     _LIT( Ktestsdkgrid, "testsdkgrid" );
       
    38     _LIT( KTestGridsCCSGNewL, "In TestGridsCCSGNewL" );
       
    39     TestModuleIf().Printf( 0, Ktestsdkgrid, KTestGridsCCSGNewL );
       
    40     iLog->Log( KTestGridsCCSGNewL );
       
    41     
       
    42     CArrayFixFlat<TRgb>* array = new( ELeave ) CArrayFixFlat<TRgb>(1);
       
    43     CleanupStack::PushL( array );
       
    44     TRgb rgb = ( KRgbRed, KRgbGreen, KRgbBlue );
       
    45     array->AppendL( rgb );
       
    46     TBool noneChosen = ETrue;
       
    47     iCCSGrid = CAknColourSelectionGrid::NewL( array, ETrue, noneChosen, rgb );
       
    48 
       
    49     STIF_ASSERT_NOT_NULL( iCCSGrid );
       
    50 
       
    51     CleanupStack::Pop( array );
       
    52     return KErrNone;
       
    53     }
       
    54 
       
    55 // -----------------------------------------------------------------------------
       
    56 // Ctestsdkgrids::TestGridsCCSGExecuteLD
       
    57 // -----------------------------------------------------------------------------
       
    58 //
       
    59 TInt CTestSDKGrids::TestGridsCCSGExecuteLD( CStifItemParser& /*aItem*/ )
       
    60     {
       
    61     _LIT( Ktestsdkgrid, "testsdkgrid" );
       
    62     _LIT( KTestGridsCCSGExecuteLD, "In TestGridsCCSGExecuteLD" );
       
    63     TestModuleIf().Printf( 0, Ktestsdkgrid, KTestGridsCCSGExecuteLD );
       
    64     iLog->Log( KTestGridsCCSGExecuteLD );
       
    65     
       
    66     iCCSGrid->ExecuteLD();
       
    67     
       
    68     return KErrNone;
       
    69     }
       
    70 
       
    71 // -----------------------------------------------------------------------------
       
    72 // Ctestsdkgrids::TestGridsCCSGDelete
       
    73 // -----------------------------------------------------------------------------
       
    74 //
       
    75 TInt CTestSDKGrids::TestGridsCCSGDelete( CStifItemParser& /*aItem*/ )
       
    76     {
       
    77     _LIT( Ktestsdkgrid, "testsdkgrid" );
       
    78     _LIT( KTestGridsCCSGDelete, "In TestGridsCCSGDelete" );
       
    79     TestModuleIf().Printf( 0, Ktestsdkgrid, KTestGridsCCSGDelete );
       
    80     iLog->Log( KTestGridsCCSGDelete );
       
    81 
       
    82     delete iCCSGrid;
       
    83     iCCSGrid = NULL;
       
    84 
       
    85     return KErrNone;
       
    86     }
       
    87 
       
    88 // -----------------------------------------------------------------------------
       
    89 // Ctestsdkgrids::TestGridsCCSGHandlePointerEventL
       
    90 // -----------------------------------------------------------------------------
       
    91 //
       
    92 TInt CTestSDKGrids::TestGridsCCSGHandlePointerEventL( CStifItemParser& /*aItem*/ )
       
    93     {
       
    94     _LIT( Ktestsdkgrid, "testsdkgrid" );
       
    95     _LIT( KTestGridsCCSGHandleControlEventL, "In TestGridsCCSGHandleControlEventL" );
       
    96     TestModuleIf().Printf( 0, Ktestsdkgrid, KTestGridsCCSGHandleControlEventL );
       
    97     iLog->Log( KTestGridsCCSGHandleControlEventL );
       
    98 
       
    99     TPointerEvent event;
       
   100     iCCSGrid->HandlePointerEventL( event );
       
   101     return KErrNone;
       
   102     }
       
   103 
       
   104 
       
   105 /*
       
   106  * End file
       
   107  */