00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 #ifndef __TXTSHELL_H
00017 #define __TXTSHELL_H
00018 
00019 #include <coecntrl.h>
00020 #include <coeccntx.h>
00021 
00022 #include <eikappui.h>
00023 #include <eikapp.h>
00024 #include <eikdoc.h>
00025 
00026 #include "txtexamp.h"
00027 
00028 
00029 const TUid KUidExampleShellApp= {0xE8000003} ;
00030 
00031 
00032 
00033 
00034 
00035 class TExampleShellModel
00036         
00037         
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     CExampleShellContainer* iContainer;
00105         TExampleShellModel* iModel;
00106     };
00107 
00108 
00109 
00110 
00111 
00112 class CExampleShellApplication : public CEikApplication
00113         {
00114 private: 
00115         CApaDocument* CreateDocumentL();
00116         TUid AppDllUid() const;
00117         };
00118 
00119 #endif