|
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: Implementation of the CVtUiRemoteVideoControl |
|
15 * control class. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 // INCLUDE FILES |
|
21 #include <cvtlogger.h> |
|
22 #include <eikdef.h> |
|
23 #include <aknincallbubblenotify.h> |
|
24 #include <aknslayeredbackgroundcontrolcontext.h> |
|
25 #include <aknutils.h> |
|
26 #include <aknnavi.h> |
|
27 #include <akntitle.h> |
|
28 #include <akndlgshut.h> |
|
29 #include <aknnotedialog.h> |
|
30 #include <aknnotewrappers.h> |
|
31 #include <akncontext.h> |
|
32 #include <eikspane.h> |
|
33 #include <eikmenup.h> |
|
34 #include <eikmenub.h> |
|
35 #include <apgcli.h> |
|
36 #include <featmgr.h> |
|
37 #include <videotelui.rsg> |
|
38 #include <hlplch.h> |
|
39 #include <apgwgnam.h> |
|
40 #include <stringloader.h> |
|
41 #include <akndef.h> |
|
42 #include <aknconsts.h> |
|
43 #include "CVtUiRemoteVideoControl.h" |
|
44 #include "CVtUiAppUi.h" |
|
45 #include "CVtUiContextControl.h" |
|
46 |
|
47 |
|
48 // Implementation of CVtUiRemoteVideoControl |
|
49 |
|
50 // ----------------------------------------------------------------------------- |
|
51 // CVtUiRemoteVideoControl::NewL |
|
52 // ----------------------------------------------------------------------------- |
|
53 |
|
54 CVtUiRemoteVideoControl* CVtUiRemoteVideoControl::NewL( CVtUiAppUi& aAppUi) |
|
55 { |
|
56 __VTPRINTENTER( "RemoteVideoControl.NewL" ) |
|
57 CVtUiRemoteVideoControl* self = new ( ELeave ) CVtUiRemoteVideoControl(aAppUi); |
|
58 CleanupStack::PushL( self ); |
|
59 self->ConstructL(); |
|
60 CleanupStack::Pop(); // self |
|
61 __VTPRINTEXIT( "RemoteVideoControl.NewL" ) |
|
62 return self; |
|
63 |
|
64 } |
|
65 // --------------------------------------------------------------------------- |
|
66 // CVtUiRemoteVideoControl::~CVtUiRemoteVideoControl |
|
67 // --------------------------------------------------------------------------- |
|
68 // |
|
69 CVtUiRemoteVideoControl::~CVtUiRemoteVideoControl() |
|
70 { |
|
71 __VTPRINTENTER( "RemoteVideoControl.~" ) |
|
72 __VTPRINTEXIT( "RemoteVideoControl.~" ) |
|
73 } |
|
74 |
|
75 // --------------------------------------------------------------------------- |
|
76 // CVtUiRemoteVideoControl::CVtUiVideoControlBase |
|
77 // --------------------------------------------------------------------------- |
|
78 // |
|
79 CVtUiRemoteVideoControl::CVtUiRemoteVideoControl( CVtUiAppUi& aAppUi): |
|
80 iAppUi(aAppUi) |
|
81 { |
|
82 __VTPRINTENTER( "RemoteVideoControl.ctor" ) |
|
83 __VTPRINTEXIT( "RemoteVideoControl.ctor" ) |
|
84 } |
|
85 |
|
86 // --------------------------------------------------------------------------- |
|
87 // CVtUiRemoteVideoControl::BaseConstructL |
|
88 // --------------------------------------------------------------------------- |
|
89 // |
|
90 void CVtUiRemoteVideoControl::ConstructL() |
|
91 { |
|
92 __VTPRINTENTER( "RemoteVideoControl.ConstructL" ) |
|
93 CreateWindowL(); |
|
94 SetExtent( TPoint(), TSize() ); |
|
95 ActivateL(); |
|
96 //Window().SetNonFading( ETrue ); |
|
97 __VTPRINTEXIT( "RemoteVideoControl.ConstructL" ) |
|
98 } |
|
99 |
|
100 RWindow& CVtUiRemoteVideoControl::GetRWindow() |
|
101 { |
|
102 __VTPRINTENTER( "RemoteVideoControl.GetRWindow" ) |
|
103 __VTPRINTEXIT( "RemoteVideoControl.GetRWindow" ) |
|
104 return Window(); |
|
105 } |
|
106 |
|
107 // --------------------------------------------------------------------------- |
|
108 // CVtUiRemoteVideoControl::HandleSizeChanged |
|
109 // --------------------------------------------------------------------------- |
|
110 // |
|
111 void CVtUiRemoteVideoControl::HandleSizeChanged() |
|
112 { |
|
113 __VTPRINTENTER( "RemoteVideoControl.HandleSizeChanged" ) |
|
114 __VTPRINTEXIT( "RemoteVideoControl.HandleSizeChanged" ) |
|
115 } |
|
116 |
|
117 // ----------------------------------------------------------------------------- |
|
118 // CVtUiRemoteVideoControl::SizeChanged |
|
119 // ----------------------------------------------------------------------------- |
|
120 // |
|
121 void CVtUiRemoteVideoControl::SizeChanged() |
|
122 { |
|
123 __VTPRINTENTER( "RemoteVideoControl.SizeChanged" ) |
|
124 TPoint position = Position(); |
|
125 TRect rect = Rect(); |
|
126 __VTPRINT2( DEBUG_GEN, "CVtUiRemoteVideoControl position x:%d", position.iX ) |
|
127 __VTPRINT2( DEBUG_GEN, "CVtUiRemoteVideoControl position y:%d", position.iY ) |
|
128 __VTPRINT2( DEBUG_GEN, "CVtUiRemoteVideoControl rect iTl.x:%d", rect.iTl.iX ) |
|
129 __VTPRINT2( DEBUG_GEN, "CVtUiRemoteVideoControl rect iTl.y:%d", rect.iTl.iY ) |
|
130 __VTPRINT2( DEBUG_GEN, "CVtUiRemoteVideoControl rect iBr.x:%d", rect.iBr.iX ) |
|
131 __VTPRINT2( DEBUG_GEN, "CVtUiRemoteVideoControl rect iBr.y:%d", rect.iBr.iY ) |
|
132 |
|
133 __VTPRINTEXIT( "RemoteVideoControl.SizeChanged" ) |
|
134 } |
|
135 |
|
136 // ----------------------------------------------------------------------------- |
|
137 // CVtUiRemoteVideoControl::PositionChanged |
|
138 // ----------------------------------------------------------------------------- |
|
139 // |
|
140 void CVtUiRemoteVideoControl::PositionChanged() |
|
141 { |
|
142 __VTPRINTENTER( "RemoteVideoControl.PositionChanged" ) |
|
143 __VTPRINTEXIT( "RemoteVideoControl.PositionChanged" ) |
|
144 } |
|
145 |
|
146 // --------------------------------------------------------------------------- |
|
147 // CVtUiRemoteVideoControl::Draw |
|
148 // --------------------------------------------------------------------------- |
|
149 // |
|
150 void CVtUiRemoteVideoControl::Draw( const TRect& ) const |
|
151 { |
|
152 __VTPRINTENTER( "RemoteVideoControl.Draw" ) |
|
153 //DoDraw( SystemGc() ); |
|
154 __VTPRINTEXIT( "RemoteVideoControl.Draw" ) |
|
155 } |
|
156 |
|
157 // --------------------------------------------------------------------------- |
|
158 // CVtUiRemoteVideoControl::DoDraw |
|
159 // --------------------------------------------------------------------------- |
|
160 // |
|
161 void CVtUiRemoteVideoControl::DoDraw( CWindowGc& aGc ) const |
|
162 { |
|
163 __VTPRINTENTER( "RemoteVideoControl.DoDraw(gc)" ) |
|
164 |
|
165 aGc.SetBrushStyle( CGraphicsContext::ESolidBrush ); |
|
166 aGc.SetPenStyle( CGraphicsContext::ENullPen ); |
|
167 aGc.SetBrushColor( KRgbRed ); |
|
168 aGc.DrawRect( Rect() ); |
|
169 aGc.SetBrushStyle( CGraphicsContext::ENullBrush ); |
|
170 |
|
171 TPoint position = Position(); |
|
172 TRect rect = Rect(); |
|
173 __VTPRINT2( DEBUG_GEN, "CVtUiRemoteVideoControl position x:%d", position.iX ) |
|
174 __VTPRINT2( DEBUG_GEN, "CVtUiRemoteVideoControl position y:%d", position.iY ) |
|
175 __VTPRINT2( DEBUG_GEN, "CVtUiRemoteVideoControl rect iTl.x:%d", rect.iTl.iX ) |
|
176 __VTPRINT2( DEBUG_GEN, "CVtUiRemoteVideoControl rect iTl.y:%d", rect.iTl.iY ) |
|
177 __VTPRINT2( DEBUG_GEN, "CVtUiRemoteVideoControl rect iBr.x:%d", rect.iBr.iX ) |
|
178 __VTPRINT2( DEBUG_GEN, "CVtUiRemoteVideoControl rect iBr.y:%d", rect.iBr.iY ) |
|
179 |
|
180 __VTPRINTEXIT( "RemoteVideoControl.DoDraw(gc)" ) |
|
181 } |
|
182 |
|
183 // ----------------------------------------------------------------------------- |
|
184 // CVtUiRemoteVideoControl::HandlePointerEventL |
|
185 // ----------------------------------------------------------------------------- |
|
186 // |
|
187 void CVtUiRemoteVideoControl::HandlePointerEventL( |
|
188 const TPointerEvent& aPointerEvent) |
|
189 { |
|
190 __VTPRINTENTER( "RemoteVideoControl.HandlePointerEventL" ) |
|
191 |
|
192 if(iAppUi.ContextControl().RemoteVideoControl()) |
|
193 { |
|
194 iAppUi.ContextControl().HandlePointerEventL(aPointerEvent); |
|
195 } |
|
196 |
|
197 __VTPRINTEXIT( "RemoteVideoControl.HandlePointerEventL" ) |
|
198 } |
|
199 |
|
200 // ----------------------------------------------------------------------------- |
|
201 // CVtUiRemoteVideoControl::HandleWsEventL |
|
202 // ----------------------------------------------------------------------------- |
|
203 // |
|
204 void CVtUiRemoteVideoControl::HandleWsEventL( const TWsEvent& aEvent, |
|
205 CCoeControl* aDestination ) |
|
206 { |
|
207 __VTPRINTENTER( "RemoteVideoControl.HandleWsEventL" ) |
|
208 |
|
209 if(iAppUi.ContextControl().RemoteVideoControl()) |
|
210 { |
|
211 iAppUi.ContextControl().HandleWsEventL( aEvent, aDestination ); |
|
212 } |
|
213 |
|
214 __VTPRINTEXIT( "RemoteVideoControl.HandleWsEventL" ) |
|
215 } |