00001 /* ==================================================================== 00002 * File: TestAppAppView.cpp 00003 * Created: 28/06/06 by Forum Nokia 00004 * Author: 00005 * Copyright (c): , All rights reserved 00006 * ==================================================================== */ 00007 00008 #include <coemain.h> 00009 #include <TestApp.rsg> 00010 00011 #include "TestAppAppView.h" 00012 00013 // Standard construction sequence 00014 CTestAppAppView* CTestAppAppView::NewL(const TRect& aRect) 00015 { 00016 CTestAppAppView* self = CTestAppAppView::NewLC(aRect); 00017 CleanupStack::Pop(self); 00018 return self; 00019 } 00020 00021 CTestAppAppView* CTestAppAppView::NewLC(const TRect& aRect) 00022 { 00023 CTestAppAppView* self = new (ELeave) CTestAppAppView; 00024 CleanupStack::PushL(self); 00025 self->ConstructL(aRect); 00026 return self; 00027 } 00028 00029 CTestAppAppView::CTestAppAppView() 00030 { 00031 // no implementation required 00032 } 00033 00034 CTestAppAppView::~CTestAppAppView() 00035 { 00036 // no implementation required 00037 } 00038 00039 void CTestAppAppView::ConstructL(const TRect& aRect) 00040 { 00041 // Create a window for this application view 00042 CreateWindowL(); 00043 00044 // Set the windows size 00045 SetRect(aRect); 00046 00047 // Activate the window, which makes it ready to be drawn 00048 ActivateL(); 00049 } 00050 00051 // Draw this application's view to the screen 00052 void CTestAppAppView::Draw(const TRect& /*aRect*/) const 00053 { 00054 // Get the standard graphics context 00055 CWindowGc& gc = SystemGc(); 00056 00057 // Gets the control's extent 00058 TRect rect = Rect(); 00059 00060 // Clears the screen 00061 gc.Clear(rect); 00062 } 00063 00064
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.