|
Nokia N97 SDK Example Applications Guide |
00001 /** 00002 * Copyright (c) 2007 Nokia Corporation. 00003 * This material, including documentation and any related 00004 * computer programs, is protected by 00005 * copyright controlled by Nokia Corporation. 00006 */ 00007 00008 00009 00010 // INCLUDE FILES 00011 #include <longtapdetectorexample.rsg> 00012 00013 #include "longtapdetectorexappui.h" 00014 #include "longtapdetectorex.hrh" 00015 #include "longtapdetectorexcontainer.h" 00016 00017 00018 // ============================ MEMBER FUNCTIONS =============================== 00019 00020 // ----------------------------------------------------------------------------- 00021 // CLongTapDetectorExAppUi::ConstructL() 00022 // Symbian 2nd phase constructor can leave. 00023 // ----------------------------------------------------------------------------- 00024 // 00025 void CLongTapDetectorExAppUi::ConstructL() 00026 { 00027 BaseConstructL( EAknEnableSkin ); 00028 00029 iAppContainer = new ( ELeave ) CLongTapDetectorExContainer(); 00030 iAppContainer->SetMopParent( this ); 00031 iAppContainer->ConstructL( ClientRect() ); 00032 00033 AddToStackL( iAppContainer ); 00034 } 00035 00036 // ----------------------------------------------------------------------------- 00037 // CLongTapDetectorExAppUi::CLongTapDetectorExAppUi() 00038 // C++ default constructor can NOT contain any code, that might leave. 00039 // ----------------------------------------------------------------------------- 00040 // 00041 CLongTapDetectorExAppUi::CLongTapDetectorExAppUi() 00042 { 00043 // no implementation required 00044 } 00045 00046 // ----------------------------------------------------------------------------- 00047 // CLongTapDetectorExAppUi::~CLongTapDetectorExAppUi() 00048 // Destructor. 00049 // ----------------------------------------------------------------------------- 00050 // 00051 CLongTapDetectorExAppUi::~CLongTapDetectorExAppUi() 00052 { 00053 if ( iAppContainer ) 00054 { 00055 RemoveFromStack( iAppContainer ); 00056 delete iAppContainer; 00057 } 00058 } 00059 00060 // ----------------------------------------------------------------------------- 00061 // CLongTapDetectorExAppUi::HandleCommandL() 00062 // Takes care of command handling. 00063 // ----------------------------------------------------------------------------- 00064 // 00065 void CLongTapDetectorExAppUi::HandleCommandL( TInt aCommand ) 00066 { 00067 switch( aCommand ) 00068 { 00069 case EEikCmdExit: 00070 case EAknSoftkeyExit: 00071 Exit(); 00072 break; 00073 default: 00074 return; 00075 } 00076 iAppContainer->DrawDeferred(); 00077 } 00078 00079 // ---------------------------------------------------------------------------- 00080 // void CLongTapDetectorExAppUi::HandleResourceChangeL( TInt aType ) 00081 // Handles resource changes. 00082 // ---------------------------------------------------------------------------- 00083 // 00084 /*void CLongTapDetectorExAppUi::HandleResourceChangeL( TInt aType ) 00085 { 00086 CAknAppUi::HandleResourceChangeL( aType ); 00087 if ( aType == KEikDynamicLayoutVariantSwitch ) 00088 { 00089 iAppContainer->SizeChanged(); 00090 } 00091 }*/
|
© Nokia 2009 |