messageviewer.h

来自「Simple Jabber Client for Symbian Platfor」· C头文件 代码 · 共 58 行

H
58
字号

#ifndef __CMESSAGEVIEWER_H__
#define __CMESSAGEVIEWER_H__
#include <eiksbobs.h>
#include <coecntrl.h>
#include <txtfmlyr.h>
#include <MdaImageConverter.h>

class CEikRichTextEditor;
class TEikScrollBarModel;
class CEikScrollBarFrame;

class CMessageItem;
class CMessageModel;

class CMessageViewer : public CCoeControl, public MCoeControlObserver,MEikScrollBarObserver
	{
	// Demonstrates the use of rich text
public:
	CMessageViewer(const TRect& aRect); 
	~CMessageViewer(); // destructor

public:
	TInt CountComponentControls() const;
	CCoeControl* ComponentControl(TInt aIndex) const;
	void Draw(const TRect& aRect) const;

	TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType);
	void HandleControlEventL(CCoeControl* aControl,TCoeEvent aEventType);
	void HandleScrollEventL(CEikScrollBar* aScrollBar, TEikScrollEvent aEventType);

	void CreateScrollBars();
	void ActivateL();
	void Quit();
	void SetModel( CMessageModel * aModel );
	void SetMessageItem( CMessageItem* aItem );
	void SetFont( CFont* aFont );

private:
	void GetLineNum();
	void AddIndex();
	void SubIndex();

private:
	TEikScrollBarModel	iSBModel;
	CEikScrollBarFrame*	iSBFrame ;
	CMessageModel*		iModel;
	CMessageItem*		iItem;
	TInt				iIndex;
	TInt				iStartLine;
	TInt				iStartRow;
	TInt				iLines;
	TInt				iLinesInClient;
	TRect				iRect;
	CFont*				iFont;
};

#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?