Refactor new editor state ownership model
This commit is contained in:
27
new_editor/app/Composition/EditorShellPointerInteraction.h
Normal file
27
new_editor/app/Composition/EditorShellPointerInteraction.h
Normal 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
|
||||
Reference in New Issue
Block a user