| 1 | using CascadeIDE.Cockpit.Composition.Shell; |
| 2 | |
| 3 | namespace CascadeIDE.Cockpit.Composition.HostSurface; |
| 4 | |
| 5 | /// <summary> |
| 6 | /// Проекция состояния <see cref="IMainWindowHostSurfaceInput"/> во вход shell/host композиторов (ADR 0036 п.3, 0047). |
| 7 | /// Числа ширин MFD из UI-режима передаёт вызывающий (граница Cockpit / <c>Features.UiChrome</c>, CASCOPE002). |
| 8 | /// </summary> |
| 9 | public static class MainWindowHostSurfaceProjection |
| 10 | { |
| 11 | public static MainWindowHostSurfaceFrame ComposeFrame( |
| 12 | IMainWindowHostSurfaceInput host, |
| 13 | int expandedMfdWidthPixels, |
| 14 | int collapsedMfdWidthPixels) => |
| 15 | MainWindowHostSurfaceCompositor.ComposeFrame( |
| 16 | BuildShellInput(host, expandedMfdWidthPixels, collapsedMfdWidthPixels)); |
| 17 | |
| 18 | public static MainWindowShellSurfaceCompositionInput BuildShellInput( |
| 19 | IMainWindowHostSurfaceInput host, |
| 20 | int expandedMfdWidthPixels, |
| 21 | int collapsedMfdWidthPixels) => |
| 22 | new( |
| 23 | host.PresentationParse, |
| 24 | host.IsPfdRegionExpanded, |
| 25 | host.IsMfdRegionExpanded, |
| 26 | host.IsPfdHostWindowShellOpen, |
| 27 | host.IsMfdHostWindowShellOpen, |
| 28 | expandedMfdWidthPixels, |
| 29 | collapsedMfdWidthPixels, |
| 30 | host.DisplaySettings, |
| 31 | host.SafetyLevel, |
| 32 | host.EffectivePresentationTier); |
| 33 | } |
| 34 | |