2026-04-06 03:17:53 +08:00
|
|
|
#pragma once
|
|
|
|
|
|
2026-04-06 16:20:46 +08:00
|
|
|
#include <XCNewEditor/Editor/UIEditorPanelRegistry.h>
|
|
|
|
|
#include <XCNewEditor/Editor/UIEditorWorkspaceModel.h>
|
|
|
|
|
#include <XCNewEditor/Editor/UIEditorWorkspaceSession.h>
|
|
|
|
|
|
|
|
|
|
#include <cstdint>
|
2026-04-06 03:17:53 +08:00
|
|
|
#include <filesystem>
|
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
|
|
namespace XCEngine::NewEditor {
|
|
|
|
|
|
|
|
|
|
struct EditorShellAsset {
|
|
|
|
|
std::string screenId = "new_editor.shell";
|
|
|
|
|
std::filesystem::path documentPath = {};
|
|
|
|
|
std::filesystem::path themePath = {};
|
|
|
|
|
std::filesystem::path captureRootPath = {};
|
2026-04-06 16:20:46 +08:00
|
|
|
UIEditorPanelRegistry panelRegistry = {};
|
|
|
|
|
UIEditorWorkspaceModel workspace = {};
|
|
|
|
|
UIEditorWorkspaceSession workspaceSession = {};
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
enum class EditorShellAssetValidationCode : std::uint8_t {
|
|
|
|
|
None = 0,
|
|
|
|
|
InvalidPanelRegistry,
|
|
|
|
|
InvalidWorkspace,
|
|
|
|
|
InvalidWorkspaceSession,
|
|
|
|
|
MissingPanelDescriptor,
|
|
|
|
|
PanelTitleMismatch,
|
|
|
|
|
PanelPlaceholderMismatch
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct EditorShellAssetValidationResult {
|
|
|
|
|
EditorShellAssetValidationCode code = EditorShellAssetValidationCode::None;
|
|
|
|
|
std::string message = {};
|
|
|
|
|
|
|
|
|
|
[[nodiscard]] bool IsValid() const {
|
|
|
|
|
return code == EditorShellAssetValidationCode::None;
|
|
|
|
|
}
|
2026-04-06 03:17:53 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
EditorShellAsset BuildDefaultEditorShellAsset(const std::filesystem::path& repoRoot);
|
2026-04-06 16:20:46 +08:00
|
|
|
EditorShellAssetValidationResult ValidateEditorShellAsset(const EditorShellAsset& asset);
|
2026-04-06 03:17:53 +08:00
|
|
|
|
|
|
|
|
} // namespace XCEngine::NewEditor
|