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

39 lines
1.1 KiB
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);
bool UpsertWindowState(
const UIEditorWindowWorkspaceState& windowState,
bool primary,
std::string& outError);
void RemoveWindowState(std::string_view windowId, bool primary);
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