#pragma once #ifndef NOMINMAX #define NOMINMAX #endif #include #include #include 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 m_editorContext = {}; std::unique_ptr m_windowManager = {}; std::unique_ptr m_systemInteractionHost = {}; }; int RunXCUIEditorApp(HINSTANCE hInstance, int nCmdShow); } // namespace XCEngine::UI::Editor