zoukankan      html  css  js  c++  java
  • CWidgetMgr---H

    /************************************************************************/
    //管理部件
    //部件自动根据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;
        deque<CXWindow*> m_deqWnd;
    
    
    };
    
    #endif //__WIDGETMGR_H__
  • 相关阅读:
    前端面试题(08)
    虚拟的DOM与DOM diff
    前端面试题(07)
    前端面试题(06)
    前端面试题(05)
    前端面试题(04)
    canvas(02绘制图形)
    前端面试题03
    HTB-靶机-Irked
    HTB-靶机-RedCross
  • 原文地址:https://www.cnblogs.com/newlist/p/3155814.html
Copyright © 2011-2022 走看看