2026-04-19 02:48:41 +08:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#ifndef NOMINMAX
|
|
|
|
|
#define NOMINMAX
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#include <windows.h>
|
|
|
|
|
|
|
|
|
|
#include <optional>
|
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
|
|
namespace XCEngine::UI::Editor::App {
|
|
|
|
|
|
|
|
|
|
struct EditorWindowPanelTransferRequest {
|
|
|
|
|
std::string nodeId = {};
|
|
|
|
|
std::string panelId = {};
|
|
|
|
|
POINT screenPoint = {};
|
|
|
|
|
|
|
|
|
|
bool IsValid() const {
|
|
|
|
|
return !nodeId.empty() && !panelId.empty();
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
2026-04-21 00:57:14 +08:00
|
|
|
struct EditorWindowOpenDetachedPanelRequest {
|
|
|
|
|
std::string panelId = {};
|
|
|
|
|
POINT screenPoint = {};
|
|
|
|
|
LONG preferredWidth = 0;
|
|
|
|
|
LONG preferredHeight = 0;
|
|
|
|
|
|
|
|
|
|
bool IsValid() const {
|
|
|
|
|
return !panelId.empty();
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
2026-04-19 02:48:41 +08:00
|
|
|
struct EditorWindowFrameTransferRequests {
|
|
|
|
|
std::optional<EditorWindowPanelTransferRequest> beginGlobalTabDrag = {};
|
|
|
|
|
std::optional<EditorWindowPanelTransferRequest> detachPanel = {};
|
2026-04-21 00:57:14 +08:00
|
|
|
std::optional<EditorWindowOpenDetachedPanelRequest> openDetachedPanel = {};
|
2026-04-19 02:48:41 +08:00
|
|
|
|
|
|
|
|
bool HasPendingRequests() const {
|
2026-04-21 00:57:14 +08:00
|
|
|
return beginGlobalTabDrag.has_value() ||
|
|
|
|
|
detachPanel.has_value() ||
|
|
|
|
|
openDetachedPanel.has_value();
|
2026-04-19 02:48:41 +08:00
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // namespace XCEngine::UI::Editor::App
|