refactor(new_editor): continue architecture closeout
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
#include "Platform/Win32/EditorWindow.h"
|
||||
#include "Platform/Win32/EditorWindowRuntimeSupport.h"
|
||||
#include "Platform/Win32/EditorWindowRuntimeInternal.h"
|
||||
|
||||
namespace XCEngine::UI::Editor::App {
|
||||
|
||||
using namespace EditorWindowSupport;
|
||||
using namespace EditorWindowInternal;
|
||||
|
||||
EditorWindow::EditorWindow(
|
||||
std::string windowId,
|
||||
@@ -108,62 +108,6 @@ void EditorWindow::ReplaceWorkspaceController(UIEditorWorkspaceController worksp
|
||||
m_composition.workspaceController = std::move(workspaceController);
|
||||
}
|
||||
|
||||
std::optional<EditorWindowPendingTabDragStart> EditorWindow::ConsumePendingTabDragStart() {
|
||||
if (!m_pendingTabDragStart.pending ||
|
||||
m_pendingTabDragStart.nodeId.empty() ||
|
||||
m_pendingTabDragStart.panelId.empty()) {
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
EditorWindowPendingTabDragStart pending = {};
|
||||
pending.nodeId = std::move(m_pendingTabDragStart.nodeId);
|
||||
pending.panelId = std::move(m_pendingTabDragStart.panelId);
|
||||
pending.screenPoint = m_pendingTabDragStart.screenPoint;
|
||||
|
||||
m_pendingTabDragStart = {};
|
||||
return pending;
|
||||
}
|
||||
|
||||
std::optional<EditorWindowPendingDetachRequest> EditorWindow::ConsumeDetachRequest() {
|
||||
if (!m_pendingDetachRequest.pending ||
|
||||
m_pendingDetachRequest.nodeId.empty() ||
|
||||
m_pendingDetachRequest.panelId.empty()) {
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
EditorWindowPendingDetachRequest pending = {};
|
||||
pending.nodeId = std::move(m_pendingDetachRequest.nodeId);
|
||||
pending.panelId = std::move(m_pendingDetachRequest.panelId);
|
||||
pending.screenPoint = m_pendingDetachRequest.screenPoint;
|
||||
|
||||
m_pendingDetachRequest = {};
|
||||
return pending;
|
||||
}
|
||||
|
||||
void EditorWindow::QueuePendingTabDragStart(std::string_view nodeId, std::string_view panelId) {
|
||||
POINT screenPoint = {};
|
||||
if (!GetCursorPos(&screenPoint)) {
|
||||
return;
|
||||
}
|
||||
|
||||
m_pendingTabDragStart.pending = true;
|
||||
m_pendingTabDragStart.nodeId = std::string(nodeId);
|
||||
m_pendingTabDragStart.panelId = std::string(panelId);
|
||||
m_pendingTabDragStart.screenPoint = screenPoint;
|
||||
}
|
||||
|
||||
void EditorWindow::QueuePendingDetachRequest(std::string_view nodeId, std::string_view panelId) {
|
||||
POINT screenPoint = {};
|
||||
if (!GetCursorPos(&screenPoint)) {
|
||||
return;
|
||||
}
|
||||
|
||||
m_pendingDetachRequest.pending = true;
|
||||
m_pendingDetachRequest.nodeId = std::string(nodeId);
|
||||
m_pendingDetachRequest.panelId = std::string(panelId);
|
||||
m_pendingDetachRequest.screenPoint = screenPoint;
|
||||
}
|
||||
|
||||
void EditorWindow::InvalidateHostWindow() const {
|
||||
if (m_window.hwnd != nullptr && IsWindow(m_window.hwnd)) {
|
||||
InvalidateRect(m_window.hwnd, nullptr, FALSE);
|
||||
|
||||
Reference in New Issue
Block a user