98 lines
3.7 KiB
C++
98 lines
3.7 KiB
C++
#pragma once
|
|
|
|
#include <XCEditor/Shell/UIEditorWorkspaceCompose.h>
|
|
#include <XCEditor/Shell/UIEditorMenuBar.h>
|
|
#include <XCEditor/Shell/UIEditorStatusBar.h>
|
|
|
|
namespace XCEngine::UI::Editor {
|
|
|
|
struct UIEditorShellComposeModel {
|
|
std::vector<Widgets::UIEditorMenuBarItem> menuBarItems = {};
|
|
std::vector<Widgets::UIEditorStatusBarSegment> statusSegments = {};
|
|
std::vector<UIEditorWorkspacePanelPresentationModel> workspacePresentations = {};
|
|
};
|
|
|
|
struct UIEditorShellComposeState {
|
|
Widgets::UIEditorMenuBarState menuBarState = {};
|
|
UIEditorWorkspaceComposeState workspaceState = {};
|
|
Widgets::UIEditorStatusBarState statusBarState = {};
|
|
};
|
|
|
|
struct UIEditorShellComposeMetrics {
|
|
float outerPadding = 12.0f;
|
|
float sectionGap = 8.0f;
|
|
float surfaceCornerRounding = 10.0f;
|
|
Widgets::UIEditorMenuBarMetrics menuBarMetrics = {};
|
|
Widgets::UIEditorDockHostMetrics dockHostMetrics = {};
|
|
Widgets::UIEditorViewportSlotMetrics viewportMetrics = {};
|
|
Widgets::UIEditorStatusBarMetrics statusBarMetrics = {};
|
|
};
|
|
|
|
struct UIEditorShellComposePalette {
|
|
::XCEngine::UI::UIColor surfaceColor =
|
|
::XCEngine::UI::UIColor(0.14f, 0.14f, 0.14f, 1.0f);
|
|
::XCEngine::UI::UIColor surfaceBorderColor =
|
|
::XCEngine::UI::UIColor(0.27f, 0.27f, 0.27f, 1.0f);
|
|
Widgets::UIEditorMenuBarPalette menuBarPalette = {};
|
|
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 workspaceRect = {};
|
|
::XCEngine::UI::UIRect statusBarRect = {};
|
|
Widgets::UIEditorMenuBarLayout menuBarLayout = {};
|
|
Widgets::UIEditorStatusBarLayout statusBarLayout = {};
|
|
};
|
|
|
|
struct UIEditorShellComposeRequest {
|
|
UIEditorShellComposeLayout layout = {};
|
|
UIEditorWorkspaceComposeRequest workspaceRequest = {};
|
|
};
|
|
|
|
struct UIEditorShellComposeFrame {
|
|
UIEditorShellComposeLayout layout = {};
|
|
UIEditorWorkspaceComposeFrame workspaceFrame = {};
|
|
};
|
|
|
|
UIEditorShellComposeLayout BuildUIEditorShellComposeLayout(
|
|
const ::XCEngine::UI::UIRect& bounds,
|
|
const std::vector<Widgets::UIEditorMenuBarItem>& menuBarItems,
|
|
const std::vector<Widgets::UIEditorStatusBarSegment>& statusSegments,
|
|
const UIEditorShellComposeMetrics& metrics = {});
|
|
|
|
UIEditorShellComposeRequest ResolveUIEditorShellComposeRequest(
|
|
const ::XCEngine::UI::UIRect& bounds,
|
|
const UIEditorPanelRegistry& panelRegistry,
|
|
const UIEditorWorkspaceModel& workspace,
|
|
const UIEditorWorkspaceSession& session,
|
|
const UIEditorShellComposeModel& model,
|
|
const Widgets::UIEditorDockHostState& dockHostState = {},
|
|
const UIEditorShellComposeState& state = {},
|
|
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 UIEditorShellComposeModel& model,
|
|
const UIEditorShellComposeState& state,
|
|
const UIEditorShellComposePalette& palette = {},
|
|
const UIEditorShellComposeMetrics& metrics = {});
|
|
|
|
} // namespace XCEngine::UI::Editor
|