|
1 /* |
|
2 * Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 #include <coemain.h> |
|
19 #include <IndicatorTestApp.rsg> |
|
20 |
|
21 #include "IndicatorTestAppAppView.h" |
|
22 |
|
23 // Standard construction sequence |
|
24 CIndicatorTestAppAppView* CIndicatorTestAppAppView::NewL(const TRect& aRect) |
|
25 { |
|
26 CIndicatorTestAppAppView* self = CIndicatorTestAppAppView::NewLC(aRect); |
|
27 CleanupStack::Pop(self); |
|
28 return self; |
|
29 } |
|
30 |
|
31 CIndicatorTestAppAppView* CIndicatorTestAppAppView::NewLC(const TRect& aRect) |
|
32 { |
|
33 CIndicatorTestAppAppView* self = new (ELeave) CIndicatorTestAppAppView; |
|
34 CleanupStack::PushL(self); |
|
35 self->ConstructL(aRect); |
|
36 return self; |
|
37 } |
|
38 |
|
39 CIndicatorTestAppAppView::CIndicatorTestAppAppView() |
|
40 { |
|
41 // no implementation required |
|
42 } |
|
43 |
|
44 CIndicatorTestAppAppView::~CIndicatorTestAppAppView() |
|
45 { |
|
46 // no implementation required |
|
47 } |
|
48 |
|
49 void CIndicatorTestAppAppView::ConstructL(const TRect& aRect) |
|
50 { |
|
51 // Create a window for this application view |
|
52 CreateWindowL(); |
|
53 |
|
54 // Set the windows size |
|
55 SetRect(aRect); |
|
56 |
|
57 // Activate the window, which makes it ready to be drawn |
|
58 ActivateL(); |
|
59 } |
|
60 |
|
61 // Draw this application's view to the screen |
|
62 void CIndicatorTestAppAppView::Draw(const TRect& /*aRect*/) const |
|
63 { |
|
64 // Get the standard graphics context |
|
65 CWindowGc& gc = SystemGc(); |
|
66 |
|
67 // Gets the control's extent |
|
68 TRect rect = Rect(); |
|
69 |
|
70 // Clears the screen |
|
71 gc.Clear(rect); |
|
72 } |
|
73 |
|
74 |