Files
XCEngine/new_editor/app/Platform/Win32/WindowMessageDispatcher.h

66 lines
1.6 KiB
C++

#pragma once
#ifndef NOMINMAX
#define NOMINMAX
#endif
#include <windows.h>
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