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