sl@0
|
1 |
// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
|
sl@0
|
2 |
// All rights reserved.
|
sl@0
|
3 |
// This component and the accompanying materials are made available
|
sl@0
|
4 |
// under the terms of "Eclipse Public License v1.0"
|
sl@0
|
5 |
// which accompanies this distribution, and is available
|
sl@0
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
sl@0
|
7 |
//
|
sl@0
|
8 |
// Initial Contributors:
|
sl@0
|
9 |
// Nokia Corporation - initial contribution.
|
sl@0
|
10 |
//
|
sl@0
|
11 |
// Contributors:
|
sl@0
|
12 |
//
|
sl@0
|
13 |
// Description:
|
sl@0
|
14 |
// Part of the MVS Application for TechView
|
sl@0
|
15 |
//
|
sl@0
|
16 |
|
sl@0
|
17 |
|
sl@0
|
18 |
#ifndef MVSAPPVIEW_H
|
sl@0
|
19 |
#define MVSAPPVIEW_H
|
sl@0
|
20 |
|
sl@0
|
21 |
#include <gulutil.h>
|
sl@0
|
22 |
#include <techview/eikprogi.h>
|
sl@0
|
23 |
#include <barsread.h>
|
sl@0
|
24 |
#include <mvs/videoplayagent.h>
|
sl@0
|
25 |
|
sl@0
|
26 |
#include "MVSApp.h"
|
sl@0
|
27 |
#include "MVSAppUI.h"
|
sl@0
|
28 |
|
sl@0
|
29 |
#include "mvsvideocontrol.h"
|
sl@0
|
30 |
|
sl@0
|
31 |
//
|
sl@0
|
32 |
//
|
sl@0
|
33 |
|
sl@0
|
34 |
class CMVSFileControl : public CCoeControl
|
sl@0
|
35 |
{
|
sl@0
|
36 |
public:
|
sl@0
|
37 |
static CMVSFileControl* NewL(const CCoeControl& aContainer,
|
sl@0
|
38 |
const TRect& aRect,
|
sl@0
|
39 |
const TDesC& aText);
|
sl@0
|
40 |
~CMVSFileControl();
|
sl@0
|
41 |
|
sl@0
|
42 |
void SetTextL(const TDesC& aText); //Sets the text
|
sl@0
|
43 |
void Draw(const TRect&) const;
|
sl@0
|
44 |
void DrawOtherWindows(CGraphicsContext& aGc, const TRect& aDeviceRect,
|
sl@0
|
45 |
const CFont* aFont) const;
|
sl@0
|
46 |
TRect& Window();
|
sl@0
|
47 |
|
sl@0
|
48 |
private:
|
sl@0
|
49 |
void ConstructL(const CCoeControl& aContainer, const TRect& aRect,
|
sl@0
|
50 |
const TDesC& aText);
|
sl@0
|
51 |
CMVSFileControl();
|
sl@0
|
52 |
|
sl@0
|
53 |
private:
|
sl@0
|
54 |
HBufC* iText; //The text to draw
|
sl@0
|
55 |
TRect iWindow; //The drawing window
|
sl@0
|
56 |
};
|
sl@0
|
57 |
|
sl@0
|
58 |
//
|
sl@0
|
59 |
//
|
sl@0
|
60 |
|
sl@0
|
61 |
class CMVSStateControl : public CCoeControl
|
sl@0
|
62 |
{
|
sl@0
|
63 |
public:
|
sl@0
|
64 |
// Construction / Destruction //
|
sl@0
|
65 |
static CMVSStateControl* NewL(const CCoeControl& aContainer,
|
sl@0
|
66 |
const TRect& aRect,
|
sl@0
|
67 |
const TDesC& aText);
|
sl@0
|
68 |
~CMVSStateControl();
|
sl@0
|
69 |
void SetTextL(const TDesC& aText); //Sets the text
|
sl@0
|
70 |
void Draw(const TRect&) const;
|
sl@0
|
71 |
void DrawOtherWindows(CGraphicsContext& aGc, const TRect& aDeviceRect,
|
sl@0
|
72 |
const CFont* aFont) const;
|
sl@0
|
73 |
TRect& Window();
|
sl@0
|
74 |
|
sl@0
|
75 |
private:
|
sl@0
|
76 |
void ConstructL(const CCoeControl& aContainer, const TRect& aRect,
|
sl@0
|
77 |
const TDesC& aText);
|
sl@0
|
78 |
CMVSStateControl();
|
sl@0
|
79 |
|
sl@0
|
80 |
private:
|
sl@0
|
81 |
HBufC* iText; //The text to draw
|
sl@0
|
82 |
TRect iWindow; //The drawing window
|
sl@0
|
83 |
};
|
sl@0
|
84 |
|
sl@0
|
85 |
//
|
sl@0
|
86 |
//
|
sl@0
|
87 |
|
sl@0
|
88 |
class CMVSTimeControl : public CCoeControl
|
sl@0
|
89 |
{
|
sl@0
|
90 |
public:
|
sl@0
|
91 |
static CMVSTimeControl* NewL(const CCoeControl& aContainer,
|
sl@0
|
92 |
const TRect& aRect,
|
sl@0
|
93 |
const TDesC& aText);
|
sl@0
|
94 |
~CMVSTimeControl();
|
sl@0
|
95 |
void SetTextL(const TDesC& aText); //Sets the text
|
sl@0
|
96 |
void SetText2L(const TDesC& aText); //Sets the text
|
sl@0
|
97 |
void ResetText2L();
|
sl@0
|
98 |
void Draw(const TRect&) const;
|
sl@0
|
99 |
void DrawOtherWindows(CGraphicsContext& aGc, const TRect& aDeviceRect,
|
sl@0
|
100 |
const CFont* aFont) const;
|
sl@0
|
101 |
TRect& Window();
|
sl@0
|
102 |
|
sl@0
|
103 |
private:
|
sl@0
|
104 |
// Private Construction //
|
sl@0
|
105 |
void ConstructL(const CCoeControl& aContainer, const TRect& aRect,
|
sl@0
|
106 |
const TDesC& aText);
|
sl@0
|
107 |
CMVSTimeControl();
|
sl@0
|
108 |
|
sl@0
|
109 |
private:
|
sl@0
|
110 |
HBufC* iText; //The text to draw
|
sl@0
|
111 |
HBufC* iText2;
|
sl@0
|
112 |
TRect iWindow; //The drawing window
|
sl@0
|
113 |
};
|
sl@0
|
114 |
|
sl@0
|
115 |
|
sl@0
|
116 |
//
|
sl@0
|
117 |
//
|
sl@0
|
118 |
|
sl@0
|
119 |
class CMVSInfoControl : public CCoeControl
|
sl@0
|
120 |
{
|
sl@0
|
121 |
public:
|
sl@0
|
122 |
// Construction / Destruction //
|
sl@0
|
123 |
static CMVSInfoControl* NewL(const CCoeControl& aContainer,
|
sl@0
|
124 |
const TRect& aRect,
|
sl@0
|
125 |
const TDesC& aText);
|
sl@0
|
126 |
~CMVSInfoControl();
|
sl@0
|
127 |
void SetTextL(const TDesC& aText); //Sets the text
|
sl@0
|
128 |
void Draw(const TRect&) const;
|
sl@0
|
129 |
TRect& Window();
|
sl@0
|
130 |
|
sl@0
|
131 |
private:
|
sl@0
|
132 |
// Private Construction //
|
sl@0
|
133 |
void ConstructL(const CCoeControl& aContainer, const TRect& aRect,
|
sl@0
|
134 |
const TDesC& aText);
|
sl@0
|
135 |
CMVSInfoControl();
|
sl@0
|
136 |
void DrawMainWindow(CGraphicsContext& aGc, const TRect& aDeviceRect,
|
sl@0
|
137 |
const CFont* aFont) const;
|
sl@0
|
138 |
private:
|
sl@0
|
139 |
HBufC* iText; //The text to draw
|
sl@0
|
140 |
TRect iWindow; //The drawing window
|
sl@0
|
141 |
};
|
sl@0
|
142 |
|
sl@0
|
143 |
|
sl@0
|
144 |
//
|
sl@0
|
145 |
//
|
sl@0
|
146 |
class CMVSAppView : public CCoeControl
|
sl@0
|
147 |
{
|
sl@0
|
148 |
public:
|
sl@0
|
149 |
static CMVSAppView* NewL(const TRect& aRect, CMVSVideoPlayAgent& aVideoPlayAgent);
|
sl@0
|
150 |
~CMVSAppView();
|
sl@0
|
151 |
|
sl@0
|
152 |
|
sl@0
|
153 |
void SetClipLength(TInt& aClipLen);
|
sl@0
|
154 |
void UpdatePlayProgress(TTimeIntervalMicroSeconds& aPos);
|
sl@0
|
155 |
void ResetProgressBar();
|
sl@0
|
156 |
|
sl@0
|
157 |
private: // from CCoeControl
|
sl@0
|
158 |
void ConstructL(const TRect& aRect, CMVSVideoPlayAgent& aVideoPlayAgent);
|
sl@0
|
159 |
CMVSAppView();
|
sl@0
|
160 |
TInt CountComponentControls() const;
|
sl@0
|
161 |
CCoeControl* ComponentControl(TInt aIndex) const;
|
sl@0
|
162 |
void HandlePointerEventL(const TPointerEvent &aPointerEvent);
|
sl@0
|
163 |
|
sl@0
|
164 |
public:
|
sl@0
|
165 |
CMVSVideoControl* iMainWindowControl;
|
sl@0
|
166 |
CMVSFileControl* iStatusWindowFNameControl;
|
sl@0
|
167 |
CMVSStateControl* iStatusWindowStateControl;
|
sl@0
|
168 |
CMVSTimeControl* iStatusWindowTimeControl;
|
sl@0
|
169 |
CMVSInfoControl* iInfoWindowControl;
|
sl@0
|
170 |
CEikProgressInfo* iProgress;
|
sl@0
|
171 |
private:
|
sl@0
|
172 |
TInt iClipLength;
|
sl@0
|
173 |
};
|
sl@0
|
174 |
|
sl@0
|
175 |
//
|
sl@0
|
176 |
//#endif statements
|
sl@0
|
177 |
//
|
sl@0
|
178 |
#endif MVSAPPVIEW_H
|