www.pudn.com > Example2D.rar > Example2DAppui.cpp
/* * ============================================================================ * Name : CExample2DAppUi from Example2DAppui.cpp * Part of : Example2D * Created : 23.09.2005 by * Implementation notes: * Initial content was generated by Series 90 Application Wizard. * Version : * Copyright: * ============================================================================ */ #define KLayoutAware 0x08 // ELayoutAwareAppFlag is not defined in pre-FP3 SDK's // INCLUDE FILES #include "Example2DAppui.h" #include "Example2DContainer.h" #ifdef __SERIES_60__ #include#include #else #include #include #endif void CExample2DAppUi::ConstructL() { BaseConstructL( ENoAppResourceFile | KLayoutAware ); // On S60, set key block mode to allow multiple simultaneous keypresses #if defined(__SERIES_60__) || defined(__SERIES60_30__) SetKeyBlockMode( ENoKeyBlock ); #endif iAppContainer = new (ELeave) CExample2DContainer; iAppContainer->ConstructL( ClientRect() ); AddToStackL( iAppContainer ); iEikonEnv->RootWin().EnableScreenChangeEvents(); } CExample2DAppUi::~CExample2DAppUi() { if (iAppContainer) { RemoveFromStack( iAppContainer ); delete iAppContainer; } } void CExample2DAppUi::HandleCommandL( TInt aCommand ) { switch ( aCommand ) { case EEikCmdExit: { Exit(); break; } default: break; } } void CExample2DAppUi::HandleWsEventL(const TWsEvent& aEvent, CCoeControl* aControl) { CAknAppUi::HandleWsEventL(aEvent, aControl); if ( aEvent.Type() == EEventScreenDeviceChanged ) { iAppContainer->HandleScreenDeviceChanged(); } } // End of file