关键节点

This commit is contained in:
2026-04-25 16:46:01 +08:00
parent 6002d86a7e
commit ef41c44464
516 changed files with 6175 additions and 12401 deletions

View File

@@ -0,0 +1,61 @@
#pragma once
#include <XCEditor/Foundation/UIEditorShortcutManager.h>
#include <XCEditor/Menu/UIEditorMenuModel.h>
#include <XCEditor/Panels/UIEditorPanelRegistry.h>
#include <XCEditor/Shell/UIEditorShellInteraction.h>
#include <XCEditor/Workspace/UIEditorWorkspaceModel.h>
#include <XCEditor/Workspace/UIEditorWorkspaceSession.h>
#include <cstdint>
#include <filesystem>
#include <string>
#include <vector>
namespace XCEngine::UI::Editor {
struct EditorShellShortcutAsset {
UIEditorCommandRegistry commandRegistry = {};
std::vector<UIShortcutBinding> bindings = {};
};
struct EditorShellAsset {
std::string screenId = {};
std::filesystem::path documentPath = {};
std::filesystem::path captureRootPath = {};
UIEditorPanelRegistry panelRegistry = {};
UIEditorWorkspaceModel workspace = {};
UIEditorWorkspaceSession workspaceSession = {};
UIEditorShellInteractionDefinition shellDefinition = {};
EditorShellShortcutAsset shortcutAsset = {};
};
enum class EditorShellAssetValidationCode : std::uint8_t {
None = 0,
InvalidPanelRegistry = 1,
InvalidWorkspace = 2,
InvalidWorkspaceSession = 3,
InvalidShellMenuModel = 4,
InvalidShortcutConfiguration = 5,
MissingPanelDescriptor = 6,
PanelTitleMismatch = 7,
PanelPlaceholderMismatch = 8,
DuplicateShellPresentationPanelId = 9,
MissingShellPresentationPanelDescriptor = 10,
MissingRequiredShellPresentation = 11,
ShellPresentationKindMismatch = 12
};
struct EditorShellAssetValidationResult {
EditorShellAssetValidationCode code = EditorShellAssetValidationCode::None;
std::string message = {};
[[nodiscard]] bool IsValid() const {
return code == EditorShellAssetValidationCode::None;
}
};
UIEditorShortcutManager BuildEditorShellShortcutManager(const EditorShellAsset& asset);
EditorShellAssetValidationResult ValidateEditorShellAsset(const EditorShellAsset& asset);
} // namespace XCEngine::UI::Editor

View File

@@ -0,0 +1,29 @@
#pragma once
#include <XCEditor/Shell/UIEditorShellInteraction.h>
namespace XCEngine::UI {
struct UIInputEvent;
struct UIPoint;
}
namespace XCEngine::UI::Editor {
bool HasActiveUIEditorShellInteractiveCapture(
const UIEditorShellInteractionState& shellInteractionState);
bool ShouldStartImmediateUIEditorShellPointerCapture(
const UIEditorShellInteractionFrame& shellFrame,
const ::XCEngine::UI::UIPoint& clientPoint);
bool ShouldYieldUIEditorHostedContentPointerStream(
const UIEditorShellInteractionFrame& shellFrame,
bool shellInteractiveCaptureActive);
std::vector<::XCEngine::UI::UIInputEvent> FilterUIEditorHostedContentInputEvents(
const std::vector<::XCEngine::UI::UIInputEvent>& inputEvents,
bool shellOwnsPointerStream);
} // namespace XCEngine::UI::Editor

View File

@@ -0,0 +1,171 @@
#pragma once
#include <XCEditor/Workspace/UIEditorWorkspaceCompose.h>
#include <XCEditor/Menu/UIEditorMenuBar.h>
#include <XCEditor/Shell/UIEditorStatusBar.h>
namespace XCEngine::UI::Editor::App {
class BuiltInIcons;
}
namespace XCEngine::UI::Editor {
struct UIEditorShellToolbarButton {
std::string buttonId = {};
std::uint8_t iconKind = 0;
bool enabled = true;
};
struct UIEditorShellToolbarLayout {
::XCEngine::UI::UIRect bounds = {};
::XCEngine::UI::UIRect groupRect = {};
std::vector<::XCEngine::UI::UIRect> buttonRects = {};
};
struct UIEditorShellToolbarMetrics {
float barHeight = 30.0f;
float groupPaddingX = 6.0f;
float groupPaddingY = 2.0f;
float buttonWidth = 20.0f;
float buttonHeight = 20.0f;
float buttonGap = 6.0f;
float groupCornerRounding = 0.0f;
float buttonCornerRounding = 0.0f;
float borderThickness = 1.0f;
float iconThickness = 1.2f;
};
struct UIEditorShellToolbarPalette {
::XCEngine::UI::UIColor barColor =
::XCEngine::UI::UIColor(0.10f, 0.10f, 0.10f, 1.0f);
::XCEngine::UI::UIColor groupColor =
::XCEngine::UI::UIColor(0.11f, 0.11f, 0.11f, 1.0f);
::XCEngine::UI::UIColor groupBorderColor =
::XCEngine::UI::UIColor(0.15f, 0.15f, 0.15f, 1.0f);
::XCEngine::UI::UIColor buttonColor =
::XCEngine::UI::UIColor(0.12f, 0.12f, 0.12f, 1.0f);
::XCEngine::UI::UIColor buttonBorderColor =
::XCEngine::UI::UIColor(0.15f, 0.15f, 0.15f, 1.0f);
::XCEngine::UI::UIColor iconColor =
::XCEngine::UI::UIColor(0.88f, 0.88f, 0.88f, 1.0f);
};
struct UIEditorShellComposeModel {
std::vector<Widgets::UIEditorMenuBarItem> menuBarItems = {};
std::vector<UIEditorShellToolbarButton> toolbarButtons = {};
std::vector<Widgets::UIEditorStatusBarSegment> statusSegments = {};
std::vector<UIEditorWorkspacePanelPresentationModel> workspacePresentations = {};
};
struct UIEditorShellComposeState {
Widgets::UIEditorMenuBarState menuBarState = {};
UIEditorWorkspaceComposeState workspaceState = {};
Widgets::UIEditorStatusBarState statusBarState = {};
};
struct UIEditorShellComposeMetrics {
float outerPadding = 0.0f;
float sectionGap = 0.0f;
float surfaceCornerRounding = 0.0f;
Widgets::UIEditorMenuBarMetrics menuBarMetrics = {};
UIEditorShellToolbarMetrics toolbarMetrics = {};
Widgets::UIEditorDockHostMetrics dockHostMetrics = {};
Widgets::UIEditorViewportSlotMetrics viewportMetrics = {};
Widgets::UIEditorStatusBarMetrics statusBarMetrics = {};
};
struct UIEditorShellComposePalette {
::XCEngine::UI::UIColor surfaceColor =
::XCEngine::UI::UIColor(0.10f, 0.10f, 0.10f, 1.0f);
::XCEngine::UI::UIColor surfaceBorderColor =
::XCEngine::UI::UIColor(0.15f, 0.15f, 0.15f, 1.0f);
Widgets::UIEditorMenuBarPalette menuBarPalette = {};
UIEditorShellToolbarPalette toolbarPalette = {};
Widgets::UIEditorDockHostPalette dockHostPalette = {};
Widgets::UIEditorViewportSlotPalette viewportPalette = {};
Widgets::UIEditorStatusBarPalette statusBarPalette = {};
};
struct UIEditorShellComposeLayout {
::XCEngine::UI::UIRect bounds = {};
::XCEngine::UI::UIRect contentRect = {};
::XCEngine::UI::UIRect menuBarRect = {};
::XCEngine::UI::UIRect toolbarRect = {};
::XCEngine::UI::UIRect workspaceRect = {};
::XCEngine::UI::UIRect statusBarRect = {};
Widgets::UIEditorMenuBarLayout menuBarLayout = {};
UIEditorShellToolbarLayout toolbarLayout = {};
Widgets::UIEditorStatusBarLayout statusBarLayout = {};
};
struct UIEditorShellComposeRequest {
UIEditorShellComposeLayout layout = {};
};
struct UIEditorShellComposeFrame {
UIEditorShellComposeLayout layout = {};
};
UIEditorShellComposeLayout BuildUIEditorShellComposeLayout(
const ::XCEngine::UI::UIRect& bounds,
const std::vector<Widgets::UIEditorMenuBarItem>& menuBarItems,
const std::vector<Widgets::UIEditorStatusBarSegment>& statusSegments,
const UIEditorShellComposeMetrics& metrics = {});
UIEditorShellComposeLayout BuildUIEditorShellComposeLayout(
const ::XCEngine::UI::UIRect& bounds,
const std::vector<Widgets::UIEditorMenuBarItem>& menuBarItems,
const std::vector<UIEditorShellToolbarButton>& toolbarButtons,
const std::vector<Widgets::UIEditorStatusBarSegment>& statusSegments,
const UIEditorShellComposeMetrics& metrics = {});
UIEditorShellComposeRequest ResolveUIEditorShellComposeRequest(
const ::XCEngine::UI::UIRect& bounds,
const UIEditorShellComposeModel& model,
const UIEditorShellComposeMetrics& metrics = {});
UIEditorShellComposeFrame UpdateUIEditorShellCompose(
UIEditorShellComposeState& state,
const ::XCEngine::UI::UIRect& bounds,
const UIEditorPanelRegistry& panelRegistry,
const UIEditorWorkspaceModel& workspace,
const UIEditorWorkspaceSession& session,
const UIEditorShellComposeModel& model,
const std::vector<::XCEngine::UI::UIInputEvent>& inputEvents,
const Widgets::UIEditorDockHostState& dockHostState = {},
const UIEditorShellComposeMetrics& metrics = {});
void AppendUIEditorShellCompose(
::XCEngine::UI::UIDrawList& drawList,
const UIEditorShellComposeFrame& frame,
const UIEditorWorkspaceComposeFrame& workspaceFrame,
const UIEditorShellComposeModel& model,
const UIEditorShellComposeState& state,
const UIEditorShellComposePalette& palette = {},
const UIEditorShellComposeMetrics& metrics = {},
const App::BuiltInIcons* builtInIcons = nullptr);
void AppendUIEditorShellComposeBase(
::XCEngine::UI::UIDrawList& drawList,
const UIEditorShellComposeFrame& frame,
const UIEditorShellComposeModel& model,
const UIEditorShellComposeState& state,
const UIEditorShellComposePalette& palette = {},
const UIEditorShellComposeMetrics& metrics = {},
const App::BuiltInIcons* builtInIcons = nullptr);
void AppendUIEditorShellComposeStatusBar(
::XCEngine::UI::UIDrawList& drawList,
const UIEditorShellComposeFrame& frame,
const UIEditorShellComposeModel& model,
const UIEditorShellComposeState& state,
const UIEditorShellComposePalette& palette = {},
const UIEditorShellComposeMetrics& metrics = {});
void AppendUIEditorShellComposeOverlay(
::XCEngine::UI::UIDrawList& drawList,
const UIEditorWorkspaceComposeFrame& workspaceFrame,
const UIEditorShellComposePalette& palette = {},
const UIEditorShellComposeMetrics& metrics = {});
} // namespace XCEngine::UI::Editor

View File

@@ -0,0 +1,194 @@
#pragma once
#include <XCEditor/Foundation/UIEditorTextMeasurement.h>
#include <XCEditor/Menu/UIEditorMenuModel.h>
#include <XCEditor/Menu/UIEditorMenuSession.h>
#include <XCEditor/Panels/UIEditorHostedPanelDispatch.h>
#include <XCEditor/Shell/UIEditorShellCompose.h>
#include <XCEditor/Workspace/UIEditorWorkspaceController.h>
#include <XCEditor/Workspace/UIEditorWorkspaceInteraction.h>
#include <XCEditor/Menu/UIEditorMenuPopup.h>
#include <XCEngine/UI/DrawData.h>
#include <string>
#include <vector>
namespace XCEngine::UI::Editor {
struct UIEditorShellInteractionDefinition {
UIEditorMenuModel menuModel = {};
std::vector<UIEditorShellToolbarButton> toolbarButtons = {};
std::vector<Widgets::UIEditorStatusBarSegment> statusSegments = {};
std::vector<UIEditorWorkspacePanelPresentationModel> workspacePresentations = {};
};
struct UIEditorShellInteractionModel {
UIEditorResolvedMenuModel resolvedMenuModel = {};
std::vector<UIEditorShellToolbarButton> toolbarButtons = {};
std::vector<Widgets::UIEditorStatusBarSegment> statusSegments = {};
std::vector<UIEditorWorkspacePanelPresentationModel> workspacePresentations = {};
};
struct UIEditorShellInteractionState {
UIEditorShellComposeState composeState = {};
UIEditorMenuSession menuSession = {};
UIEditorWorkspaceInteractionState workspaceInteractionState = {};
::XCEngine::UI::UIPoint pointerPosition = {};
bool focused = false;
bool hasPointerPosition = false;
};
struct UIEditorShellInteractionMetrics {
UIEditorShellComposeMetrics shellMetrics = {};
Widgets::UIEditorMenuPopupMetrics popupMetrics = {};
};
struct UIEditorShellInteractionPalette {
UIEditorShellComposePalette shellPalette = {};
Widgets::UIEditorMenuPopupPalette popupPalette = {};
};
struct UIEditorShellInteractionServices {
const UIEditorCommandDispatcher* commandDispatcher = nullptr;
const UIEditorShortcutManager* shortcutManager = nullptr;
const UIEditorTextMeasurer* textMeasurer = nullptr;
};
struct UIEditorShellInteractionMenuButtonRequest {
std::string menuId = {};
std::string label = {};
std::string popupId = {};
::XCEngine::UI::UIRect rect = {};
::XCEngine::UI::UIInputPath path = {};
bool enabled = true;
};
struct UIEditorShellInteractionPopupItemRequest {
std::string popupId = {};
std::string menuId = {};
std::string itemId = {};
std::string label = {};
std::string commandId = {};
std::string childPopupId = {};
::XCEngine::UI::UIRect rect = {};
::XCEngine::UI::UIInputPath path = {};
UIEditorMenuItemKind kind = UIEditorMenuItemKind::Command;
bool enabled = false;
bool checked = false;
bool hasSubmenu = false;
};
struct UIEditorShellInteractionPopupRequest {
std::string popupId = {};
std::string menuId = {};
std::string sourceItemId = {};
::XCEngine::UI::Widgets::UIPopupOverlayEntry overlayEntry = {};
::XCEngine::UI::Widgets::UIPopupPlacementResult placement = {};
Widgets::UIEditorMenuPopupLayout layout = {};
std::vector<UIEditorResolvedMenuItem> resolvedItems = {};
std::vector<Widgets::UIEditorMenuPopupItem> widgetItems = {};
std::vector<UIEditorShellInteractionPopupItemRequest> itemRequests = {};
};
struct UIEditorShellInteractionRequest {
UIEditorShellComposeRequest shellRequest = {};
std::vector<Widgets::UIEditorMenuBarItem> menuBarItems = {};
std::vector<UIEditorShellInteractionMenuButtonRequest> menuButtons = {};
std::vector<UIEditorShellInteractionPopupRequest> popupRequests = {};
};
struct UIEditorShellInteractionResult {
bool consumed = false;
bool menuModal = false;
bool workspaceInputSuppressed = false;
bool requestPointerCapture = false;
bool releasePointerCapture = false;
bool viewportInteractionChanged = false;
bool commandTriggered = false;
bool commandDispatched = false;
std::string menuId = {};
std::string popupId = {};
std::string itemId = {};
std::string commandId = {};
std::string viewportPanelId = {};
UIEditorViewportInputBridgeFrame viewportInputFrame = {};
UIEditorMenuSessionMutationResult menuMutation = {};
UIEditorCommandDispatchResult commandDispatchResult = {};
UIEditorWorkspaceInteractionResult workspaceResult = {};
};
struct UIEditorShellInteractionPopupFrame {
std::string popupId = {};
Widgets::UIEditorMenuPopupState popupState = {};
};
struct UIEditorShellInteractionFrame {
UIEditorShellInteractionModel model = {};
UIEditorShellInteractionRequest request = {};
UIEditorShellComposeFrame shellFrame = {};
UIEditorWorkspaceInteractionFrame workspaceInteractionFrame = {};
UIEditorHostedPanelDispatchFrame hostedPanelDispatchFrame = {};
std::vector<UIEditorShellInteractionPopupFrame> popupFrames = {};
UIEditorShellInteractionResult result = {};
std::string openRootMenuId = {};
std::string hoveredMenuId = {};
std::string hoveredPopupId = {};
std::string hoveredItemId = {};
bool focused = false;
};
UIEditorShellInteractionModel ResolveUIEditorShellInteractionModel(
const UIEditorWorkspaceController& controller,
const UIEditorShellInteractionDefinition& definition,
const UIEditorShellInteractionServices& services = {});
UIEditorShellInteractionRequest ResolveUIEditorShellInteractionRequest(
const ::XCEngine::UI::UIRect& bounds,
const UIEditorShellInteractionModel& model,
const UIEditorShellInteractionState& state = {},
const UIEditorShellInteractionMetrics& metrics = {},
const UIEditorShellInteractionServices& services = {});
UIEditorShellInteractionFrame UpdateUIEditorShellInteraction(
UIEditorShellInteractionState& state,
UIEditorWorkspaceController& controller,
const ::XCEngine::UI::UIRect& bounds,
const UIEditorShellInteractionModel& model,
const std::vector<::XCEngine::UI::UIInputEvent>& inputEvents,
const UIEditorShellInteractionServices& services = {},
const UIEditorShellInteractionMetrics& metrics = {});
UIEditorShellInteractionRequest ResolveUIEditorShellInteractionRequest(
const ::XCEngine::UI::UIRect& bounds,
const UIEditorWorkspaceController& controller,
const UIEditorShellInteractionDefinition& definition,
const UIEditorShellInteractionState& state = {},
const UIEditorShellInteractionMetrics& metrics = {},
const UIEditorShellInteractionServices& services = {});
UIEditorShellInteractionFrame UpdateUIEditorShellInteraction(
UIEditorShellInteractionState& state,
UIEditorWorkspaceController& controller,
const ::XCEngine::UI::UIRect& bounds,
const UIEditorShellInteractionDefinition& definition,
const std::vector<::XCEngine::UI::UIInputEvent>& inputEvents,
const UIEditorShellInteractionServices& services = {},
const UIEditorShellInteractionMetrics& metrics = {});
void AppendUIEditorShellInteraction(
::XCEngine::UI::UIDrawList& drawList,
const UIEditorShellInteractionFrame& frame,
const UIEditorShellInteractionModel& model,
const UIEditorShellInteractionState& state,
const UIEditorShellInteractionPalette& palette = {},
const UIEditorShellInteractionMetrics& metrics = {});
void AppendUIEditorShellInteraction(
::XCEngine::UI::UIDrawList& drawList,
const UIEditorShellInteractionFrame& frame,
const UIEditorShellInteractionState& state,
const UIEditorShellInteractionPalette& palette = {},
const UIEditorShellInteractionMetrics& metrics = {});
} // namespace XCEngine::UI::Editor

View File

@@ -0,0 +1,154 @@
#pragma once
#include <XCEditor/Foundation/UIEditorTextMeasurement.h>
#include <XCEngine/UI/DrawData.h>
#include <cstddef>
#include <cstdint>
#include <string>
#include <string_view>
#include <vector>
namespace XCEngine::UI::Editor::Widgets {
inline constexpr std::size_t UIEditorStatusBarInvalidIndex =
static_cast<std::size_t>(-1);
enum class UIEditorStatusBarSlot : std::uint8_t {
Leading = 0,
Trailing
};
enum class UIEditorStatusBarTextTone : std::uint8_t {
Primary = 0,
Muted,
Accent
};
enum class UIEditorStatusBarHitTargetKind : std::uint8_t {
None = 0,
Background,
Segment,
Separator
};
struct UIEditorStatusBarSegment {
std::string segmentId = {};
std::string label = {};
UIEditorStatusBarSlot slot = UIEditorStatusBarSlot::Leading;
UIEditorStatusBarTextTone tone = UIEditorStatusBarTextTone::Primary;
bool interactive = true;
bool showSeparator = false;
// Pure measured label width. Segment padding is applied only in layout.
float measuredLabelWidth = 0.0f;
};
struct UIEditorStatusBarState {
std::size_t hoveredIndex = UIEditorStatusBarInvalidIndex;
std::size_t activeIndex = UIEditorStatusBarInvalidIndex;
bool focused = false;
};
struct UIEditorStatusBarMetrics {
float barHeight = 22.0f;
float outerPaddingX = 8.0f;
float segmentPaddingX = 8.0f;
float segmentPaddingY = 4.0f;
float segmentGap = 2.0f;
float separatorWidth = 1.0f;
float separatorInsetY = 5.0f;
float slotGapMin = 18.0f;
float cornerRounding = 0.0f;
float labelFontSize = 12.0f;
float labelInsetY = 0.0f;
float estimatedGlyphWidth = 6.5f;
float borderThickness = 1.0f;
float focusedBorderThickness = 1.0f;
};
struct UIEditorStatusBarPalette {
::XCEngine::UI::UIColor surfaceColor =
::XCEngine::UI::UIColor(0.10f, 0.10f, 0.10f, 1.0f);
::XCEngine::UI::UIColor borderColor =
::XCEngine::UI::UIColor(0.15f, 0.15f, 0.15f, 1.0f);
::XCEngine::UI::UIColor focusedBorderColor =
::XCEngine::UI::UIColor(0.19f, 0.19f, 0.19f, 1.0f);
::XCEngine::UI::UIColor segmentColor =
::XCEngine::UI::UIColor(0.12f, 0.12f, 0.12f, 1.0f);
::XCEngine::UI::UIColor segmentHoveredColor =
::XCEngine::UI::UIColor(0.14f, 0.14f, 0.14f, 1.0f);
::XCEngine::UI::UIColor segmentActiveColor =
::XCEngine::UI::UIColor(0.17f, 0.17f, 0.17f, 1.0f);
::XCEngine::UI::UIColor segmentBorderColor =
::XCEngine::UI::UIColor(0.15f, 0.15f, 0.15f, 1.0f);
::XCEngine::UI::UIColor separatorColor =
::XCEngine::UI::UIColor(0.15f, 0.15f, 0.15f, 1.0f);
::XCEngine::UI::UIColor textPrimary =
::XCEngine::UI::UIColor(0.92f, 0.92f, 0.92f, 1.0f);
::XCEngine::UI::UIColor textMuted =
::XCEngine::UI::UIColor(0.62f, 0.62f, 0.62f, 1.0f);
::XCEngine::UI::UIColor textAccent =
::XCEngine::UI::UIColor(0.94f, 0.94f, 0.94f, 1.0f);
};
struct UIEditorStatusBarLayout {
::XCEngine::UI::UIRect bounds = {};
::XCEngine::UI::UIRect leadingSlotRect = {};
::XCEngine::UI::UIRect trailingSlotRect = {};
std::vector<::XCEngine::UI::UIRect> segmentRects = {};
std::vector<::XCEngine::UI::UIRect> separatorRects = {};
};
struct UIEditorStatusBarHitTarget {
UIEditorStatusBarHitTargetKind kind = UIEditorStatusBarHitTargetKind::None;
std::size_t index = UIEditorStatusBarInvalidIndex;
};
float ResolveUIEditorStatusBarMeasuredLabelWidth(
const UIEditorStatusBarSegment& segment,
const UIEditorStatusBarMetrics& metrics = {},
const UIEditorTextMeasurer* textMeasurer = nullptr);
float ResolveUIEditorStatusBarDesiredSegmentWidth(
const UIEditorStatusBarSegment& segment,
const UIEditorStatusBarMetrics& metrics = {});
UIEditorStatusBarLayout BuildUIEditorStatusBarLayout(
const ::XCEngine::UI::UIRect& bounds,
const std::vector<UIEditorStatusBarSegment>& segments,
const UIEditorStatusBarMetrics& metrics = {});
UIEditorStatusBarHitTarget HitTestUIEditorStatusBar(
const UIEditorStatusBarLayout& layout,
const ::XCEngine::UI::UIPoint& point);
::XCEngine::UI::UIColor ResolveUIEditorStatusBarTextColor(
UIEditorStatusBarTextTone tone,
const UIEditorStatusBarPalette& palette = {});
void AppendUIEditorStatusBarBackground(
::XCEngine::UI::UIDrawList& drawList,
const UIEditorStatusBarLayout& layout,
const std::vector<UIEditorStatusBarSegment>& segments,
const UIEditorStatusBarState& state,
const UIEditorStatusBarPalette& palette = {},
const UIEditorStatusBarMetrics& metrics = {});
void AppendUIEditorStatusBarForeground(
::XCEngine::UI::UIDrawList& drawList,
const UIEditorStatusBarLayout& layout,
const std::vector<UIEditorStatusBarSegment>& segments,
const UIEditorStatusBarState& state,
const UIEditorStatusBarPalette& palette = {},
const UIEditorStatusBarMetrics& metrics = {});
void AppendUIEditorStatusBar(
::XCEngine::UI::UIDrawList& drawList,
const ::XCEngine::UI::UIRect& bounds,
const std::vector<UIEditorStatusBarSegment>& segments,
const UIEditorStatusBarState& state,
const UIEditorStatusBarPalette& palette = {},
const UIEditorStatusBarMetrics& metrics = {});
} // namespace XCEngine::UI::Editor::Widgets

View File

@@ -0,0 +1,29 @@
#pragma once
#include <XCEditor/Foundation/UIEditorShortcutManager.h>
#include <XCEditor/Shell/UIEditorShellAsset.h>
#include <XCEditor/Shell/UIEditorShellInteraction.h>
#include <XCEditor/Workspace/UIEditorWorkspaceController.h>
#include <XCEngine/UI/Runtime/UIScreenTypes.h>
namespace XCEngine::UI::Editor {
struct StructuredEditorShellBinding {
::XCEngine::UI::Runtime::UIScreenAsset screenAsset = {};
UIEditorWorkspaceController workspaceController = {};
UIEditorShellInteractionDefinition shellDefinition = {};
UIEditorShortcutManager shortcutManager = {};
EditorShellAssetValidationResult assetValidation = {};
[[nodiscard]] bool IsValid() const {
return assetValidation.IsValid();
}
};
StructuredEditorShellBinding BuildStructuredEditorShellBinding(const EditorShellAsset& asset);
UIEditorShellInteractionServices BuildStructuredEditorShellServices(
const StructuredEditorShellBinding& binding);
} // namespace XCEngine::UI::Editor