refactor(new_editor): tighten app dependency boundaries
This commit is contained in:
33
new_editor/app/Platform/Win32/EditorWindowTransferRequests.h
Normal file
33
new_editor/app/Platform/Win32/EditorWindowTransferRequests.h
Normal file
@@ -0,0 +1,33 @@
|
||||
#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();
|
||||
}
|
||||
};
|
||||
|
||||
struct EditorWindowFrameTransferRequests {
|
||||
std::optional<EditorWindowPanelTransferRequest> beginGlobalTabDrag = {};
|
||||
std::optional<EditorWindowPanelTransferRequest> detachPanel = {};
|
||||
|
||||
bool HasPendingRequests() const {
|
||||
return beginGlobalTabDrag.has_value() || detachPanel.has_value();
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace XCEngine::UI::Editor::App
|
||||
Reference in New Issue
Block a user