|
Nokia N97 SDK Example Applications Guide |
00001 /* 00002 * ============================================================================== 00003 * Name : aknexnoteappui.cpp 00004 * Part of : Note 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 "AknExNoteAppUi.h" 00018 #include "AknExNoteView.h" 00019 #include "AknExNoteConstants.h" 00020 00021 00022 // ========================= MEMBER FUNCTIONS ================================== 00023 00024 // ----------------------------------------------------------------------------- 00025 // CAknExNoteAppUi::CAknExNoteAppUi() 00026 // C++ default constructor can NOT contain any code, that might leave. 00027 // ----------------------------------------------------------------------------- 00028 // 00029 CAknExNoteAppUi::CAknExNoteAppUi() 00030 { 00031 // No implementation required 00032 } 00033 00034 // ----------------------------------------------------------------------------- 00035 // CAknExNoteAppUi::ConstructL() 00036 // Symbian 2nd phase constructor can leave. 00037 // ----------------------------------------------------------------------------- 00038 // 00039 void CAknExNoteAppUi::ConstructL() 00040 { 00041 00042 // Initialise app UI with standard value. 00043 BaseConstructL( EAknEnableSkin ); 00044 00045 // Creates CAknExNoteView class object. 00046 CAknExNoteView* view = new( ELeave ) CAknExNoteView; 00047 00048 // Push CAknExNoteView's pointer into CleanUpStack for safety object construction. 00049 CleanupStack::PushL( view ); 00050 00051 //Construct View 00052 view->ConstructL(); 00053 00054 // View is constructed correctly , Pop it's pointer from CleanUpStack 00055 CleanupStack::Pop(); 00056 00057 // Transfer ownership to CAknViewAppUi. 00058 AddViewL( view ); 00059 00060 ActivateLocalViewL( view->Id() ); 00061 } 00062 00063 // ----------------------------------------------------------------------------- 00064 // CAknExNoteAppUi::~CAknExNoteAppUi() 00065 // Destructor. 00066 // ----------------------------------------------------------------------------- 00067 // 00068 CAknExNoteAppUi::~CAknExNoteAppUi() 00069 { 00070 // No implementation required 00071 } 00072 00073 // ----------------------------------------------------------------------------- 00074 // CAknExNoteAppUi::HandleCommandL() 00075 // Handles the commands. 00076 // ----------------------------------------------------------------------------- 00077 // 00078 void CAknExNoteAppUi::HandleCommandL( TInt aCommand ) 00079 { 00080 switch ( aCommand ) 00081 { 00082 case EEikCmdExit: 00083 Exit(); 00084 break; 00085 default: 00086 break; 00087 } 00088 } 00089 00090 // ---------------------------------------------------------------------------- 00091 // void CAknExNoteAppUi::HandleResourceChangeL( TInt aType ) 00092 // Handles resource changes. 00093 // ---------------------------------------------------------------------------- 00094 // 00095 void CAknExNoteAppUi::HandleResourceChangeL( TInt aType ) 00096 { 00097 CAknAppUi::HandleResourceChangeL( aType ); 00098 if ( aType == KEikDynamicLayoutVariantSwitch ) 00099 { 00100 CAknView* view = View( KViewId ); 00101 view->HandleViewRectChange(); 00102 } 00103 } 00104 00105 // End of File
|
© Nokia 2009 |