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__
  • 相关阅读:
    Queue
    List
    面试1
    野指针和空指针
    指针的定义和使用
    多文件编程
    函数声明
    函数样式
    字符串比较
    函数的定义和使用
  • 原文地址:https://www.cnblogs.com/newlist/p/3155814.html
Copyright © 2011-2022 走看看