Files
XCEngine/editor/app/Composition/EditorWindowWorkspaceStore.h

37 lines
957 B
C
Raw Normal View History

#pragma once
2026-04-25 16:46:01 +08:00
#include <XCEditor/Workspace/UIEditorWindowWorkspaceController.h>
#include <string>
namespace XCEngine::UI::Editor::App {
class EditorWindowWorkspaceStore final {
public:
explicit EditorWindowWorkspaceStore(UIEditorPanelRegistry panelRegistry);
const UIEditorPanelRegistry& GetPanelRegistry() const {
return m_panelRegistry;
}
bool ValidateWindowSet(
const UIEditorWindowWorkspaceSet& windowSet,
std::string& outError) const;
2026-04-25 19:25:49 +08:00
bool TrySetWindowSet(
UIEditorWindowWorkspaceSet windowSet,
std::string& outError);
void ClearWindowSet() {
m_windowSet = {};
}
2026-04-25 19:25:49 +08:00
bool IsPrimaryWindowId(std::string_view windowId) const;
const UIEditorWindowWorkspaceSet& GetWindowSet() const {
return m_windowSet;
}
private:
UIEditorPanelRegistry m_panelRegistry = {};
2026-04-25 19:25:49 +08:00
UIEditorWindowWorkspaceSet m_windowSet = {};
};
} // namespace XCEngine::UI::Editor::App