refactor(new_editor/app): reorganize host structure and add smoke test
This commit is contained in:
77
new_editor/app/Composition/EditorShellRuntime.h
Normal file
77
new_editor/app/Composition/EditorShellRuntime.h
Normal file
@@ -0,0 +1,77 @@
|
||||
#pragma once
|
||||
|
||||
#include "State/EditorContext.h"
|
||||
#include "Features/Console/ConsolePanel.h"
|
||||
#include "Rendering/Assets/BuiltInIcons.h"
|
||||
#include "Features/Hierarchy/HierarchyPanel.h"
|
||||
#include "Features/Inspector/InspectorPanel.h"
|
||||
#include "Features/Project/ProjectPanel.h"
|
||||
#include "Rendering/Viewport/ViewportHostService.h"
|
||||
#include "Composition/WorkspaceEventSync.h"
|
||||
|
||||
#include <Rendering/D3D12/D3D12WindowRenderer.h>
|
||||
#include <Rendering/Native/NativeRenderer.h>
|
||||
|
||||
#include <XCEditor/Shell/UIEditorShellInteraction.h>
|
||||
|
||||
#include <XCEngine/Rendering/RenderContext.h>
|
||||
#include <XCEngine/UI/DrawData.h>
|
||||
|
||||
#include <filesystem>
|
||||
#include <string_view>
|
||||
#include <vector>
|
||||
|
||||
namespace XCEngine::UI::Editor::App {
|
||||
|
||||
class EditorShellRuntime {
|
||||
public:
|
||||
void Initialize(
|
||||
const std::filesystem::path& repoRoot,
|
||||
Host::NativeRenderer& renderer);
|
||||
void Shutdown();
|
||||
void ResetInteractionState();
|
||||
void AttachViewportWindowRenderer(Host::D3D12WindowRenderer& renderer);
|
||||
void DetachViewportWindowRenderer();
|
||||
void SetViewportSurfacePresentationEnabled(bool enabled);
|
||||
|
||||
void Update(
|
||||
EditorContext& context,
|
||||
UIEditorWorkspaceController& workspaceController,
|
||||
const ::XCEngine::UI::UIRect& bounds,
|
||||
const std::vector<::XCEngine::UI::UIInputEvent>& inputEvents,
|
||||
std::string_view captureText,
|
||||
EditorShellVariant shellVariant = EditorShellVariant::Primary);
|
||||
void RenderRequestedViewports(
|
||||
const ::XCEngine::Rendering::RenderContext& renderContext);
|
||||
void Append(::XCEngine::UI::UIDrawList& drawList) const;
|
||||
|
||||
const UIEditorShellInteractionFrame& GetShellFrame() const;
|
||||
const UIEditorShellInteractionState& GetShellInteractionState() const;
|
||||
const std::vector<WorkspaceTraceEntry>& GetTraceEntries() const;
|
||||
const std::vector<HierarchyPanel::Event>& GetHierarchyPanelEvents() const;
|
||||
const std::vector<ProjectPanel::Event>& GetProjectPanelEvents() const;
|
||||
const std::string& GetBuiltInIconError() const;
|
||||
|
||||
ProjectPanel::CursorKind GetHostedContentCursorKind() const;
|
||||
Widgets::UIEditorDockHostCursorKind GetDockCursorKind() const;
|
||||
bool WantsHostPointerCapture() const;
|
||||
bool WantsHostPointerRelease() const;
|
||||
bool HasHostedContentCapture() const;
|
||||
bool HasShellInteractiveCapture() const;
|
||||
bool HasInteractiveCapture() const;
|
||||
|
||||
private:
|
||||
ViewportHostService m_viewportHostService = {};
|
||||
BuiltInIcons m_builtInIcons = {};
|
||||
ConsolePanel m_consolePanel = {};
|
||||
HierarchyPanel m_hierarchyPanel = {};
|
||||
InspectorPanel m_inspectorPanel = {};
|
||||
ProjectPanel m_projectPanel = {};
|
||||
UIEditorShellInteractionState m_shellInteractionState = {};
|
||||
UIEditorShellInteractionFrame m_shellFrame = {};
|
||||
std::vector<WorkspaceTraceEntry> m_traceEntries = {};
|
||||
};
|
||||
|
||||
} // namespace XCEngine::UI::Editor::App
|
||||
|
||||
|
||||
Reference in New Issue
Block a user