installationservices/swi/test/testexes/interpretsis_testcase/interpretsis_testcase_AppUi.cpp
branchRCL_3
changeset 26 8b7f4e561641
parent 25 7333d7932ef7
child 27 e8965914fac7
equal deleted inserted replaced
25:7333d7932ef7 26:8b7f4e561641
     1 // Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // HelloWorld_CExampleAppUi.cpp
       
    15 // Source file for the implementation of the 
       
    16 // application UI class - CExampleAppUi
       
    17 //
       
    18 
       
    19 #include "interpretsis_testcase.h"
       
    20 
       
    21 //             The second phase constructor of the application UI class.
       
    22 //             The application UI creates and owns the one and only view.
       
    23 // 
       
    24 void CExampleAppUi::ConstructL()
       
    25     {
       
    26 	           // BaseConstructL() completes the UI framework's
       
    27 	           // construction of the App UI.
       
    28     BaseConstructL();
       
    29 	           // Create the single application view in which to
       
    30 	           // draw the text "Hello World!", passing into it
       
    31 	           // the rectangle available to it.
       
    32 	iAppView = CExampleAppView::NewL(ClientRect());
       
    33 	}
       
    34 
       
    35 
       
    36 //             The app Ui owns the two views and is. 
       
    37 //             therefore, responsible for destroying them
       
    38 //
       
    39 CExampleAppUi::~CExampleAppUi()
       
    40 	{
       
    41 	delete iAppView;
       
    42 	}
       
    43 
       
    44 
       
    45 //             Called by the UI framework when a command has been issued.
       
    46 //             In this example, a command can originate through a 
       
    47 //             hot-key press or by selection of a menu item.
       
    48 //             The command Ids are defined in the .hrh file
       
    49 //             and are 'connected' to the hot-key and menu item in the
       
    50 //             resource file.
       
    51 //             Note that the EEikCmdExit is defined by the UI
       
    52 //             framework and is pulled in by including eikon.hrh
       
    53 //
       
    54 void CExampleAppUi::HandleCommandL(TInt aCommand)
       
    55 	{
       
    56 	switch (aCommand)
       
    57 		{
       
    58 		      // Just issue simple info messages to show that
       
    59 		      // the menu items have been selected
       
    60 	case EExampleItem0:
       
    61 		//iEikonEnv->InfoMsg(R_EXAMPLE_TEXT_ITEM0);
       
    62 		break;
       
    63 
       
    64 	
       
    65 	case EExampleItem1:
       
    66 	//	iEikonEnv->InfoMsg(R_EXAMPLE_TEXT_ITEM1);
       
    67 		break;
       
    68 	
       
    69 	case EExampleItem2:
       
    70 	//	iEikonEnv->InfoMsg(R_EXAMPLE_TEXT_ITEM2);
       
    71 		break;
       
    72                // Exit the application. The call is
       
    73 		       // implemented by the UI framework.
       
    74 
       
    75 	case EEikCmdExit: 
       
    76 		Exit();
       
    77 		break;
       
    78 		}
       
    79 	}
       
    80