Refactor editor rendering contracts

This commit is contained in:
2026-04-28 02:57:49 +08:00
parent 3bc0cfcf08
commit b1ae6c462d
47 changed files with 798 additions and 377 deletions

View File

@@ -1,8 +1,10 @@
#pragma once
#include "Assets/EditorIconService.h"
#include "Commands/EditorEditCommandRoute.h"
#include "State/EditorSession.h"
#include "Panels/EditorPanelServices.h"
#include "Viewport/EditorViewportRuntimeServices.h"
#include <XCEditor/Foundation/UIEditorTextMeasurement.h>
#include <XCEditor/Panels/UIEditorHostedPanelDispatch.h>
@@ -25,17 +27,8 @@ struct UIInputEvent;
} // namespace XCEngine::UI
namespace XCEngine::UI::Editor::Rendering::Host {
class UiTextureHost;
} // namespace XCEngine::UI::Editor::Rendering::Host
namespace XCEngine::UI::Editor::App {
class BuiltInIcons;
class ViewportHostService;
enum class EditorWorkspacePanelCursorKind : std::uint8_t {
Arrow = 0,
ResizeEW
@@ -54,16 +47,12 @@ struct EditorWorkspacePanelFrameEvent {
struct EditorWorkspacePanelInitializationContext {
const std::filesystem::path& repoRoot;
Rendering::Host::UiTextureHost& textureHost;
UIEditorTextMeasurer& textMeasurer;
BuiltInIcons& builtInIcons;
ViewportHostService& viewportHostService;
EditorIconService& iconService;
EditorSceneViewportRuntime* sceneViewportRuntime = nullptr;
};
struct EditorWorkspacePanelShutdownContext {
Rendering::Host::UiTextureHost& textureHost;
ViewportHostService& viewportHostService;
};
struct EditorWorkspacePanelShutdownContext {};
struct EditorWorkspacePanelUpdateContext {
EditorPanelServices& services;