⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 brewlogincanvasbase.h

📁 象棋框架
💻 H
字号:
// BrewLoginCanvasBase.h: interface for the CBrewLoginCanvasBase class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_BREWLOGINCANVASBASE_H__483339BD_159F_4613_9DD2_34BDAE003688__INCLUDED_)
#define AFX_BREWLOGINCANVASBASE_H__483339BD_159F_4613_9DD2_34BDAE003688__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "Itf_BrewCanvas.h"
#include "aeetext.h"
#include "gamevv_res.h"

#define FONT_SPACE 2
#define MAX_RES_STRING_BUF_SIZE 256

#define PERSIST_NOTSAVELOGINFO		0x00000001
#define PERSIST_NOTSHOWDATING		0x00000002
#define PERSIST_NOTSHOWHELP		0x00000004

#define RELEASE(p) {if(p != NULL) p->Release();}
#define RELEASEIF(p,q)  {if(p != NULL) {q##_Release(p); \
p = NULL;} }
#define RETURNIFNOTNULL(p) {if(p != NULL) return p;}
#define TIMEOUT 30000
#define SPLIT 96	//分行符'`'

class CBrewLoginCanvasBase : public IBrewCanvas  
{
public:
	CBrewLoginCanvasBase();
	virtual ~CBrewLoginCanvasBase();
public:
	//void *frame;
	///////////////////////////////////
	IShell* m_pShell;
	AEEDeviceInfo* m_pdi;
	uint16 m_offsetX,m_offsetY;//这些变量在子类的setframe函数中设置
	///////////////////////////////////

	boolean m_bSelLine;
	uint8 m_nFontSpace;
	uint8 m_nVScrollBarWidth;	//垂直滚动条的宽度

	///for background
	int m_nBGID;
	IBitmap* m_bmpBG,*m_pBkgrd;
	AEERect m_rtBG;
	/////////////////

	AECHAR m_pDispText[60];
	int m_nOldID;
	AECHAR* GetDispText(int nID);
	IBitmap* m_pSelTag;

	IDisplay* m_pIDisplay;
	IGraphics* m_pIGraphics;
	AEEFont m_nNowFont;
	int m_nLChSize;
	int m_nNChSize;
	int m_nNowSize;
	int m_cxScreen;
	int m_cyScreen;
	uint16 m_nColorDepth;
	uint8 m_bRedraw;
	int8 m_nTotalLine,m_nCurrent,m_nFirstLine,m_nTotalDisplayLine,m_nControls;
	
	AEERect m_rtInfo;
	IControl** m_aCtls;	
	AECHAR *m_pWelcome;
	boolean m_bTopBar,m_bBottomBar,m_bWelcome,m_bSaveBK;
	AEERect m_rtWelcome;
	int16  m_nWelcome;
	int m_nTitle;
public:
    virtual void setFrame(void *f) = 0;

    void paint(IDisplay *d, IGraphics *g);
    boolean keyPressed(UINT16 code, UINT32 param);
    boolean keyReleased(UINT16 code, UINT32 param);
    boolean keyRepeated(UINT16 code, UINT32 param);
    boolean key(UINT16 code, UINT32 param);
    virtual void Release(){
		delete this;
    }
	
	void GetFitRect(AEERect* pInRtBig,AEERect* pInRtSmall,
		AEERect* pOutRt,uint32 dwFlags);
	void GetTopBarRect(AEERect& rt);
	void GetBottomBarRect(AEERect& rt);	
	int GetLineRect(int whichline,AEERect& rt);	//返回总的行数,除去上下的bar
	virtual void SetActiveCtrl(int8 pos); //0表示当前,-1上一个,1下一个
	IControl* GetActiveCtrl();
	void Invalidate();
	virtual void GetMainRect(AEERect& rt);
	virtual void SetDisplayInfo(IDisplay* d);
	virtual void GetInfoRect()		//显示主要信息的区域,不包含辅助内容
	{
		GetMainRect(m_rtInfo);		
		m_rtInfo.dx -= m_nVScrollBarWidth;
	}
	void DrawScrollBar();
	void DrawBackGround();
	void DrawButton(AEERect* prt,boolean bFill = true);
	void DrawSelTag(int nStrID);
	void SetFont(AEEFont font)
	{
		m_nNowFont = font;
		switch(font)
		{
		case AEE_FONT_NORMAL:
			m_nNowSize = m_nNChSize;
			break;
		case AEE_FONT_LARGE:
			m_nNowSize = m_nLChSize;
			break;
		default:
			break;
		}
	}
	virtual void onSuspend(){};
	virtual void onResume(){};
	virtual boolean onEvent(AEEEvent eCode, UINT16 wParam, UINT32 dwParam)
	{
		return false;
	}
};

#endif // !defined(AFX_BREWLOGINCANVASBASE_H__483339BD_159F_4613_9DD2_34BDAE003688__INCLUDED_)

⌨️ 快捷键说明

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