Build XCEditor editor shell compose foundation
This commit is contained in:
95
new_editor/include/XCEditor/Core/UIEditorShellCompose.h
Normal file
95
new_editor/include/XCEditor/Core/UIEditorShellCompose.h
Normal file
@@ -0,0 +1,95 @@
|
||||
#pragma once
|
||||
|
||||
#include <XCEditor/Core/UIEditorWorkspaceCompose.h>
|
||||
#include <XCEditor/Widgets/UIEditorMenuBar.h>
|
||||
#include <XCEditor/Widgets/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::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::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
|
||||
Reference in New Issue
Block a user