#pragma once #ifndef NOMINMAX #define NOMINMAX #endif #include namespace XCEngine::UI::Editor { namespace App { class EditorWindow; } } namespace XCEngine::UI::Editor::Host { class WindowMessageHost; class WindowMessageDispatcher { public: static bool TryDispatch( HWND hwnd, WindowMessageHost& windowHost, App::EditorWindow& window, UINT message, WPARAM wParam, LPARAM lParam, LRESULT& outResult); private: struct DispatchContext; static void RenderAndValidateWindow(const DispatchContext& context); static bool EnsureTrackingMouseLeave(const DispatchContext& context); static bool TryHandleChromeHoverConsumption( const DispatchContext& context, LPARAM lParam, LRESULT& outResult); static bool TryDispatchWindowPointerMessage( const DispatchContext& context, UINT message, WPARAM wParam, LPARAM lParam, LRESULT& outResult); static bool TryDispatchWindowInputMessage( const DispatchContext& context, UINT message, WPARAM wParam, LPARAM lParam, LRESULT& outResult); static bool TryDispatchWindowLifecycleMessage( const DispatchContext& context, UINT message, WPARAM wParam, LPARAM lParam, LRESULT& outResult); static bool TryDispatchWindowChromeMessage( const DispatchContext& context, UINT message, WPARAM wParam, LPARAM lParam, LRESULT& outResult); }; } // namespace XCEngine::UI::Editor::Host