69 lines
1.6 KiB
C++
69 lines
1.6 KiB
C++
#pragma once
|
|
|
|
#include <XCEditor/Workspace/UIEditorWorkspaceController.h>
|
|
|
|
#include <cstdint>
|
|
#include <filesystem>
|
|
#include <string>
|
|
#include <string_view>
|
|
|
|
namespace XCEngine::UI::Editor::App {
|
|
|
|
enum class EditorRuntimeMode : std::uint8_t {
|
|
Edit = 0,
|
|
Play,
|
|
Paused
|
|
};
|
|
|
|
enum class EditorActionRoute : std::uint8_t {
|
|
None = 0,
|
|
Hierarchy,
|
|
Project,
|
|
Inspector,
|
|
Console,
|
|
Scene,
|
|
Game
|
|
};
|
|
|
|
enum class EditorSelectionKind : std::uint8_t {
|
|
None = 0,
|
|
HierarchyNode,
|
|
ProjectItem
|
|
};
|
|
|
|
struct EditorSelectionState {
|
|
EditorSelectionKind kind = EditorSelectionKind::None;
|
|
std::string itemId = {};
|
|
std::string displayName = {};
|
|
std::filesystem::path absolutePath = {};
|
|
bool directory = false;
|
|
};
|
|
|
|
struct EditorConsoleEntry {
|
|
std::string channel = {};
|
|
std::string message = {};
|
|
};
|
|
|
|
struct EditorSession {
|
|
std::filesystem::path repoRoot = {};
|
|
std::filesystem::path projectRoot = {};
|
|
std::string activePanelId = {};
|
|
EditorRuntimeMode runtimeMode = EditorRuntimeMode::Edit;
|
|
EditorActionRoute activeRoute = EditorActionRoute::None;
|
|
EditorSelectionState selection = {};
|
|
std::vector<EditorConsoleEntry> consoleEntries = {};
|
|
};
|
|
|
|
std::string_view GetEditorRuntimeModeName(EditorRuntimeMode mode);
|
|
std::string_view GetEditorActionRouteName(EditorActionRoute route);
|
|
std::string_view GetEditorSelectionKindName(EditorSelectionKind kind);
|
|
|
|
EditorActionRoute ResolveEditorActionRoute(std::string_view panelId);
|
|
|
|
void SyncEditorSessionFromWorkspace(
|
|
EditorSession& session,
|
|
const UIEditorWorkspaceController& controller);
|
|
|
|
} // namespace XCEngine::UI::Editor::App
|
|
|