|
1 /* |
|
2 * Copyright (c) 2002 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 * Draws empty rect. Prevents flickering in mce launch. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 |
|
21 // INCLUDE FILES |
|
22 #include <eikenv.h> |
|
23 #include <aknenv.h> |
|
24 #include "MceMainViewEmptyListContainer.h" |
|
25 |
|
26 |
|
27 // ================= MEMBER FUNCTIONS ======================= |
|
28 |
|
29 // C++ default constructor can NOT contain any code that |
|
30 // might leave. |
|
31 // |
|
32 CMceMainViewEmptyListContainer::CMceMainViewEmptyListContainer() |
|
33 { |
|
34 } |
|
35 |
|
36 // Symbian OS default constructor can leave. |
|
37 void CMceMainViewEmptyListContainer::ConstructL( const TRect& aRect ) |
|
38 { |
|
39 CreateWindowL(); |
|
40 SetRect( aRect ); |
|
41 ActivateL(); |
|
42 MakeVisible( ETrue ); |
|
43 } |
|
44 |
|
45 // Two-phased constructor. |
|
46 CMceMainViewEmptyListContainer* CMceMainViewEmptyListContainer::NewL( const TRect& aRect ) |
|
47 { |
|
48 CMceMainViewEmptyListContainer* self = new ( ELeave ) CMceMainViewEmptyListContainer(); |
|
49 CleanupStack::PushL( self ); |
|
50 self->ConstructL( aRect ); |
|
51 CleanupStack::Pop( self ); |
|
52 return self; |
|
53 } |
|
54 |
|
55 |
|
56 // Destructor |
|
57 CMceMainViewEmptyListContainer::~CMceMainViewEmptyListContainer() |
|
58 { |
|
59 } |
|
60 |
|
61 |
|
62 // --------------------------------------------------------- |
|
63 // CMceMainViewEmptyListContainer::OfferKeyEventL |
|
64 // --------------------------------------------------------- |
|
65 // |
|
66 TKeyResponse CMceMainViewEmptyListContainer::OfferKeyEventL( |
|
67 const TKeyEvent& /*aKeyEvent*/, TEventCode /*aType*/) |
|
68 { |
|
69 return EKeyWasConsumed; |
|
70 } |
|
71 |
|
72 // --------------------------------------------------------- |
|
73 // CMceMainViewEmptyListContainer::Draw |
|
74 // --------------------------------------------------------- |
|
75 // |
|
76 void CMceMainViewEmptyListContainer::Draw(const TRect& /*aRect*/ ) const |
|
77 { |
|
78 CWindowGc& gc = SystemGc(); |
|
79 gc.SetPenColor( AKN_LAF_COLOR ( 0 ) ); // background |
|
80 gc.SetPenStyle( CGraphicsContext::ESolidPen ); |
|
81 gc.SetPenSize( TSize(0,0) ); // no border needed here |
|
82 gc.DrawRect( Rect() ); |
|
83 } |
|
84 |
|
85 // End of File |