examples/AppFramework/BmpAnim/BmpAnimGui.h

00001 // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
00002 // All rights reserved.
00003 // License: "Symbian Foundation License v1.0" to Symbian Foundation
00004 // members and "Symbian Foundation End User License Agreement v1.0"
00005 // to non-members at the URL
00006 // "http://www.symbianfoundation.org/legal/licencesv10.html".
00007 //
00008 // Initial Contributors:
00009 // Nokia Corporation - initial contribution.
00010 //
00011 // Contributors:
00012 //
00013 // Description:
00014 //
00015 
00016 #ifndef __BMPANIMGUI_H
00017 #define __BMPANIMGUI_H
00018 
00019 #include <coeccntx.h>
00020 
00021 #include <eikenv.h>
00022 #include <eikappui.h>
00023 #include <eikapp.h>
00024 #include <eikdoc.h>
00025 #include <eikmenup.h>
00026 #include <eikstart.h> 
00027 #include <math.h>
00028 
00029 #include <bmpancli.h>
00030 #include <eikon.hrh>
00031 
00032 #include <bmpanimgui.rsg>
00033 #include "BmpAnimGui.hrh"
00034 
00035 #include <fbs.h> 
00036 #include <mw/bmpancli.h> 
00037 
00038 
00039 
00040 
00041 
00042 const TInt KColorBallsMbmMaskIndex = 4;
00043 const TInt KColorBallsMbmLastBallIndex = 3;
00044 const TInt KColorBallsMbmFirstBallIndex = 0;
00045 const TInt KColorBallsAnimFrameDelay = 150; // milliseconds
00046 const TInt KColorBallsAnimXDeflectionIncrement = 20;
00047 const TInt KColorBallsAnimXDeflectionStart = 0;
00048 const TInt KColorBallsAnimXDeflectionTerminalValue = 600;
00049 const TInt KColorBallsAnimYDeflectionOffset = 100;
00050 const TInt KColorBallsAnimYDeflectionMultiplier = 50;
00051 
00052 
00053 _LIT( KColorBallsMbmPath, "Z:\\resource\\apps\\BmpAnimGui\\ColorBalls.mbm"  );
00054 
00055 // Application class
00056 class CExampleApplication : public CEikApplication
00057         {
00058 private:
00059         CApaDocument* CreateDocumentL();
00060         TUid AppDllUid() const;
00061         };
00062 
00063 // View class
00064 class CExampleAppView : public CCoeControl
00065     {
00066 public:
00067         static CExampleAppView* NewL( const TRect& aRect );
00068         CExampleAppView();
00069         ~CExampleAppView();
00070         void ConstructL( const TRect& aRect );  
00071 
00072 public:
00073         RBitmapAnim iBitmapAnimPlayer;
00074 
00075 private:
00076         void Draw( const TRect& /*aRect*/ ) const;
00077         void LoadMbmL( const TDesC& aMbmFile );
00078 
00079 private:
00080         HBufC*  iExampleText;
00081         CBitmapAnimClientData* iAnimFrames;
00082         RAnimDll iAnimDll;
00083         TInt iX;
00084         TInt iY;
00085     };
00086 
00087 // Application UI class
00088 class CExampleAppUi : public CEikAppUi
00089     {
00090 public:
00091         void ConstructL();
00092         ~CExampleAppUi();
00093 
00094 private:
00095         void HandleCommandL(TInt aCommand);
00096 
00097 private:
00098         CExampleAppView* iAppView;
00099         };
00100 
00101 // Document class
00102 class CExampleDocument : public CEikDocument
00103         {
00104 public:
00105         static CExampleDocument* NewL(CEikApplication& aApp);
00106         CExampleDocument(CEikApplication& aApp);
00107         void ConstructL();
00108 private:
00109         CEikAppUi* CreateAppUiL();
00110         };
00111 
00112 
00113 #endif // __BMPANIMGUI_H
00114 

Generated by  doxygen 1.6.2