1 /* |
|
2 * Copyright (c) 2004 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: Application View for map and navigation test provider |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #include <coemain.h> |
|
20 #include <aknlists.h> |
|
21 #include <barsread.h> |
|
22 |
|
23 #include "testproviderappview.h" |
|
24 |
|
25 // ============================ MEMBER FUNCTIONS =============================== |
|
26 |
|
27 // ----------------------------------------------------------------------------- |
|
28 // CTestProviderAppView::NewL() |
|
29 // Two-phased constructor. |
|
30 // ----------------------------------------------------------------------------- |
|
31 // |
|
32 CTestProviderAppView* CTestProviderAppView::NewL( const TRect& aRect ) |
|
33 { |
|
34 CTestProviderAppView* self = CTestProviderAppView::NewLC( aRect ); |
|
35 CleanupStack::Pop( self ); |
|
36 return self; |
|
37 } |
|
38 |
|
39 // ----------------------------------------------------------------------------- |
|
40 // CTestProviderAppView::NewLC() |
|
41 // Two-phased constructor. |
|
42 // ----------------------------------------------------------------------------- |
|
43 // |
|
44 CTestProviderAppView* CTestProviderAppView::NewLC( const TRect& aRect ) |
|
45 { |
|
46 CTestProviderAppView* self = new ( ELeave ) CTestProviderAppView; |
|
47 CleanupStack::PushL( self ); |
|
48 self->ConstructL( aRect ); |
|
49 return self; |
|
50 } |
|
51 |
|
52 // ----------------------------------------------------------------------------- |
|
53 // CTestProviderAppView::ConstructL() |
|
54 // Symbian 2nd phase constructor can leave. |
|
55 // ----------------------------------------------------------------------------- |
|
56 // |
|
57 void CTestProviderAppView::ConstructL( const TRect& aRect ) |
|
58 { |
|
59 // Create a window for this application view |
|
60 CreateWindowL(); |
|
61 |
|
62 // Set the windows size |
|
63 SetRect( aRect ); |
|
64 |
|
65 // Activate the window, which makes it ready to be drawn |
|
66 ActivateL(); |
|
67 } |
|
68 |
|
69 // ----------------------------------------------------------------------------- |
|
70 // CTestProviderAppView::CTestProviderAppView() |
|
71 // C++ default constructor can NOT contain any code, that might leave. |
|
72 // ----------------------------------------------------------------------------- |
|
73 // |
|
74 CTestProviderAppView::CTestProviderAppView() |
|
75 { |
|
76 // No implementation required |
|
77 } |
|
78 |
|
79 |
|
80 // ----------------------------------------------------------------------------- |
|
81 // CTestProviderAppView::~CTestProviderAppView() |
|
82 // Destructor. |
|
83 // ----------------------------------------------------------------------------- |
|
84 // |
|
85 CTestProviderAppView::~CTestProviderAppView() |
|
86 { |
|
87 //delete iList; |
|
88 //iList = NULL; |
|
89 } |
|
90 |
|
91 |
|
92 // ----------------------------------------------------------------------------- |
|
93 // CTestProviderAppView::Draw() |
|
94 // Draws the display. |
|
95 // ----------------------------------------------------------------------------- |
|
96 // |
|
97 void CTestProviderAppView::Draw( const TRect& /*aRect*/ ) const |
|
98 { |
|
99 // Get the standard graphics context |
|
100 CWindowGc& gc = SystemGc(); |
|
101 |
|
102 // Gets the control's extent |
|
103 TRect rect = Rect(); |
|
104 |
|
105 // Clears the screen |
|
106 gc.Clear( rect ); |
|
107 } |
|
108 |
|