www.pudn.com > ChineseDisplay.rar > ChineseDisplay1AppUi.cpp
/* ============================================================================ Name : CChineseDisplay1AppUi from ChineseDisplay1Appui.cpp Author : Version : Copyright : Your copyright notice Description : CChineseDisplay1AppUi implementation ============================================================================ */ // INCLUDE FILES #include "ChineseDisplay1Appui.h" #include "ChineseDisplay1Container.h" #include#include "ChineseDisplay1.hrh" #include #include // ================= MEMBER FUNCTIONS ======================= // // ---------------------------------------------------------- // CChineseDisplay1AppUi::ConstructL() // // ---------------------------------------------------------- // void CChineseDisplay1AppUi::ConstructL() { BaseConstructL(); iAppContainer = new (ELeave) CChineseDisplay1Container; iAppContainer->SetMopParent( this ); iAppContainer->ConstructL( ClientRect() ); AddToStackL( iAppContainer ); } // ---------------------------------------------------- // CChineseDisplay1AppUi::~CChineseDisplay1AppUi() // Destructor // Frees reserved resources // ---------------------------------------------------- // CChineseDisplay1AppUi::~CChineseDisplay1AppUi() { if (iAppContainer) { RemoveFromStack( iAppContainer ); delete iAppContainer; } } // ------------------------------------------------------------------------------ // CChineseDisplay1AppUi::DynInitMenuPaneL(TInt aResourceId,CEikMenuPane* aMenuPane) // This function is called by the EIKON framework just before it displays // a menu pane. Its default implementation is empty, and by overriding it, // the application can set the state of menu items dynamically according // to the state of application data. // ------------------------------------------------------------------------------ // void CChineseDisplay1AppUi::DynInitMenuPaneL( TInt /*aResourceId*/,CEikMenuPane* /*aMenuPane*/) { } // ---------------------------------------------------- // CChineseDisplay1AppUi::HandleKeyEventL( // const TKeyEvent& aKeyEvent,TEventCode /*aType*/) // takes care of key event handling // ---------------------------------------------------- // TKeyResponse CChineseDisplay1AppUi::HandleKeyEventL( const TKeyEvent& /*aKeyEvent*/,TEventCode /*aType*/) { return EKeyWasNotConsumed; } // ---------------------------------------------------- // CChineseDisplay1AppUi::HandleCommandL(TInt aCommand) // takes care of command handling // ---------------------------------------------------- // void CChineseDisplay1AppUi::HandleCommandL(TInt aCommand) { switch ( aCommand ) { case EAknSoftkeyBack: case EEikCmdExit: { Exit(); break; } case EChineseDisplay1CmdAppTest: { // Info message shown only in the emulator iEikonEnv->InfoMsg(_L("test")); // Load localized message from the resource file HBufC* message = CEikonEnv::Static()->AllocReadResourceLC(R_MESSAGE_TEXT); // Show information note dialog CAknInformationNote* note = new (ELeave) CAknInformationNote; note->ExecuteLD(message->Des()); CleanupStack::PopAndDestroy(message); break; } // TODO: Add Your command handling code here default: break; } }