sl@0: // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // Part of the MVS Application for TechView sl@0: // sl@0: sl@0: sl@0: #ifndef MVSAPPVIEW_H sl@0: #define MVSAPPVIEW_H sl@0: sl@0: #include sl@0: #include sl@0: #include sl@0: #include sl@0: sl@0: #include "MVSApp.h" sl@0: #include "MVSAppUI.h" sl@0: sl@0: #include "mvsvideocontrol.h" sl@0: sl@0: // sl@0: // sl@0: sl@0: class CMVSFileControl : public CCoeControl sl@0: { sl@0: public: sl@0: static CMVSFileControl* NewL(const CCoeControl& aContainer, sl@0: const TRect& aRect, sl@0: const TDesC& aText); sl@0: ~CMVSFileControl(); sl@0: sl@0: void SetTextL(const TDesC& aText); //Sets the text sl@0: void Draw(const TRect&) const; sl@0: void DrawOtherWindows(CGraphicsContext& aGc, const TRect& aDeviceRect, sl@0: const CFont* aFont) const; sl@0: TRect& Window(); sl@0: sl@0: private: sl@0: void ConstructL(const CCoeControl& aContainer, const TRect& aRect, sl@0: const TDesC& aText); sl@0: CMVSFileControl(); sl@0: sl@0: private: sl@0: HBufC* iText; //The text to draw sl@0: TRect iWindow; //The drawing window sl@0: }; sl@0: sl@0: // sl@0: // sl@0: sl@0: class CMVSStateControl : public CCoeControl sl@0: { sl@0: public: sl@0: // Construction / Destruction // sl@0: static CMVSStateControl* NewL(const CCoeControl& aContainer, sl@0: const TRect& aRect, sl@0: const TDesC& aText); sl@0: ~CMVSStateControl(); sl@0: void SetTextL(const TDesC& aText); //Sets the text sl@0: void Draw(const TRect&) const; sl@0: void DrawOtherWindows(CGraphicsContext& aGc, const TRect& aDeviceRect, sl@0: const CFont* aFont) const; sl@0: TRect& Window(); sl@0: sl@0: private: sl@0: void ConstructL(const CCoeControl& aContainer, const TRect& aRect, sl@0: const TDesC& aText); sl@0: CMVSStateControl(); sl@0: sl@0: private: sl@0: HBufC* iText; //The text to draw sl@0: TRect iWindow; //The drawing window sl@0: }; sl@0: sl@0: // sl@0: // sl@0: sl@0: class CMVSTimeControl : public CCoeControl sl@0: { sl@0: public: sl@0: static CMVSTimeControl* NewL(const CCoeControl& aContainer, sl@0: const TRect& aRect, sl@0: const TDesC& aText); sl@0: ~CMVSTimeControl(); sl@0: void SetTextL(const TDesC& aText); //Sets the text sl@0: void SetText2L(const TDesC& aText); //Sets the text sl@0: void ResetText2L(); sl@0: void Draw(const TRect&) const; sl@0: void DrawOtherWindows(CGraphicsContext& aGc, const TRect& aDeviceRect, sl@0: const CFont* aFont) const; sl@0: TRect& Window(); sl@0: sl@0: private: sl@0: // Private Construction // sl@0: void ConstructL(const CCoeControl& aContainer, const TRect& aRect, sl@0: const TDesC& aText); sl@0: CMVSTimeControl(); sl@0: sl@0: private: sl@0: HBufC* iText; //The text to draw sl@0: HBufC* iText2; sl@0: TRect iWindow; //The drawing window sl@0: }; sl@0: sl@0: sl@0: // sl@0: // sl@0: sl@0: class CMVSInfoControl : public CCoeControl sl@0: { sl@0: public: sl@0: // Construction / Destruction // sl@0: static CMVSInfoControl* NewL(const CCoeControl& aContainer, sl@0: const TRect& aRect, sl@0: const TDesC& aText); sl@0: ~CMVSInfoControl(); sl@0: void SetTextL(const TDesC& aText); //Sets the text sl@0: void Draw(const TRect&) const; sl@0: TRect& Window(); sl@0: sl@0: private: sl@0: // Private Construction // sl@0: void ConstructL(const CCoeControl& aContainer, const TRect& aRect, sl@0: const TDesC& aText); sl@0: CMVSInfoControl(); sl@0: void DrawMainWindow(CGraphicsContext& aGc, const TRect& aDeviceRect, sl@0: const CFont* aFont) const; sl@0: private: sl@0: HBufC* iText; //The text to draw sl@0: TRect iWindow; //The drawing window sl@0: }; sl@0: sl@0: sl@0: // sl@0: // sl@0: class CMVSAppView : public CCoeControl sl@0: { sl@0: public: sl@0: static CMVSAppView* NewL(const TRect& aRect, CMVSVideoPlayAgent& aVideoPlayAgent); sl@0: ~CMVSAppView(); sl@0: sl@0: sl@0: void SetClipLength(TInt& aClipLen); sl@0: void UpdatePlayProgress(TTimeIntervalMicroSeconds& aPos); sl@0: void ResetProgressBar(); sl@0: sl@0: private: // from CCoeControl sl@0: void ConstructL(const TRect& aRect, CMVSVideoPlayAgent& aVideoPlayAgent); sl@0: CMVSAppView(); sl@0: TInt CountComponentControls() const; sl@0: CCoeControl* ComponentControl(TInt aIndex) const; sl@0: void HandlePointerEventL(const TPointerEvent &aPointerEvent); sl@0: sl@0: public: sl@0: CMVSVideoControl* iMainWindowControl; sl@0: CMVSFileControl* iStatusWindowFNameControl; sl@0: CMVSStateControl* iStatusWindowStateControl; sl@0: CMVSTimeControl* iStatusWindowTimeControl; sl@0: CMVSInfoControl* iInfoWindowControl; sl@0: CEikProgressInfo* iProgress; sl@0: private: sl@0: TInt iClipLength; sl@0: }; sl@0: sl@0: // sl@0: //#endif statements sl@0: // sl@0: #endif MVSAPPVIEW_H