50 lines
1.5 KiB
C
50 lines
1.5 KiB
C
|
|
#pragma once
|
||
|
|
|
||
|
|
#include "Composition/EditorWindowWorkspaceStore.h"
|
||
|
|
|
||
|
|
#include <XCEditor/Workspace/UIEditorWorkspaceController.h>
|
||
|
|
|
||
|
|
#include <string>
|
||
|
|
#include <string_view>
|
||
|
|
|
||
|
|
namespace XCEngine::UI::Editor::App {
|
||
|
|
|
||
|
|
class EditorWindowSystem final {
|
||
|
|
public:
|
||
|
|
explicit EditorWindowSystem(UIEditorPanelRegistry panelRegistry);
|
||
|
|
|
||
|
|
const UIEditorPanelRegistry& GetPanelRegistry() const;
|
||
|
|
|
||
|
|
bool BootstrapPrimaryWindow(
|
||
|
|
std::string_view primaryWindowId,
|
||
|
|
const UIEditorWorkspaceController& workspaceController,
|
||
|
|
std::string& outError);
|
||
|
|
|
||
|
|
bool ValidateWindowSet(
|
||
|
|
const UIEditorWindowWorkspaceSet& windowSet,
|
||
|
|
std::string& outError) const;
|
||
|
|
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;
|
||
|
|
UIEditorWindowWorkspaceController BuildWorkspaceMutationController() const;
|
||
|
|
|
||
|
|
UIEditorWindowWorkspaceOperationResult EvaluateDetachPanelToNewWindow(
|
||
|
|
std::string_view sourceWindowId,
|
||
|
|
std::string_view sourceNodeId,
|
||
|
|
std::string_view panelId,
|
||
|
|
UIEditorWindowWorkspaceController& outController) const;
|
||
|
|
|
||
|
|
private:
|
||
|
|
EditorWindowWorkspaceStore m_workspaceStore;
|
||
|
|
};
|
||
|
|
|
||
|
|
} // namespace XCEngine::UI::Editor::App
|