#include <avkon.hrh>
#include <aknnotewrappers.h> 

#include "${PrjName}.pan"
#include "${PrjName}AppUi.h"
#include "${PrjName}AppView.h"
#include "${PrjName}.hrh"

// ConstructL is called by the application framework
void C${PrjName}AppUi::ConstructL()
{
	// load the menu, etc. configuration from the resources
    BaseConstructL();

    // create the AppView - the control that will be able to draw on the screen
    iAppView = C${PrjName}AppView::NewL(ClientRect());    
    
    // required e.g. to display scroll buttons
    iAppView->SetMopParent(this);

    // add the control to the control stack - it will recieve key press events
    AddToStackL(iAppView);
}

C${PrjName}AppUi::C${PrjName}AppUi()                              
{
	// no implementation required
}

C${PrjName}AppUi::~C${PrjName}AppUi()
{
    if (iAppView)
    {
        RemoveFromStack(iAppView);
        delete iAppView;
        iAppView = NULL;
    }
}

// handle any menu commands. This function is called if the user selects an
// option from the menu of the softkeys defined in the resources file
void C${PrjName}AppUi::HandleCommandL(TInt aCommand)
{
    switch(aCommand)
    {
        case EEikCmdExit:
        case EAknSoftkeyExit:
            Exit();
            break;

        case E${PrjName}Command1:
        {
            _LIT(message,"Hello!");
            CAknInformationNote *informationNote = new(ELeave) CAknInformationNote;
            informationNote->ExecuteLD(message);
        }
        break;

        default:
            Panic(E${PrjName}BasicUi);
            break;
    }
}



