Update contrib.
1 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // Part of the MVS Application for TechView
22 #include <techview/eikprogi.h>
24 #include <mvs/videoplayagent.h>
29 #include "mvsvideocontrol.h"
34 class CMVSFileControl : public CCoeControl
37 static CMVSFileControl* NewL(const CCoeControl& aContainer,
42 void SetTextL(const TDesC& aText); //Sets the text
43 void Draw(const TRect&) const;
44 void DrawOtherWindows(CGraphicsContext& aGc, const TRect& aDeviceRect,
45 const CFont* aFont) const;
49 void ConstructL(const CCoeControl& aContainer, const TRect& aRect,
54 HBufC* iText; //The text to draw
55 TRect iWindow; //The drawing window
61 class CMVSStateControl : public CCoeControl
64 // Construction / Destruction //
65 static CMVSStateControl* NewL(const CCoeControl& aContainer,
69 void SetTextL(const TDesC& aText); //Sets the text
70 void Draw(const TRect&) const;
71 void DrawOtherWindows(CGraphicsContext& aGc, const TRect& aDeviceRect,
72 const CFont* aFont) const;
76 void ConstructL(const CCoeControl& aContainer, const TRect& aRect,
81 HBufC* iText; //The text to draw
82 TRect iWindow; //The drawing window
88 class CMVSTimeControl : public CCoeControl
91 static CMVSTimeControl* NewL(const CCoeControl& aContainer,
95 void SetTextL(const TDesC& aText); //Sets the text
96 void SetText2L(const TDesC& aText); //Sets the text
98 void Draw(const TRect&) const;
99 void DrawOtherWindows(CGraphicsContext& aGc, const TRect& aDeviceRect,
100 const CFont* aFont) const;
104 // Private Construction //
105 void ConstructL(const CCoeControl& aContainer, const TRect& aRect,
110 HBufC* iText; //The text to draw
112 TRect iWindow; //The drawing window
119 class CMVSInfoControl : public CCoeControl
122 // Construction / Destruction //
123 static CMVSInfoControl* NewL(const CCoeControl& aContainer,
127 void SetTextL(const TDesC& aText); //Sets the text
128 void Draw(const TRect&) const;
132 // Private Construction //
133 void ConstructL(const CCoeControl& aContainer, const TRect& aRect,
136 void DrawMainWindow(CGraphicsContext& aGc, const TRect& aDeviceRect,
137 const CFont* aFont) const;
139 HBufC* iText; //The text to draw
140 TRect iWindow; //The drawing window
146 class CMVSAppView : public CCoeControl
149 static CMVSAppView* NewL(const TRect& aRect, CMVSVideoPlayAgent& aVideoPlayAgent);
153 void SetClipLength(TInt& aClipLen);
154 void UpdatePlayProgress(TTimeIntervalMicroSeconds& aPos);
155 void ResetProgressBar();
157 private: // from CCoeControl
158 void ConstructL(const TRect& aRect, CMVSVideoPlayAgent& aVideoPlayAgent);
160 TInt CountComponentControls() const;
161 CCoeControl* ComponentControl(TInt aIndex) const;
162 void HandlePointerEventL(const TPointerEvent &aPointerEvent);
165 CMVSVideoControl* iMainWindowControl;
166 CMVSFileControl* iStatusWindowFNameControl;
167 CMVSStateControl* iStatusWindowStateControl;
168 CMVSTimeControl* iStatusWindowTimeControl;
169 CMVSInfoControl* iInfoWindowControl;
170 CEikProgressInfo* iProgress;