Refactor new editor app context and workspace shell

This commit is contained in:
2026-04-12 01:29:00 +08:00
parent 0ff02150c0
commit 838f676fa6
9 changed files with 1177 additions and 303 deletions

View File

@@ -8,14 +8,10 @@
#include <Host/InputModifierTracker.h>
#include <Host/NativeRenderer.h>
#include "Icons/ProductBuiltInIcons.h"
#include "Panels/ProductHierarchyPanel.h"
#include "Panels/ProductProjectPanel.h"
#include "Core/ProductEditorContext.h"
#include "Workspace/ProductEditorWorkspace.h"
#include <XCEditor/Foundation/UIEditorShortcutManager.h>
#include <XCEditor/Shell/UIEditorShellAsset.h>
#include <XCEditor/Shell/UIEditorShellInteraction.h>
#include <XCEditor/Shell/UIEditorWorkspaceController.h>
#include <windows.h>
#include <windowsx.h>
@@ -53,14 +49,11 @@ private:
float GetDpiScale() const;
float PixelsToDips(float pixels) const;
::XCEngine::UI::UIPoint ConvertClientPixelsToDips(LONG x, LONG y) const;
std::string BuildCaptureStatusText() const;
void LogRuntimeTrace(std::string_view channel, std::string_view message) const;
void ApplyHostCaptureRequests(const UIEditorShellInteractionResult& result);
void ApplyHostedContentCaptureRequests();
bool HasShellInteractiveCaptureState() const;
bool HasInteractiveCaptureState() const;
UIEditorShellInteractionDefinition BuildShellDefinition() const;
void UpdateLastStatus(const UIEditorShellInteractionResult& result);
std::string DescribeWorkspaceState() const;
std::string DescribeInputEvents(
const std::vector<::XCEngine::UI::UIInputEvent>& events) const;
void QueuePointerEvent(
@@ -82,21 +75,10 @@ private:
::XCEngine::UI::Editor::Host::NativeRenderer m_renderer = {};
::XCEngine::UI::Editor::Host::AutoScreenshotController m_autoScreenshot = {};
::XCEngine::UI::Editor::Host::InputModifierTracker m_inputModifierTracker = {};
EditorShellAsset m_shellAsset = {};
EditorShellAssetValidationResult m_shellValidation = {};
UIEditorWorkspaceController m_workspaceController = {};
UIEditorShortcutManager m_shortcutManager = {};
App::ProductBuiltInIcons m_builtInIcons = {};
App::ProductHierarchyPanel m_hierarchyPanel = {};
App::ProductProjectPanel m_projectPanel = {};
UIEditorShellInteractionServices m_shellServices = {};
UIEditorShellInteractionState m_shellInteractionState = {};
UIEditorShellInteractionFrame m_shellFrame = {};
App::ProductEditorContext m_editorContext = {};
App::ProductEditorWorkspace m_editorWorkspace = {};
std::vector<::XCEngine::UI::UIInputEvent> m_pendingInputEvents = {};
bool m_trackingMouseLeave = false;
std::string m_validationMessage = {};
std::string m_lastStatus = {};
std::string m_lastMessage = {};
UINT m_windowDpi = 96u;
float m_dpiScale = 1.0f;
};