S60 3rd Edition SDK for Symbian OS
Example Applications Guide

MultiTexAppUi.cpp

00001 /*
00002 * ==============================================================================
00003 *  Name        : MultiTexAppUi.cpp
00004 *  Part of     : OpenGLEx / MultiTex
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 "MultiTexAppUi.h"
00018 #include "MultiTexContainer.h" 
00019 #include "multitex.hrh"
00020 
00021 #include <MultiTex.rsg>
00022 #include <avkon.hrh>
00023 #include <eikmenup.h>
00024 
00025 // ================= MEMBER FUNCTIONS =======================
00026 //
00027 // ----------------------------------------------------------
00028 // CMultiTexAppUi::ConstructL()
00029 // Symbian 2nd phase constructor can leave.
00030 // ----------------------------------------------------------
00031 //
00032 void CMultiTexAppUi::ConstructL()
00033 {
00034     BaseConstructL();
00035 
00036     iAppContainer = new (ELeave) CMultiTexContainer;
00037     iAppContainer->SetMopParent(this);
00038 
00039     iAppContainer->ConstructL( ClientRect() );
00040     AddToStackL( iAppContainer );
00041 }
00042 
00043 // ----------------------------------------------------
00044 // CMultiTexAppUi::~CMultiTexAppUi()
00045 // Destructor
00046 // Frees reserved resources
00047 // ----------------------------------------------------
00048 //
00049 CMultiTexAppUi::~CMultiTexAppUi()
00050 {
00051     if ( iAppContainer )
00052     {
00053         RemoveFromStack( iAppContainer );
00054         delete iAppContainer;
00055     }
00056 }
00057 
00058 // ------------------------------------------------------------------------------
00059 // CMultiTexAppUi::::DynInitMenuPaneL(TInt aResourceId,CEikMenuPane* aMenuPane)
00060 //  This function is called by the EIKON framework just before it displays
00061 //  a menu pane. Its default implementation is empty, and by overriding it,
00062 //  the application can set the state of menu items dynamically according
00063 //  to the state of application data.
00064 // ------------------------------------------------------------------------------
00065 //
00066 void CMultiTexAppUi::DynInitMenuPaneL(
00067   TInt /*aResourceId*/,CEikMenuPane* /*aMenuPane*/)
00068 {
00069 }
00070 
00071 // ----------------------------------------------------
00072 // CMultiTexAppUi::HandleKeyEventL(
00073 //     const TKeyEvent& aKeyEvent,TEventCode /*aType*/)
00074 // Key event handler
00075 // ----------------------------------------------------
00076 //
00077 TKeyResponse CMultiTexAppUi::HandleKeyEventL(
00078   const TKeyEvent& /*aKeyEvent*/ ,TEventCode /*aType*/)
00079 {
00080     return EKeyWasNotConsumed;
00081 }
00082 
00083 // ----------------------------------------------------
00084 // CMultiTexAppUi::HandleCommandL(TInt aCommand)
00085 // Command handler
00086 // ----------------------------------------------------
00087 //
00088 void CMultiTexAppUi::HandleCommandL(TInt aCommand)
00089 {
00090     switch ( aCommand )
00091     {
00092         case EAknSoftkeyBack:
00093         case EEikCmdExit:
00094         {
00095             Exit();
00096             break;
00097         }
00098         default:
00099             break;      
00100     }
00101 }
00102 
00103 // End of File  

© Nokia 2006

Back to top