www.pudn.com > NetTest2nd.rar > NetTestContainer.h
/* ============================================================================ Name : CNetTestContainer from NetTestContainer.h Author : wayne chen Version : 1.13 Copyright : Your copyright notice Description : Declares container control for application. ============================================================================ */ #ifndef _NET_TEST_CONTAINER_H_ #define _NET_TEST_CONTAINER_H_ #include#include #include // for CEikonEnv #include // for CEikMenuBar #include // for CEikScrollBarFrame class CNetTestContainer : public CCoeControl, MCoeControlObserver, MEikScrollBarObserver { private: CFont * iNormalFont ; // the system normal font TRgb iNormalBkColor ; // for background color TRgb iReversBkColor ; // for reverse background color TRgb iNormalFontColor ; // for normal font color TRgb iReversFontColor ; // for revers font color CDesCArray * iMsgStore ; // for body display CEikScrollBarFrame * iScrollBar; // for scroll like system TBool iWordWrap ; TUint iBorderWidth ; TUint iBorderHeight ; TUint iLeftMargin ; TUint iRightMargin ; TUint iTopMargin ; TUint iLineSpace ; TInt iDispLines ; TUint iTopLine ; private: void SetDescArray(CDesCArray ** pdesc, const TDesC& body) ; void SetScrollBarLineCount() ; void DispAll(CWindowGc& gc) const ; TInt DispMsgBody(CWindowGc& gc,TInt& y, TInt line_step) const ; TInt CalcLineChar(const TDesC& info, TInt& thisEnd, TInt& nextStart); TInt CountComponentControls() const; CCoeControl* ComponentControl(TInt aIndex) const; void SizeChanged() ; void Draw(const TRect& aRect) const; void HandleControlEventL(CCoeControl* aControl, TCoeEvent aEventType); TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType); void HandleScrollEventL(CEikScrollBar* aScrollBar, TEikScrollEvent aEventType); public: void ConstructL(const TRect& rc) ; void SetMsgBody(const TDesC& body) ; void InitEditor(const TRect& rc) ; CNetTestContainer() ; ~CNetTestContainer() ; } ; #endif