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