58 lines
1.4 KiB
C++
58 lines
1.4 KiB
C++
#pragma once
|
|
|
|
#ifndef NOMINMAX
|
|
#define NOMINMAX
|
|
#endif
|
|
|
|
#include <windows.h>
|
|
|
|
#include <filesystem>
|
|
#include <memory>
|
|
|
|
namespace XCEngine::UI::Editor {
|
|
namespace App {
|
|
class EditorContext;
|
|
class EditorWindowManager;
|
|
}
|
|
|
|
namespace Ports {
|
|
class SystemInteractionPort;
|
|
}
|
|
}
|
|
|
|
namespace XCEngine::UI::Editor {
|
|
|
|
class Application final {
|
|
public:
|
|
Application();
|
|
~Application();
|
|
|
|
Application(const Application&) = delete;
|
|
Application& operator=(const Application&) = delete;
|
|
Application(Application&&) = delete;
|
|
Application& operator=(Application&&) = delete;
|
|
|
|
int Run(HINSTANCE hInstance, int nCmdShow);
|
|
|
|
private:
|
|
static LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam);
|
|
|
|
bool Initialize(HINSTANCE hInstance, int nCmdShow);
|
|
void Shutdown();
|
|
bool RegisterWindowClass();
|
|
static std::filesystem::path ResolveRepoRootPath();
|
|
static LONG WINAPI HandleUnhandledException(EXCEPTION_POINTERS* exceptionInfo);
|
|
|
|
HINSTANCE m_hInstance = nullptr;
|
|
ATOM m_windowClassAtom = 0;
|
|
std::filesystem::path m_repoRoot = {};
|
|
std::unique_ptr<App::EditorContext> m_editorContext = {};
|
|
std::unique_ptr<App::EditorWindowManager> m_windowManager = {};
|
|
std::unique_ptr<Ports::SystemInteractionPort> m_systemInteractionHost = {};
|
|
};
|
|
|
|
int RunXCUIEditorApp(HINSTANCE hInstance, int nCmdShow);
|
|
|
|
} // namespace XCEngine::UI::Editor
|
|
|