Refactor editor window synchronization flow
This commit is contained in:
@@ -7,6 +7,8 @@
|
||||
#include "Windowing/EditorWindowShared.h"
|
||||
#include "UtilityWindows/EditorUtilityWindowKind.h"
|
||||
|
||||
#include <XCEditor/Workspace/UIEditorWindowWorkspaceModel.h>
|
||||
|
||||
#include <optional>
|
||||
#include <string>
|
||||
|
||||
@@ -22,6 +24,14 @@ struct EditorWindowPanelTransferRequest {
|
||||
}
|
||||
};
|
||||
|
||||
struct EditorWindowWorkspaceMutationRequest {
|
||||
XCEngine::UI::Editor::UIEditorWindowWorkspaceState windowState = {};
|
||||
|
||||
bool IsValid() const {
|
||||
return !windowState.windowId.empty();
|
||||
}
|
||||
};
|
||||
|
||||
struct EditorWindowOpenUtilityWindowRequest {
|
||||
EditorUtilityWindowKind kind = EditorUtilityWindowKind::None;
|
||||
EditorWindowScreenPoint screenPoint = {};
|
||||
@@ -33,11 +43,13 @@ struct EditorWindowOpenUtilityWindowRequest {
|
||||
};
|
||||
|
||||
struct EditorWorkspaceWindowFrameTransferRequests {
|
||||
std::optional<EditorWindowWorkspaceMutationRequest> workspaceMutation = {};
|
||||
std::optional<EditorWindowPanelTransferRequest> beginGlobalTabDrag = {};
|
||||
std::optional<EditorWindowPanelTransferRequest> detachPanel = {};
|
||||
|
||||
bool HasPendingRequests() const {
|
||||
return beginGlobalTabDrag.has_value() ||
|
||||
return workspaceMutation.has_value() ||
|
||||
beginGlobalTabDrag.has_value() ||
|
||||
detachPanel.has_value();
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user