12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- #pragma once
- #include <vector>
- #include <mutex>
- #include <map>
- #include "string.h"
- #include "dt.h"
- #include "CLog.h"
- typedef enum
- {
- CLOSE_BUTTON = 0x1,
- STOP_BUTTON = 0x2,
- REPEAT_BUTTON = 0x4,
- IGNORE_BUTTON = 0x8,
- }BUTTON_TYPE;
- typedef struct
- {
- int eViewButton;
- LogStream::LogLevel iLevel;
- long iId;
- std::string strDescribe;
- std::string strTip;
- std::string strHelp;
- }MESSAGE_INFO;
- typedef BUTTON_TYPE(*CallMessageBox) (MESSAGE_INFO stMsgInfo);
- class __declspec(dllexport) CMessageBox
- {
- private:
- static std::mutex m_Mutex;
- static CMessageBox* m_pMessageBox;
- std::vector<MESSAGE_INFO> m_vecMessageBox;
- CallMessageBox m_funCallMessageBox = nullptr;
- std::mutex m_PopBoxMutex;
-
-
-
- long Init();
- void AddPopMassage(MESSAGE_INFO stMsgInfo);
- void ErasePopMassage(int iId);
- public:
-
- static long GetInstance(CMessageBox** pMsgBox);
- void SetCallMessageBoxFunc(CallMessageBox func);
-
- void ClearAllPopMassage();
- BUTTON_TYPE PopMassageBox(int eViewButton, LogStream::LogLevel iLevel, long iId,
- std::string strDescribe, std::string strTip="", std::string strHelp = "");
- };
|