Nokia N97 SDK
Example Applications Guide

MultiTexAppUi.cpp

00001 /*
00002  * ==============================================================================
00003  *  Name        : MultiTexAppUi.cpp
00004  *  Part of     : OpenGLEx / MultiTex
00005  *
00006  *  Copyright (c) 2004-2006 Nokia Corporation.
00007  *  This material, including documentation and any related
00008  *  computer programs, is protected by copyright controlled by
00009  *  Nokia Corporation.
00010  * ==============================================================================
00011  */
00012 
00013 // INCLUDE FILES
00014 #include "MultiTexAppUi.h"
00015 #include "MultiTexContainer.h"
00016 #include "multitex.hrh"
00017 
00018 #include <MultiTex.rsg>
00019 #include <avkon.hrh>
00020 #include <eikmenup.h>
00021 
00022 // ================= MEMBER FUNCTIONS =======================
00023 //
00024 // ----------------------------------------------------------
00025 // CMultiTexAppUi::ConstructL()
00026 // Symbian 2nd phase constructor can leave.
00027 // ----------------------------------------------------------
00028 //
00029 void CMultiTexAppUi::ConstructL()
00030 {
00031     BaseConstructL();
00032 
00033     iAppContainer = new (ELeave) CMultiTexContainer;
00034     iAppContainer->SetMopParent(this);
00035 
00036     iAppContainer->ConstructL( ClientRect(), this );
00037     AddToStackL( iAppContainer );
00038 }
00039 
00040 // ----------------------------------------------------
00041 // CMultiTexAppUi::~CMultiTexAppUi()
00042 // Destructor
00043 // Frees reserved resources
00044 // ----------------------------------------------------
00045 //
00046 CMultiTexAppUi::~CMultiTexAppUi()
00047 {
00048     if ( iAppContainer )
00049     {
00050         RemoveFromStack( iAppContainer );
00051         delete iAppContainer;
00052     }
00053 }
00054 
00055 // ------------------------------------------------------------------------------
00056 // CMultiTexAppUi::::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 CMultiTexAppUi::DynInitMenuPaneL(
00064   TInt /*aResourceId*/,CEikMenuPane* /*aMenuPane*/)
00065 {
00066 }
00067 
00068 // ----------------------------------------------------
00069 // CMultiTexAppUi::HandleKeyEventL(
00070 //     const TKeyEvent& aKeyEvent,TEventCode /*aType*/)
00071 // Key event handler
00072 // ----------------------------------------------------
00073 //
00074 TKeyResponse CMultiTexAppUi::HandleKeyEventL(
00075   const TKeyEvent& /*aKeyEvent*/ ,TEventCode /*aType*/)
00076 {
00077     return EKeyWasNotConsumed;
00078 }
00079 
00080 // ----------------------------------------------------
00081 // CMultiTexAppUi::HandleCommandL(TInt aCommand)
00082 // Command handler
00083 // ----------------------------------------------------
00084 //
00085 void CMultiTexAppUi::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 2009

Back to top