📄 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 <coecntrl.h>
#include <aknapp.h>
#include <eikenv.h> // for CEikonEnv
#include <eikmenub.h> // for CEikMenuBar
#include <eiksbfrm.h> // 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
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -