X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=symbian%2FPerlApp.h;h=cbf1963cf4544bed3c599ac94e6e0d29f7c2c007;hb=2c864a0811fbe4cad763045a119f93a241340a2f;hp=12131a4585b81f8b71faaf1d0c9778ac4db92f54;hpb=25ca88e0cbd385e70d7ea2ee4f8a34a9ff7bcc17;p=p5sagit%2Fp5-mst-13.2.git diff --git a/symbian/PerlApp.h b/symbian/PerlApp.h index 12131a4..cbf1963 100644 --- a/symbian/PerlApp.h +++ b/symbian/PerlApp.h @@ -5,30 +5,7 @@ #ifndef __PerlApp_h__ #define __PerlApp_h__ -#ifdef __SERIES60__ -# include -# include -# include -#endif /* #ifdef __SERIES60__ */ - -#ifdef __SERIES80__ -# include -# include -# include -# include -# include -# include -#endif /* #ifdef __SERIES60__ */ - -#ifdef __UIQ__ -# include -# include -# include -# include -#endif /* #ifdef __UIQ____ */ - -#include -#include +#include "PerlUi.h" /* The source code can be compiled into "PerlApp" which is the simple * launchpad application/demonstrator, or into "PerlAppMinimal", which @@ -58,34 +35,10 @@ # endif #endif -#ifdef __SERIES60__ -# define CMyDocument CAknDocument -# define CMyApplication CAknApplication -# define CMyAppUi CAknAppUi -# define CMyNoteDialog CAknNoteDialog -# define CMyAppView CCoeControl -#endif /* #ifdef __SERIES60__ */ - -#ifdef __SERIES80__ -# define CMyDocument CEikDocument -# define CMyApplication CEikApplication -# define CMyAppUi CEikAppUi -# define CMyNoteDialog CCknFlashingDialog -# define CMyAppView CEikBorderedControl -#endif /* #ifdef __SERIES60__ */ - -#ifdef __UIQ__ -# define CMyDocument CEikDocument -# define CMyApplication CQikApplication -# define CMyAppUi CQikAppUi -# define CMyNoteDialog CCknFlashingDialog -# define CMyAppView CCoeControl -#endif /* #ifdef __UIQ__ */ - -class CPerlAppDocument : public CMyDocument +class CPerlAppDocument : public CgPerlUiDocument { public: - CPerlAppDocument(CEikApplication& aApp):CMyDocument(aApp) {;} + CPerlAppDocument(CEikApplication& aApp) : CgPerlUiDocument(aApp) {;} #ifndef PerlAppMinimal CFileStore* OpenFileL(TBool aDoOpen, const TDesC& aFilename, RFs& aFs); #endif // #ifndef PerlAppMinimal @@ -93,67 +46,36 @@ class CPerlAppDocument : public CMyDocument CEikAppUi* CreateAppUiL(); }; -class CPerlAppApplication : public CMyApplication +class CPerlAppApplication : public CPerlUiApplication { private: CApaDocument* CreateDocumentL(); TUid AppDllUid() const; }; -const TUint KPerlAppPromptSize = 20; -const TUint KPerlAppOneLinerSize = 128; +class CPerlAppAppView; -class CPerlAppView; - -class CPerlAppUi : public CMyAppUi +class CPerlAppAppUi : public CPerlUiAppUi { public: - void ConstructL(); - ~CPerlAppUi(); TBool ProcessCommandParametersL(TApaCommand aCommand, TFileName& aDocumentName, const TDesC8& aTail); - void HandleCommandL(TInt aCommand); + void DoHandleCommandL(TInt aCommand); #ifndef PerlAppMinimal void OpenFileL(const TDesC& aFileName); void InstallOrRunL(const TFileName& aFileName); void SetFs(const RFs& aFs); #endif // #ifndef PerlAppMinimal - TBuf iOneLiner; // Perl source code to evaluate. - CPerlAppView* iAppView; + ~CPerlAppAppUi(); private: RFs* iFs; }; -class CPerlAppView : public CMyAppView +class CPerlAppAppView : public CPerlUiAppView { public: - static CPerlAppView* NewL(const TRect& aRect); - static CPerlAppView* NewLC(const TRect& aRect); - ~CPerlAppView(); - void Draw(const TRect& aRect) const; -#if defined(__SERIES80__) || defined(__UIQ__) +#if defined(__SERIES80__) || defined(__SERIES90__) || defined(__UIQ__) void HandleCommandL(TInt aCommand); -#endif /* #if defined(__SERIES80__) || defined(__UIQ__) */ - private: - void ConstructL(const TRect& aRect); -}; - -#if defined(__SERIES80__) || defined(__UIQ__) - -class CPerlAppTextQueryDialog : public CEikDialog -{ - public: - CPerlAppTextQueryDialog(HBufC*& aBuffer); - /* TODO: OfferKeyEventL() so that newline can be seen as 'OK'. */ - HBufC*& iData; - TPtrC iTitle; // used in S80 but not in S60 - TPtrC iPrompt; // used in S60 and S80 - TInt iMaxLength; - protected: - void PreLayoutDynInitL(); - private: - TBool OkToExitL(TInt aKeycode); +#endif /* #if defined(__SERIES80__) || defined(__SERIES90__) || defined(__UIQ__) */ }; -#endif /* #if defined(__SERIES80__) || defined(__UIQ__) */ - #endif // __PerlApp_h__