/************************************************************************///管理部件//部件自动根据Z顺序调整消息的优先级 /************************************************************************/#ifndef __WIDGETMGR_H__#define __WIDGETMGR_H__#include "GameFrameHead.h"class CXWindow;class CXWidget;class GAMEFRAME_API CWidgetMgr{ public: //消息的优先级,值越大级别越高 enum PRIORITY { TP_BOTTOM = 2, //低级别 TP_NORMAL = 5, //正常级别 TP_TOPMOST = 9, //高级别 };public: ~CWidgetMgr(); static CWidgetMgr* getInstance(); static void destroy(); bool addWnd(CXWindow* pWnd, PRIORITY tpOrder = TP_NORMAL); void eraseWnd(int nId); CXWindow* getWnd(int nId); void clearAllWnd(); //通过配置创建UI CXWindow* loadWidget(CXWidget* pWnd, int nId);private: CWidgetMgr();private: static CWidgetMgr* g_pUiMgr; dequem_deqWnd;};#endif //__WIDGETMGR_H__