diff options
Diffstat (limited to 'symbian/PerlApp.h')
-rw-r--r-- | symbian/PerlApp.h | 58 |
1 files changed, 45 insertions, 13 deletions
diff --git a/symbian/PerlApp.h b/symbian/PerlApp.h index c76d9632c9..04cc0c7db5 100644 --- a/symbian/PerlApp.h +++ b/symbian/PerlApp.h @@ -5,20 +5,31 @@ #ifndef __PerlApp_h__ #define __PerlApp_h__ -#include <aknapp.h> -#include <aknappui.h> -#include <akndoc.h> +#ifdef __SERIES60__ +# include <aknapp.h> +# include <aknappui.h> +# include <akndoc.h> +#endif /* #ifdef __SERIES60__ */ + +#ifdef __SERIES80__ +# include <eikapp.h> +# include <eikappui.h> +# include <eikdoc.h> +# include <eikbctrl.h> +# include <eikgted.h> +#endif /* #ifdef __SERIES60__ */ + #include <coecntrl.h> #include <f32file.h> /* The source code can be compiled into "PerlApp" which is the simple * launchpad application/demonstrator, or into "PerlMin", which is the - * minimal Perl-on-Series-60 application. Define the cpp symbols + * minimal Perl launchpad application. Define the cpp symbols * PerlMin (a boolean), PerlMinUid (the Symbian application uid in * the 0x... format), and PerlMinName (a C wide string, with the L prefix) * to compile as "PerlMin". */ -// #define PerlMinSample +#define PerlMinSample #ifdef PerlMinSample # define PerlMin @@ -35,10 +46,26 @@ # endif #endif -class CPerlAppDocument : public CAknDocument +#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__ */ + +class CPerlAppDocument : public CMyDocument { public: - CPerlAppDocument(CEikApplication& aApp):CAknDocument(aApp) {;} + CPerlAppDocument(CEikApplication& aApp):CMyDocument(aApp) {;} #ifndef PerlMin CFileStore* OpenFileL(TBool aDoOpen, const TDesC& aFilename, RFs& aFs); #endif // #ifndef PerlMin @@ -46,18 +73,19 @@ class CPerlAppDocument : public CAknDocument CEikAppUi* CreateAppUiL(); }; -class CPerlAppApplication : public CAknApplication +class CPerlAppApplication : public CMyApplication { private: CApaDocument* CreateDocumentL(); TUid AppDllUid() const; }; -const TUint KPerlAppOneLinerSize = 80; +const TUint KPerlAppPromptSize = 20; +const TUint KPerlAppOneLinerSize = 128; class CPerlAppView; -class CPerlAppUi : public CAknAppUi +class CPerlAppUi : public CMyAppUi { public: void ConstructL(); @@ -69,18 +97,22 @@ class CPerlAppUi : public CAknAppUi void InstallOrRunL(const TFileName& aFileName); void SetFs(const RFs& aFs); #endif // #ifndef PerlMin - private: + TBuf<KPerlAppOneLinerSize> iOneLiner; // Perl source code to evaluate. CPerlAppView* iAppView; + private: RFs* iFs; - TBuf<KPerlAppOneLinerSize> iOneLiner; }; -class CPerlAppView : public CCoeControl +class CPerlAppView : public CMyAppView { public: static CPerlAppView* NewL(const TRect& aRect); static CPerlAppView* NewLC(const TRect& aRect); + ~CPerlAppView(); void Draw(const TRect& aRect) const; +#ifdef __SERIES80__ + void HandleCommandL(TInt aCommand); +#endif /* #ifdef __SERIES80__ */ private: void ConstructL(const TRect& aRect); }; |