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

37 lines
957 B
C++

#pragma once
#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;
bool TrySetWindowSet(
UIEditorWindowWorkspaceSet windowSet,
std::string& outError);
void ClearWindowSet() {
m_windowSet = {};
}
bool IsPrimaryWindowId(std::string_view windowId) const;
const UIEditorWindowWorkspaceSet& GetWindowSet() const {
return m_windowSet;
}
private:
UIEditorPanelRegistry m_panelRegistry = {};
UIEditorWindowWorkspaceSet m_windowSet = {};
};
} // namespace XCEngine::UI::Editor::App