|
Nokia N97 SDK Example Applications Guide |
00001 /* 00002 * ============================================================================== 00003 * Name : aknexpoplistappui.cpp 00004 * Part of : Popup-list example 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 <avkon.hrh> 00018 #include <barsread.h> 00019 #include <akntitle.h> 00020 #include <aknnavi.h> 00021 #include <akncontext.h> 00022 #include <AknExPopList.rsg> 00023 00024 #include "aknexpoplist.hrh" 00025 #include "AknExPopListAppUi.h" 00026 #include "AknExPopListView.h" 00027 00028 // ========================= MEMBER FUNCTIONS ================================== 00029 00030 // ----------------------------------------------------------------------------- 00031 // CAknExPopListAppUi::ConstructL() 00032 // Symbian 2nd phase constructor can leave. 00033 // ----------------------------------------------------------------------------- 00034 // 00035 void CAknExPopListAppUi::ConstructL() 00036 { 00037 // Initialise app UI with standard value. 00038 BaseConstructL( EAknEnableSkin ); 00039 00040 // Create CAknExPopListView instance and name it view1 00041 CAknExPopListView* view = new( ELeave ) CAknExPopListView; 00042 00043 // Push view1's pointer to CleanupStack 00044 CleanupStack::PushL( view ); 00045 00046 // Construct View1 00047 view->ConstructL(); 00048 00049 // Contruct of View1 ok: Pop view1's pointer from CleanUpStack. 00050 CleanupStack::Pop(); 00051 00052 // Transfer view1's ownership to CAknViewAppUi 00053 AddViewL( view ); 00054 00055 ActivateLocalViewL( view->Id() ); 00056 } 00057 00058 // ----------------------------------------------------------------------------- 00059 // CAknExPopListAppUi::~CAknExPopListAppUi() 00060 // Destructor. 00061 // ----------------------------------------------------------------------------- 00062 // 00063 CAknExPopListAppUi::~CAknExPopListAppUi() 00064 { 00065 } 00066 00067 // ----------------------------------------------------------------------------- 00068 // CAknExPopListAppUi::HandleCommandL() 00069 // Handles the commands. 00070 // ----------------------------------------------------------------------------- 00071 // 00072 void CAknExPopListAppUi::HandleCommandL( TInt aCommand ) 00073 { 00074 switch ( aCommand ) 00075 { 00076 case EEikCmdExit: 00077 case EAknCmdExit: 00078 Exit(); 00079 break; 00080 00081 default: 00082 break; 00083 } 00084 } 00085 00086 // ---------------------------------------------------------------------------- 00087 // void CAknExPopListAppUi::HandleResourceChangeL( TInt aType ) 00088 // Handles resource changes. 00089 // ---------------------------------------------------------------------------- 00090 // 00091 void CAknExPopListAppUi::HandleResourceChangeL( TInt aType ) 00092 { 00093 CAknAppUi::HandleResourceChangeL( aType ); 00094 if ( aType == KEikDynamicLayoutVariantSwitch ) 00095 { 00096 CAknView* view = View( KViewId ); 00097 view->HandleViewRectChange(); 00098 } 00099 } 00100 00101 // End of File
|
© Nokia 2009 |