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