Unify dock leaves around single-tab stacks

This commit is contained in:
2026-04-10 21:50:31 +08:00
parent b187c8970b
commit 977a4cf2a4
14 changed files with 258 additions and 195 deletions

View File

@@ -96,15 +96,6 @@ struct UIEditorDockHostSplitterLayout {
bool active = false;
};
struct UIEditorDockHostPanelLayout {
std::string nodeId = {};
std::string panelId = {};
std::string title = {};
bool active = false;
UIEditorPanelFrameState frameState = {};
UIEditorPanelFrameLayout frameLayout = {};
};
struct UIEditorDockHostTabStackLayout {
std::string nodeId = {};
std::string selectedPanelId = {};
@@ -119,7 +110,6 @@ struct UIEditorDockHostTabStackLayout {
struct UIEditorDockHostLayout {
::XCEngine::UI::UIRect bounds = {};
std::vector<UIEditorDockHostSplitterLayout> splitters = {};
std::vector<UIEditorDockHostPanelLayout> panels = {};
std::vector<UIEditorDockHostTabStackLayout> tabStacks = {};
};

View File

@@ -78,6 +78,12 @@ UIEditorWorkspaceNode BuildUIEditorWorkspacePanel(
std::string title,
bool placeholder = false);
UIEditorWorkspaceNode BuildUIEditorWorkspaceSingleTabStack(
std::string nodeId,
std::string panelId,
std::string title,
bool placeholder = false);
UIEditorWorkspaceNode BuildUIEditorWorkspaceTabStack(
std::string nodeId,
std::vector<UIEditorWorkspaceNode> panels,
@@ -93,6 +99,9 @@ UIEditorWorkspaceNode BuildUIEditorWorkspaceSplit(
UIEditorWorkspaceValidationResult ValidateUIEditorWorkspace(
const UIEditorWorkspaceModel& workspace);
UIEditorWorkspaceModel CanonicalizeUIEditorWorkspaceModel(
UIEditorWorkspaceModel workspace);
std::vector<UIEditorWorkspaceVisiblePanel> CollectUIEditorWorkspaceVisiblePanels(
const UIEditorWorkspaceModel& workspace);