refactor editor ui host and shell asset layout
This commit is contained in:
@@ -1,61 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include <XCEditor/Foundation/UIEditorShortcutManager.h>
|
||||
#include <XCEditor/Shell/UIEditorPanelRegistry.h>
|
||||
#include <XCEditor/Shell/UIEditorShellInteraction.h>
|
||||
#include <XCEditor/Shell/UIEditorWorkspaceModel.h>
|
||||
#include <XCEditor/Shell/UIEditorWorkspaceSession.h>
|
||||
|
||||
#include <cstdint>
|
||||
#include <filesystem>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
namespace XCEngine::UI::Editor {
|
||||
|
||||
struct EditorShellShortcutAsset {
|
||||
UIEditorCommandRegistry commandRegistry = {};
|
||||
std::vector<XCEngine::UI::UIShortcutBinding> bindings = {};
|
||||
};
|
||||
|
||||
struct EditorShellAsset {
|
||||
std::string screenId = "editor.shell";
|
||||
std::filesystem::path documentPath = {};
|
||||
std::filesystem::path captureRootPath = {};
|
||||
UIEditorPanelRegistry panelRegistry = {};
|
||||
UIEditorWorkspaceModel workspace = {};
|
||||
UIEditorWorkspaceSession workspaceSession = {};
|
||||
UIEditorShellInteractionDefinition shellDefinition = {};
|
||||
EditorShellShortcutAsset shortcutAsset = {};
|
||||
};
|
||||
|
||||
enum class EditorShellAssetValidationCode : std::uint8_t {
|
||||
None = 0,
|
||||
InvalidPanelRegistry,
|
||||
InvalidWorkspace,
|
||||
InvalidWorkspaceSession,
|
||||
InvalidShellMenuModel,
|
||||
InvalidShortcutConfiguration,
|
||||
MissingPanelDescriptor,
|
||||
PanelTitleMismatch,
|
||||
PanelPlaceholderMismatch,
|
||||
DuplicateShellPresentationPanelId,
|
||||
MissingShellPresentationPanelDescriptor,
|
||||
MissingRequiredShellPresentation,
|
||||
ShellPresentationKindMismatch
|
||||
};
|
||||
|
||||
struct EditorShellAssetValidationResult {
|
||||
EditorShellAssetValidationCode code = EditorShellAssetValidationCode::None;
|
||||
std::string message = {};
|
||||
|
||||
[[nodiscard]] bool IsValid() const {
|
||||
return code == EditorShellAssetValidationCode::None;
|
||||
}
|
||||
};
|
||||
|
||||
EditorShellAsset BuildDefaultEditorShellAsset(const std::filesystem::path& repoRoot);
|
||||
UIEditorShortcutManager BuildEditorShellShortcutManager(const EditorShellAsset& asset);
|
||||
EditorShellAssetValidationResult ValidateEditorShellAsset(const EditorShellAsset& asset);
|
||||
|
||||
} // namespace XCEngine::UI::Editor
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "EditorShellAsset.h"
|
||||
#include <XCEditor/Shell/UIEditorShellAsset.h>
|
||||
|
||||
#include <unordered_set>
|
||||
#include <utility>
|
||||
Reference in New Issue
Block a user