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

📄 guimanager.h

📁 3D游戏展示程序
💻 H
字号:
//--------------------------------------------------
//  Desc: GUI管理器
//  Date: 2006.11.19 /update
//  Author: artsylee
//
//  Copyright (C) 2006 artsylee
//
//--------------------------------------------------

#ifndef _GUIMANAGER_
#define _GUIMANAGER_

#include <map>
#include "Window.h"
#include "Button.h"
#include "Static.h"
#include "CheckBox.h"
#include "RadioGroup.h"
#include "Slider.h"
#include "ScrollBar.h"
#include "ListBox.h"
#include "NumberInputBox.h"

//--------------------------------------------------
// ID号重复检测
// 
//--------------------------------------------------

class ASE_DLL GUIManager
{
public:
	GUIManager();
	virtual ~GUIManager();

	bool			LoadFromFile(char* szFile);
	void			AddWindowFront(CWindow* pWnd);
	void			AddWindowBack(CWindow* pWnd);
	void			RemoveAll();
	void			RemoveElement(CWindow* pWnd, bool bDel = true);

	void			Render();
	bool			ProcessEvent();

	CWindow*		GetElement(DWORD dwID);

	void			SetAsTopWindow(CWindow* pWnd);
	void			SetAsTopWindow(DWORD dwID);

protected:
	CWindow*		CreateControl(int GuiType, CWindow* pParent);
	bool			FindContainer(CWindow* pWnd);
	bool			FindContainer(DWORD dwID);

protected:
	CWindow*		m_pMainWindow;	//主窗口
	WndList			m_WindowsList;
	std::map<DWORD, CWindow*>	m_ElementMap;	//不包括主窗口ID
};

#endif // _GUIMANAGER_

⌨️ 快捷键说明

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