S60 3rd Edition SDK for Symbian OS
Example Applications Guide

RainAppUi.cpp

00001 /*
00002 * ==============================================================================
00003 *  Name        : RainAppUi.cpp
00004 *  Part of     : OpenGLEx / Rain
00005 *  Interface   : 
00006 *  Description : 
00007 *  Version     : 
00008 *
00009 *  Copyright (c) 2004-2006 Nokia Corporation.
00010 *  This material, including documentation and any related 
00011 *  computer programs, is protected by copyright controlled by 
00012 *  Nokia Corporation.
00013 * ==============================================================================
00014 */
00015 
00016 // INCLUDE FILES
00017 #include "RainAppUi.h"
00018 #include "RainContainer.h" 
00019 #include <Rain.rsg>
00020 #include "rain.hrh"
00021 
00022 #include <avkon.hrh>
00023 
00024 // ================= MEMBER FUNCTIONS =======================
00025 //
00026 // ----------------------------------------------------------
00027 // CRainAppUi::ConstructL()
00028 // 2nd phase constructor
00029 // ----------------------------------------------------------
00030 //
00031 void CRainAppUi::ConstructL()
00032     {
00033     BaseConstructL();
00034     iAppContainer = new (ELeave) CRainContainer;
00035     iAppContainer->SetMopParent(this);
00036     iAppContainer->ConstructL( ClientRect() );
00037     AddToStackL( iAppContainer );
00038     }
00039 
00040 // ----------------------------------------------------
00041 // CRainAppUi::~CRainAppUi()
00042 // Destructor
00043 // Frees reserved resources
00044 // ----------------------------------------------------
00045 //
00046 CRainAppUi::~CRainAppUi()
00047     {
00048     if ( iAppContainer )
00049         {
00050         RemoveFromStack( iAppContainer );
00051         delete iAppContainer;
00052         }
00053    }
00054 
00055 // ------------------------------------------------------------------------------
00056 // CRainAppUi::::DynInitMenuPaneL(TInt aResourceId,CEikMenuPane* aMenuPane)
00057 //  This function is called by the EIKON framework just before it displays
00058 //  a menu pane. Its default implementation is empty, and by overriding it,
00059 //  the application can set the state of menu items dynamically according
00060 //  to the state of application data.
00061 // ------------------------------------------------------------------------------
00062 //
00063 void CRainAppUi::DynInitMenuPaneL(
00064     TInt /*aResourceId*/,CEikMenuPane* /*aMenuPane*/)
00065     {
00066     }
00067 
00068 // ----------------------------------------------------
00069 // CRainAppUi::HandleKeyEventL(
00070 //     const TKeyEvent& aKeyEvent,TEventCode /*aType*/)
00071 // ?implementation_description
00072 // ----------------------------------------------------
00073 //
00074 TKeyResponse CRainAppUi::HandleKeyEventL(
00075     const TKeyEvent& /*aKeyEvent*/,TEventCode /*aType*/)
00076     {
00077     return EKeyWasNotConsumed;
00078     }
00079 
00080 // ----------------------------------------------------
00081 // CRainAppUi::HandleCommandL(TInt aCommand)
00082 // ?implementation_description
00083 // ----------------------------------------------------
00084 //
00085 void CRainAppUi::HandleCommandL(TInt aCommand)
00086     {
00087     switch ( aCommand )
00088         {
00089         case EAknSoftkeyBack:
00090         case EEikCmdExit:
00091             {
00092             Exit();
00093             break;
00094             }
00095         default:
00096             break;      
00097         }
00098     }
00099 
00100 // End of File  

© Nokia 2006

Back to top