#include <coemain.h>

#include "${PrjName}AppView.h"

// Standard construction sequence
C${PrjName}AppView *C${PrjName}AppView::NewL(const TRect& aRect)
{
    C${PrjName}AppView *self = C${PrjName}AppView::NewLC(aRect);
    CleanupStack::Pop(self);
    return self;
}

C${PrjName}AppView *C${PrjName}AppView::NewLC(const TRect& aRect)
{
    C${PrjName}AppView *self = new(ELeave) C${PrjName}AppView;
    CleanupStack::PushL(self);
    self->ConstructL(aRect);
    return self;
}

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

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

void C${PrjName}AppView::ConstructL(const TRect& aRect)
{
    // Create a window for this application view
    CreateWindowL();

    // Set the windows size
    SetRect(aRect);

    // Activate the window, which makes it ready to be drawn
    ActivateL();
}

// Draw this application's view to the screen
void C${PrjName}AppView::Draw(const TRect& /*aRect*/) const
{
    // Get the standard graphics context 
    CWindowGc &gc = SystemGc();
    
    // Gets the control's extent
    TRect rect = Rect();
    
    // Clears the screen
    gc.Clear(rect);
}
