00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 #ifndef __BitmapsGraphicsShell_H
00018 #define __BitmapsGraphicsShell_H
00019 
00020 #include <coecntrl.h>
00021 #include <coeccntx.h>
00022 
00023 #include <eikappui.h>
00024 #include <eikapp.h>
00025 #include <eikdoc.h>
00026 
00027 #include "BitmapsGraphicsControl.h"
00028 
00029 
00030 
00031 const TUid KUidExampleShellApp={ 0xE800004F };
00032 
00033 
00034 
00035 
00036 
00037 class TExampleShellModel
00038         {
00039 public:
00040         TExampleShellModel();
00041         TBool Differs(const TExampleShellModel* aCompare) const;
00042 public:
00043         TFileName iLibrary; 
00044         };
00045 
00046 
00047 
00048 
00049 
00050 class CExampleShellContainer : public CCoeControl,
00051                 public MCoeControlBrushContext,
00052                 public MGraphicsExampleObserver
00053     {
00054 public:
00055     void ConstructL(const TRect& aRect, TExampleShellModel* aModel);
00056     ~CExampleShellContainer();
00057         
00058         void ResetExampleL(CGraphicExampleControl* aExample);
00059 private: 
00060         void Draw(const TRect& ) const;
00061         TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType);
00062     TInt CountComponentControls() const;
00063     CCoeControl* ComponentControl(TInt aIndex) const;
00064 private: 
00065         void NotifyGraphicExampleFinished();
00066 public: 
00067         void NotifyStatus(const TDesC& aMessage);
00068 private: 
00069         void CreateLabelL();
00070 private: 
00071         CGraphicExampleControl* iExampleControl; 
00072         CEikLabel* iLabel; 
00073         
00074         TExampleShellModel* iModel;
00075     };
00076 
00077 
00078 
00079 
00080 
00081 class CExampleShellDocument : public CEikDocument
00082         {
00083 public:
00084         CExampleShellDocument(CEikApplication& aApp): CEikDocument(aApp) { }
00085         TExampleShellModel* Model() { return(&iModel); }
00086 private: 
00087         CEikAppUi* CreateAppUiL();
00088 private:
00089         TExampleShellModel iModel;
00090         };
00091 
00092 
00093 
00094 
00095 
00096 class CExampleShellAppUi : public CEikAppUi
00097     {
00098 public:
00099     void ConstructL();
00100         ~CExampleShellAppUi();
00101 private: 
00102         void HandleCommandL(TInt aCommand);
00103 private: 
00104 
00105 private:
00106     CExampleShellContainer* iContainer;
00107         TExampleShellModel* iModel;
00108     };
00109 
00110 
00111 
00112 
00113 
00114 class CExampleShellApplication : public CEikApplication
00115         {
00116 private: 
00117         CApaDocument* CreateDocumentL();
00118         TUid AppDllUid() const;
00119         };
00120 
00121 #endif