EmailExampleViews.h
上传用户:sempras
上传日期:2007-03-04
资源大小:821k
文件大小:3k
- #ifndef __EMAILEXAMPLEVIEWS_H__
- #define __EMAILEXAMPLEVIEWS_H__
- #include <coecntrl.h>
- #include <bamdesca.h>
- #include <eiklbo.h>
- class CEikTextListBox;
- class CEikColumnListBox;
- class CEmailExampleEngine;
- class CEmailMainWindow;
- class CCknAppTitle;
- /*
- * ============================================================================
- * Name : CEmailView from CEmailExampleViews.h
- * Part of : EmailExample
- * Created : 09/11/2003 by Forum Nokia
- * Implementation notes:
- * abstract email view implemented as a simple list box view with a title
- *
- * Version : 1.0
- * Copyright: Nokia Corporation
- * ============================================================================
- */
- class CEmailView : public CCoeControl, public MDesCArray, public MEikListBoxObserver
- {
- public:
- virtual void MailCountChange();
- virtual void HandleCommandL(TInt aCommand)=0;
- protected:
- // protected creational
- CEmailView(CEmailMainWindow& aParent);
- virtual ~CEmailView();
- void ConstructL(TInt aTitleRes);
- // interface for child classes to implement
- virtual void OpenEmailL()=0;
- // private functions
- private:
- // from CCoeControl
- void SizeChanged();
- CCoeControl* ComponentControl(TInt aIndex) const;
- TInt CountComponentControls() const;
- void Draw(const TRect& aRect) const;
- TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType);
- // protected data
- protected:
- CEmailMainWindow& iParent;
- CEikColumnListBox* iListBox;
- // private data
- private:
- CCknAppTitle* iTitle;
- };
- /*
- * ============================================================================
- * Name : CRemoteView from CEmailExampleViews.h
- * Part of : EmailExample
- * Created : 09/11/2003 by Forum Nokia
- * Implementation notes:
- * implements the email view to display the remote mail
- *
- * Version : 1.0
- * Copyright: Nokia Corporation
- * ============================================================================
- */
- class CRemoteView : public CEmailView
- {
- public:
- // creational
- static CRemoteView* NewL(CEmailMainWindow& aParent);
- virtual ~CRemoteView();
- // interface
- void HandleCommandL(TInt aCommand);
- // private functions
- private:
- CRemoteView(CEmailMainWindow& aParent);
- // from CEmailView
- void OpenEmailL();
- // from MEikListBoxObserver
- void HandleListBoxEventL(CEikListBox* aListBox, TListBoxEvent aEventType);
- // from MDesCArray
- TInt MdcaCount() const;
- TPtrC MdcaPoint(TInt aIndex) const;
- void DoGetFormatedText(TInt aIndex) const;
- private:
- mutable TBuf<255> iText;
- };
- #endif //__EMAILEXAMPLEVIEWS_H__