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

54 lines
1.4 KiB
C++

#pragma once
#include <XCEditor/Workspace/UIEditorWindowWorkspaceController.h>
#include <XCEditor/Workspace/UIEditorWorkspaceController.h>
#include <string>
#include <string_view>
namespace XCEngine::UI::Editor::App::Internal {
class EditorWindowWorkspaceStore final {
public:
explicit EditorWindowWorkspaceStore(UIEditorPanelRegistry panelRegistry);
const UIEditorPanelRegistry& GetPanelRegistry() const {
return m_panelRegistry;
}
bool HasState() const {
return !m_windowSet.windows.empty();
}
const UIEditorWindowWorkspaceSet& GetWindowSet() const {
return m_windowSet;
}
UIEditorWindowWorkspaceController BuildMutationController() const;
bool RegisterWindowProjection(
std::string_view windowId,
bool primary,
const UIEditorWorkspaceController& workspaceController,
std::string& outError);
bool CommitWindowProjection(
std::string_view windowId,
const UIEditorWorkspaceController& workspaceController,
std::string& outError);
bool ValidateWindowSet(
const UIEditorWindowWorkspaceSet& windowSet,
std::string& outError) const;
void ReplaceWindowSet(UIEditorWindowWorkspaceSet windowSet);
void RemoveWindow(std::string_view windowId, bool primary);
private:
UIEditorPanelRegistry m_panelRegistry = {};
UIEditorWindowWorkspaceSet m_windowSet = {};
};
} // namespace XCEngine::UI::Editor::App::Internal