Refactor editor panel services boundary
This commit is contained in:
@@ -14,6 +14,15 @@ using ::XCEngine::UI::Editor::BuildEditorShellShortcutManager;
|
||||
using ::XCEngine::UI::Editor::UIEditorWorkspacePanelPresentationModel;
|
||||
using ::XCEngine::UI::Editor::AppendUIEditorRuntimeTrace;
|
||||
|
||||
void RequestEditorContextUtilityWindow(
|
||||
void* requester,
|
||||
EditorUtilityWindowKind kind) {
|
||||
auto* context = static_cast<EditorContext*>(requester);
|
||||
if (context != nullptr) {
|
||||
context->RequestOpenUtilityWindow(kind);
|
||||
}
|
||||
}
|
||||
|
||||
std::string ComposeStatusText(
|
||||
std::string_view status,
|
||||
std::string_view message) {
|
||||
@@ -213,6 +222,20 @@ const UIEditorShellInteractionServices& EditorContext::GetShellServices() const
|
||||
return m_shellServices;
|
||||
}
|
||||
|
||||
EditorPanelServices EditorContext::BuildPanelServices() {
|
||||
return EditorPanelServices{
|
||||
.session = m_session,
|
||||
.projectRuntime = m_projectRuntime,
|
||||
.sceneRuntime = m_sceneRuntime,
|
||||
.commandFocusService = m_commandFocusService,
|
||||
.colorPickerToolState = m_colorPickerToolState,
|
||||
.systemInteractionHost = m_systemInteractionHost,
|
||||
.textMeasurer = m_shellServices.textMeasurer,
|
||||
.utilityWindowRequester = this,
|
||||
.requestUtilityWindow = RequestEditorContextUtilityWindow,
|
||||
};
|
||||
}
|
||||
|
||||
UIEditorShellInteractionDefinition EditorContext::BuildShellDefinition(
|
||||
const UIEditorWorkspaceController& workspaceController,
|
||||
std::string_view captureText,
|
||||
|
||||
Reference in New Issue
Block a user