Refactor new editor state ownership model

This commit is contained in:
2026-04-19 04:36:52 +08:00
parent 48bfde28e3
commit f45b34a03a
46 changed files with 1979 additions and 217 deletions

View File

@@ -0,0 +1,27 @@
#pragma once
#include <cstdint>
namespace XCEngine::UI::Editor::App {
enum class EditorShellPointerOwner : std::uint8_t {
None = 0,
DockHost,
SceneViewport,
GameViewport,
HierarchyPanel,
ProjectPanel,
};
constexpr bool IsShellPointerOwner(EditorShellPointerOwner owner) {
return owner == EditorShellPointerOwner::DockHost ||
owner == EditorShellPointerOwner::SceneViewport ||
owner == EditorShellPointerOwner::GameViewport;
}
constexpr bool IsHostedContentPointerOwner(EditorShellPointerOwner owner) {
return owner == EditorShellPointerOwner::HierarchyPanel ||
owner == EditorShellPointerOwner::ProjectPanel;
}
} // namespace XCEngine::UI::Editor::App