载入中...
搜索中...
未找到
WorkspaceLayoutShell.h
浏览该文件的文档.
1#pragma once
2
3#include "common/Export.h"
4#include "common/Result.h"
6#include "ui/Widget.h"
7
8#include <functional>
9#include <string>
10#include <string_view>
11#include <unordered_map>
12#include <vector>
13
14namespace eve::ui_editor {
15
23 float leftRatio = 0.22f;
25 float rightRatio = 0.28f;
27 float bottomRatio = 0.28f;
29 std::string windowId = "root";
31 bool tabStackRegions = true;
32};
33
49public:
56 std::function<std::vector<ui::WidgetDesc>(const editor::WorkspacePanelDescriptor &panel)>;
57
66 [[nodiscard]] static ui::WidgetDesc buildWindow(const editor::EditorWorkspace &workspace,
67 ContentBuilder content = {},
69
75 [[nodiscard]] static ui::WidgetDesc buildDockBody(const editor::EditorWorkspace &workspace,
76 ContentBuilder content = {},
77 WorkspaceShellOptions options = {});
78
84 [[nodiscard]] static std::vector<editor::WorkspacePanelDescriptor> panelsInRegion(
85 const editor::EditorWorkspace &workspace, std::string_view region);
86};
87
88} // namespace eve::ui_editor
#define EVENGINE_API_EDITORS
Definition Export.h:112
ScriptFieldRegion region
Move-only, checked operation results for the common layer.
const SquirrelValueOptions & options
Composition model shared by project-specific developer and runtime editors.
Builds a fixed, non-draggable editor chrome from an EditorWorkspace.
std::function< std::vector< ui::WidgetDesc >(const editor::WorkspacePanelDescriptor &panel)> ContentBuilder
Build panel body content for one workspace descriptor.
UI-neutral description of one composable editor panel.
Declarative widget description (build once / on dirty → flatten into UIHost::Tree).
Definition Widget.h:15
Options that control the fixed IDE chrome produced by WorkspaceLayoutShell.
std::string windowId
Host window id used by UIHost / ImGui persistence.
float bottomRatio
Bottom pane fraction of the vertical split.
float leftRatio
Left pane fraction of the horizontal split (clamped to [0.1, 0.9]).
ui::WidgetDesc statusBar
Optional status-bar widgets placed below the dock body.
bool tabStackRegions
When true, multiple panels in one region become a TabContainer.
ui::WidgetDesc toolbar
Optional toolbar widgets placed above the dock body.
float rightRatio
Right pane fraction of the remaining horizontal split.