2026-04-15 08:24:06 +08:00
|
|
|
#include "Platform/Win32/EditorWindow.h"
|
2026-04-19 15:52:28 +08:00
|
|
|
#include "Platform/Win32/EditorWindowChromeController.h"
|
2026-04-15 08:24:06 +08:00
|
|
|
#include "Platform/Win32/EditorWindowConstants.h"
|
2026-04-19 02:48:41 +08:00
|
|
|
#include "Platform/Win32/EditorWindowInternalState.h"
|
2026-04-15 08:24:06 +08:00
|
|
|
|
2026-04-19 00:03:25 +08:00
|
|
|
#include <algorithm>
|
|
|
|
|
|
2026-04-15 08:24:06 +08:00
|
|
|
#include <windowsx.h>
|
|
|
|
|
|
|
|
|
|
namespace XCEngine::UI::Editor::App {
|
|
|
|
|
|
2026-04-15 22:47:42 +08:00
|
|
|
using namespace EditorWindowInternal;
|
2026-04-15 08:24:06 +08:00
|
|
|
|
|
|
|
|
bool EditorWindow::UpdateBorderlessWindowChromeHover(LPARAM lParam) {
|
2026-04-19 15:52:28 +08:00
|
|
|
return m_chromeController->UpdateChromeHover(*this, lParam);
|
2026-04-15 08:24:06 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool EditorWindow::HandleBorderlessWindowChromeButtonDown(LPARAM lParam) {
|
2026-04-19 15:52:28 +08:00
|
|
|
return m_chromeController->HandleChromeButtonDown(*this, lParam);
|
2026-04-15 08:24:06 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool EditorWindow::HandleBorderlessWindowChromeButtonUp(
|
|
|
|
|
EditorContext& editorContext,
|
|
|
|
|
bool globalTabDragActive,
|
|
|
|
|
LPARAM lParam) {
|
2026-04-19 15:52:28 +08:00
|
|
|
return m_chromeController->HandleChromeButtonUp(
|
|
|
|
|
*this,
|
|
|
|
|
editorContext,
|
|
|
|
|
globalTabDragActive,
|
|
|
|
|
lParam);
|
2026-04-15 08:24:06 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool EditorWindow::HandleBorderlessWindowChromeDoubleClick(
|
|
|
|
|
EditorContext& editorContext,
|
|
|
|
|
bool globalTabDragActive,
|
|
|
|
|
LPARAM lParam) {
|
2026-04-19 15:52:28 +08:00
|
|
|
return m_chromeController->HandleChromeDoubleClick(
|
|
|
|
|
*this,
|
2026-04-15 08:24:06 +08:00
|
|
|
editorContext,
|
|
|
|
|
globalTabDragActive,
|
2026-04-19 15:52:28 +08:00
|
|
|
lParam);
|
2026-04-15 08:24:06 +08:00
|
|
|
}
|
|
|
|
|
|
2026-04-19 00:03:25 +08:00
|
|
|
bool EditorWindow::HandleBorderlessWindowChromeDragRestorePointerMove(
|
|
|
|
|
EditorContext& editorContext,
|
|
|
|
|
bool globalTabDragActive) {
|
2026-04-19 15:52:28 +08:00
|
|
|
return m_chromeController->HandleChromeDragRestorePointerMove(
|
|
|
|
|
*this,
|
2026-04-19 00:03:25 +08:00
|
|
|
editorContext,
|
2026-04-19 15:52:28 +08:00
|
|
|
globalTabDragActive);
|
2026-04-19 00:03:25 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void EditorWindow::ClearBorderlessWindowChromeDragRestoreState() {
|
2026-04-19 15:52:28 +08:00
|
|
|
m_chromeController->ClearChromeDragRestoreState(*this);
|
2026-04-19 00:03:25 +08:00
|
|
|
}
|
|
|
|
|
|
2026-04-15 08:24:06 +08:00
|
|
|
void EditorWindow::ClearBorderlessWindowChromeState() {
|
2026-04-19 15:52:28 +08:00
|
|
|
m_chromeController->ClearChromeState(*this);
|
2026-04-15 08:24:06 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void EditorWindow::ExecuteBorderlessWindowChromeAction(
|
|
|
|
|
EditorContext& editorContext,
|
|
|
|
|
bool globalTabDragActive,
|
|
|
|
|
Host::BorderlessWindowChromeHitTarget target) {
|
2026-04-19 15:52:28 +08:00
|
|
|
m_chromeController->ExecuteChromeAction(*this, editorContext, globalTabDragActive, target);
|
2026-04-15 08:24:06 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
} // namespace XCEngine::UI::Editor::App
|