|
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 * MsgEditor video playback area control. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 |
|
21 // INCLUDE FILES |
|
22 #include "MsgVideoAreaControl.h" |
|
23 |
|
24 // ========================================================== |
|
25 |
|
26 // EXTERNAL DATA STRUCTURES |
|
27 |
|
28 // EXTERNAL FUNCTION PROTOTYPES |
|
29 |
|
30 // CONSTANTS |
|
31 |
|
32 // MACROS |
|
33 |
|
34 // LOCAL CONSTANTS AND MACROS |
|
35 |
|
36 // MODULE DATA STRUCTURES |
|
37 |
|
38 // LOCAL FUNCTION PROTOTYPES |
|
39 |
|
40 // ================= MEMBER FUNCTIONS ======================= |
|
41 |
|
42 // --------------------------------------------------------- |
|
43 // CMsgVideoAreaControl::CMsgAudioControl |
|
44 // |
|
45 // Constructor. |
|
46 // --------------------------------------------------------- |
|
47 // |
|
48 CMsgVideoAreaControl::CMsgVideoAreaControl() |
|
49 { |
|
50 } |
|
51 |
|
52 // --------------------------------------------------------- |
|
53 // CMsgVideoAreaControl::ConstructL |
|
54 // |
|
55 // |
|
56 // --------------------------------------------------------- |
|
57 // |
|
58 void CMsgVideoAreaControl::ConstructL( CCoeControl* aParent ) |
|
59 { |
|
60 CreateWindowL( aParent ); |
|
61 Window().SetNonFading( ETrue ); |
|
62 Window().SetBackgroundColor( KRgbBlack ); |
|
63 |
|
64 ActivateL(); |
|
65 } |
|
66 |
|
67 |
|
68 // --------------------------------------------------------- |
|
69 // CMsgVideoAreaControl::NewL |
|
70 // |
|
71 // Two-phased constructor. |
|
72 // --------------------------------------------------------- |
|
73 // |
|
74 CMsgVideoAreaControl* CMsgVideoAreaControl::NewL( CCoeControl* aParent ) |
|
75 { |
|
76 CMsgVideoAreaControl* self = new( ELeave ) CMsgVideoAreaControl; |
|
77 |
|
78 CleanupStack::PushL( self ); |
|
79 self->ConstructL( aParent ); |
|
80 CleanupStack::Pop( self ); |
|
81 |
|
82 return self; |
|
83 } |
|
84 |
|
85 // --------------------------------------------------------- |
|
86 // CMsgVideoAreaControl::~CMsgVideoAreaControl |
|
87 // |
|
88 // Destructor |
|
89 // --------------------------------------------------------- |
|
90 // |
|
91 CMsgVideoAreaControl::~CMsgVideoAreaControl() |
|
92 { |
|
93 } |
|
94 |
|
95 // --------------------------------------------------------- |
|
96 // CMsgVideoAreaControl::Draw |
|
97 // |
|
98 // Draws video area background. |
|
99 // --------------------------------------------------------- |
|
100 // |
|
101 void CMsgVideoAreaControl::Draw( const TRect& /*aRect*/ ) const |
|
102 { |
|
103 if ( Window().DisplayMode() == EColor16MA ) |
|
104 { |
|
105 CWindowGc& gc = SystemGc(); |
|
106 gc.SetDrawMode( CGraphicsContext::EDrawModeWriteAlpha ); |
|
107 gc.SetBrushColor( TRgb( 0, 0 ) ); |
|
108 gc.Clear(); |
|
109 } |
|
110 } |
|
111 |
|
112 // End of File |