Refactor new editor boundaries and test ownership
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
#include "Composition/EditorShellRuntime.h"
|
||||
|
||||
#include "Host/TextureHost.h"
|
||||
#include "Host/ViewportRenderHost.h"
|
||||
#include "State/EditorContext.h"
|
||||
#include "Ports/TexturePort.h"
|
||||
#include "Ports/ViewportRenderPort.h"
|
||||
#include "Composition/EditorContext.h"
|
||||
|
||||
#include "Composition/EditorPanelIds.h"
|
||||
|
||||
@@ -12,11 +12,11 @@ namespace XCEngine::UI::Editor::App {
|
||||
|
||||
void EditorShellRuntime::Initialize(
|
||||
const std::filesystem::path& repoRoot,
|
||||
Host::TextureHost& textureHost,
|
||||
Ports::TexturePort& textureHost,
|
||||
UIEditorTextMeasurer& textMeasurer) {
|
||||
m_textureHost = &textureHost;
|
||||
m_builtInIcons.Initialize(textureHost);
|
||||
m_sceneViewportController.Initialize(repoRoot, textureHost);
|
||||
m_sceneViewportFeature.Initialize(repoRoot, textureHost, m_viewportHostService);
|
||||
m_hierarchyPanel.SetBuiltInIcons(&m_builtInIcons);
|
||||
m_projectPanel.SetBuiltInIcons(&m_builtInIcons);
|
||||
m_projectPanel.SetTextMeasurer(&textMeasurer);
|
||||
@@ -24,7 +24,7 @@ void EditorShellRuntime::Initialize(
|
||||
m_projectPanel.Initialize(repoRoot);
|
||||
}
|
||||
|
||||
void EditorShellRuntime::AttachViewportWindowRenderer(Host::ViewportRenderHost& renderer) {
|
||||
void EditorShellRuntime::AttachViewportWindowRenderer(Ports::ViewportRenderPort& renderer) {
|
||||
m_viewportHostService.AttachWindowRenderer(renderer);
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ void EditorShellRuntime::Shutdown() {
|
||||
m_traceEntries.clear();
|
||||
m_sceneEditCommandRoute = {};
|
||||
if (m_textureHost != nullptr) {
|
||||
m_sceneViewportController.Shutdown(*m_textureHost);
|
||||
m_sceneViewportFeature.Shutdown(*m_textureHost, m_viewportHostService);
|
||||
m_builtInIcons.Shutdown();
|
||||
m_textureHost = nullptr;
|
||||
} else {
|
||||
@@ -57,7 +57,7 @@ void EditorShellRuntime::ResetInteractionState() {
|
||||
m_shellInteractionState = {};
|
||||
m_splitterDragCorrectionState = {};
|
||||
m_traceEntries.clear();
|
||||
m_sceneViewportController.ResetInteractionState();
|
||||
m_sceneViewportFeature.ResetInteractionState();
|
||||
m_hierarchyPanel.ResetInteractionState();
|
||||
m_projectPanel.ResetInteractionState();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user