2018-10-07 03:42:33 +00:00
|
|
|
#pragma once
|
2015-08-18 05:54:43 +00:00
|
|
|
|
2019-09-22 21:52:05 +00:00
|
|
|
#include <functional>
|
2016-02-05 01:27:03 +00:00
|
|
|
#include <memory>
|
2019-09-22 21:52:05 +00:00
|
|
|
#include <string>
|
2015-08-20 02:52:07 +00:00
|
|
|
|
2019-09-22 21:52:05 +00:00
|
|
|
#include "Runtime/RetroTypes.hpp"
|
2016-08-05 23:48:53 +00:00
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
namespace urde {
|
2015-08-22 01:58:41 +00:00
|
|
|
class CArchitectureMessage;
|
|
|
|
class CArchitectureQueue;
|
2015-08-18 05:54:43 +00:00
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
class CIOWin {
|
|
|
|
std::string x4_name;
|
|
|
|
size_t m_nameHash;
|
|
|
|
|
2015-08-20 02:52:07 +00:00
|
|
|
public:
|
2018-12-08 05:30:43 +00:00
|
|
|
enum class EMessageReturn { Normal = 0, Exit = 1, RemoveIOWinAndExit = 2, RemoveIOWin = 3 };
|
2020-03-26 01:25:11 +00:00
|
|
|
explicit CIOWin(std::string_view name) : x4_name(name) { m_nameHash = std::hash<std::string_view>()(name); }
|
2019-09-30 22:18:53 +00:00
|
|
|
|
|
|
|
virtual ~CIOWin() = default;
|
2018-12-08 05:30:43 +00:00
|
|
|
virtual EMessageReturn OnMessage(const CArchitectureMessage&, CArchitectureQueue&) = 0;
|
|
|
|
virtual bool GetIsContinueDraw() const { return true; }
|
|
|
|
virtual void Draw() const {}
|
|
|
|
virtual void PreDraw() const {}
|
2019-09-30 22:18:53 +00:00
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
std::string_view GetName() const { return x4_name; }
|
|
|
|
size_t GetNameHash() const { return m_nameHash; }
|
2015-08-18 05:54:43 +00:00
|
|
|
};
|
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
} // namespace urde
|