examples/Graphics/coverflow/inc/dialogbox.h

Go to the documentation of this file.
00001 // dialogbox.h
00002 /*
00003  * Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
00004  * All rights reserved.
00005  * This component and the accompanying materials are made available
00006  * under the terms of "Eclipse Public License v1.0"
00007  * which accompanies this distribution, and is available
00008  * at the URL "http://www.eclipse.org/legal/epl-v10.html".
00009  */
00010 //
00015 #ifndef __DIALOGBOX_H__
00016 #define __DIALOGBOX_H__
00017 
00018 #include <e32std.h>
00019 #include <e32base.h>
00020 #include <w32std.h>
00021 #include <gdi.h>
00022 #include <e32math.h>
00023 
00024 // Location of the bitmap images for
00025 // incoming call animation.
00026 #ifdef __WINS__
00027 // Location of images for the emulator build.
00028         _LIT(KCallBitmaps1,"z:\\resource\\apps\\incoming1.mbm");
00029         _LIT(KCallBitmaps2,"z:\\resource\\apps\\incoming2.mbm");
00030         _LIT(KCallBitmaps3,"z:\\resource\\apps\\incoming3.mbm");
00031         _LIT(KCallBitmaps4,"z:\\resource\\apps\\incoming4.mbm");
00032         _LIT(KCallBitmaps5,"z:\\resource\\apps\\incoming5.mbm");
00033         _LIT(KCallBitmaps6,"z:\\resource\\apps\\incoming6.mbm");
00034 #else
00035 // Location of images for the hardware build.
00036         _LIT(KCallBitmaps1,"e:\\resource\\apps\\incoming1.mbm");
00037         _LIT(KCallBitmaps2,"e:\\resource\\apps\\incoming2.mbm");
00038         _LIT(KCallBitmaps3,"e:\\resource\\apps\\incoming3.mbm");
00039         _LIT(KCallBitmaps4,"e:\\resource\\apps\\incoming4.mbm");
00040         _LIT(KCallBitmaps5,"e:\\resource\\apps\\incoming5.mbm");
00041         _LIT(KCallBitmaps6,"e:\\resource\\apps\\incoming6.mbm");
00042 #endif
00043 
00044 class CLoader;
00052 class CDialogBox : public CBase
00053         {
00054 public:
00055         static CDialogBox* NewL(const TRect&);
00056         ~CDialogBox();
00057 
00058         void Start();
00059         void Stop();
00060 
00061         void SetSemiTransparency();
00062         void RemoveSemiTransparency();
00063         TBool IsSemiTransparent() { return iSemiTransFlag;}
00064 
00065 private:
00066         CDialogBox(const TRect&);
00067         void ConstructL();
00068         static TInt OnTick(TAny*);
00069         TBool Draw();
00070 
00071 private:
00075         RWsSession iWs;
00079         RWindowGroup iGrp;
00084         RWindow iWin;
00088         CWsScreenDevice* iScr;
00092         CWindowGc* iGc;
00096         TRect iRect;
00100         TInt iImageCounter;
00104         TBool iSemiTransFlag;
00108         CFbsBitmap* iCallFrame;
00112         CFbsBitmap* iCallMaskFrame;
00116         RPointerArray<CFbsBitmap> iCallBuffer;
00121         RPointerArray<CLoader> iLoaders;
00127         CPeriodic* iTimer;
00128         };
00129 
00133 class CLoader: public CBase
00134         {
00135 public:
00136         static CLoader* NewL(const TDesC& aFn);
00137         ~CLoader();
00138         void Decode();
00139 
00140 private:
00141         CLoader();
00142         void ConstructL(const TDesC& aFn);
00143 
00144 #ifdef PORTRAIT_MODE
00145         void RotateL(CFbsBitmap& aBitmap);
00146 #endif
00147 
00148 public:
00152         CFbsBitmap* iMask;
00156         CFbsBitmap* iBitmap;
00157         };
00158 
00159 #endif
00160 

Generated by  doxygen 1.6.2