editor: switch workspace window sync to projection payload

This commit is contained in:
2026-04-26 01:39:03 +08:00
parent 306fa521ff
commit 67f52c69de
16 changed files with 371 additions and 90 deletions

View File

@@ -154,6 +154,13 @@ const UIEditorWorkspaceController* EditorWindow::TryGetWorkspaceController() con
: nullptr;
}
const EditorWorkspaceWindowProjection* EditorWindow::TryGetWorkspaceProjection() const {
const EditorWindowWorkspaceBinding* workspaceBinding = m_runtime->TryGetWorkspaceBinding();
return workspaceBinding != nullptr
? workspaceBinding->TryGetWorkspaceProjection()
: nullptr;
}
const UIEditorWorkspaceController& EditorWindow::GetWorkspaceController() const {
const UIEditorWorkspaceController* workspaceController = TryGetWorkspaceController();
assert(workspaceController != nullptr);
@@ -197,10 +204,10 @@ void EditorWindow::SetTitle(std::wstring title) {
m_session->SetTitle(std::move(title));
}
void EditorWindow::ReplaceWorkspaceController(UIEditorWorkspaceController workspaceController) {
void EditorWindow::RefreshWorkspaceProjection(EditorWorkspaceWindowProjection projection) {
EditorWindowWorkspaceBinding* workspaceBinding = m_runtime->TryGetWorkspaceBinding();
assert(workspaceBinding != nullptr);
workspaceBinding->ReplaceWorkspaceController(std::move(workspaceController));
workspaceBinding->RefreshWorkspaceProjection(std::move(projection));
}
void EditorWindow::InvalidateHostWindow() const {