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 const TInt KColorBallsMbmMaskIndex = 4;
00036 const TInt KColorBallsMbmLastBallIndex = 3;
00037 const TInt KColorBallsMbmFirstBallIndex = 0;
00038 const TInt KColorBallsAnimFrameDelay = 150; // milliseconds
00039 const TInt KColorBallsAnimXDeflectionIncrement = 20;
00040 const TInt KColorBallsAnimXDeflectionStart = 0;
00041 const TInt KColorBallsAnimXDeflectionTerminalValue = 600;
00042 const TInt KColorBallsAnimYDeflectionOffset = 100;
00043 const TInt KColorBallsAnimYDeflectionMultiplier = 50;
00044 
00045 
00046 _LIT( KColorBallsMbmPath, "Z:\\resource\\apps\\BmpAnimGui\\ColorBalls.mbm"  );
00047 
00048 // Application class
00049 class CExampleApplication : public CEikApplication
00050         {
00051 private:
00052         CApaDocument* CreateDocumentL();
00053         TUid AppDllUid() const;
00054         };
00055 
00056 // View class
00057 class CExampleAppView : public CCoeControl
00058     {
00059 public:
00060         static CExampleAppView* NewL( const TRect& aRect );
00061         CExampleAppView();
00062         ~CExampleAppView();
00063         void ConstructL( const TRect& aRect );  
00064 
00065 public:
00066         RBitmapAnim iBitmapAnimPlayer;
00067 
00068 private:
00069         void Draw( const TRect& /*aRect*/ ) const;
00070         void LoadMbmL( const TDesC& aMbmFile );
00071 
00072 private:
00073         HBufC*  iExampleText;
00074         CBitmapAnimClientData* iAnimFrames;
00075         RAnimDll iAnimDll;
00076         TInt iX;
00077         TInt iY;
00078     };
00079 
00080 // Application UI class
00081 class CExampleAppUi : public CEikAppUi
00082     {
00083 public:
00084         void ConstructL();
00085         ~CExampleAppUi();
00086 
00087 private:
00088         void HandleCommandL(TInt aCommand);
00089 
00090 private:
00091         CExampleAppView* iAppView;
00092         };
00093 
00094 // Document class
00095 class CExampleDocument : public CEikDocument
00096         {
00097 public:
00098         static CExampleDocument* NewL(CEikApplication& aApp);
00099         CExampleDocument(CEikApplication& aApp);
00100         void ConstructL();
00101 private:
00102         CEikAppUi* CreateAppUiL();
00103         };
00104 
00105 
00106 #endif // __BMPANIMGUI_H
00107 

Generated by  doxygen 1.6.2