载入中...
搜索中...
未找到
eve::ui_editor::WorkspaceLayoutShell类 参考

Builds a fixed, non-draggable editor chrome from an EditorWorkspace. 更多...

#include <WorkspaceLayoutShell.h>

Public 类型

using ContentBuilder = std::function< std::vector< ui::WidgetDesc >(const editor::WorkspacePanelDescriptor &panel)>
 Build panel body content for one workspace descriptor.
 

静态 Public 成员函数

static ui::WidgetDesc buildWindow (const editor::EditorWorkspace &workspace, ContentBuilder content={}, WorkspaceShellOptions options={})
 Compose a full Window tree for the workspace.
 
static ui::WidgetDesc buildDockBody (const editor::EditorWorkspace &workspace, ContentBuilder content={}, WorkspaceShellOptions options={})
 Compose only the dock body (SplitPane + DockArea tree) without a Window. Useful when the caller already owns MenuBar / Window chrome. @cost Linear in visible panel count; builds an owning WidgetDesc subtree once per call.
 
static std::vector< editor::WorkspacePanelDescriptor > panelsInRegion (const editor::EditorWorkspace &workspace, std::string_view region)
 Collect visible panels for one region in deterministic order.
 

详细描述

Builds a fixed, non-draggable editor chrome from an EditorWorkspace.

Domain editors stay UI-neutral: they only register WorkspacePanelDescriptor entries. This shell maps those descriptors into one Window with AppFrame, nested SplitPane regions, DockArea slots, PanelFrame chrome, and optional TabContainer stacks — replacing the ad-hoc pattern of one movable UIHost per panel.

@ownership Returned WidgetDesc trees are values owned by the caller. @thread Call on the UI / main thread that owns the workspace snapshot. @reentrancy Does not invoke content builders while holding locks; builders must not mutate the workspace they are reading.

在文件 WorkspaceLayoutShell.h 第 48 行定义.

成员类型定义说明

◆ ContentBuilder

Build panel body content for one workspace descriptor.

参数
panelOwning snapshot of the panel being filled.
返回
Body widgets placed inside the panel's PanelFrame / tab page.

在文件 WorkspaceLayoutShell.h 第 55 行定义.

成员函数说明

◆ buildDockBody()

ui::WidgetDesc eve::ui_editor::WorkspaceLayoutShell::buildDockBody ( const editor::EditorWorkspace &  workspace,
ContentBuilder  content = {},
WorkspaceShellOptions  options = {} 
)
static

Compose only the dock body (SplitPane + DockArea tree) without a Window. Useful when the caller already owns MenuBar / Window chrome. @cost Linear in visible panel count; builds an owning WidgetDesc subtree once per call.

在文件 WorkspaceLayoutShell.cpp 第 88 行定义.

引用了 active, body, bottom, center, eve::ui::Column, eve::editor::EditorWorkspace::getActivePanel(), left, options, panelsInRegion(), right, eve::ui::Row, eve::ui::splitPane() , 以及 top.

被这些函数引用 buildWindow().

◆ buildWindow()

ui::WidgetDesc eve::ui_editor::WorkspaceLayoutShell::buildWindow ( const editor::EditorWorkspace &  workspace,
ContentBuilder  content = {},
WorkspaceShellOptions  options = {} 
)
static

Compose a full Window tree for the workspace.

参数
workspaceUI-neutral panel registry and active selection.
contentOptional builder; when null, each panel gets a placeholder label.
optionsChrome ratios, toolbar/status, and tab-stack policy.
返回
Window WidgetDesc ready for UIHost::setTree / UI::mountAs. @cost Linear in visible panel count; builds an owning WidgetDesc tree once per call.

在文件 WorkspaceLayoutShell.cpp 第 128 行定义.

引用了 eve::ui::appFrame(), body, buildDockBody(), children, frame, eve::editor::EditorWorkspace::getTitle(), options , 以及 eve::ui::window().

◆ panelsInRegion()

std::vector< WorkspacePanelDescriptor > eve::ui_editor::WorkspaceLayoutShell::panelsInRegion ( const editor::EditorWorkspace &  workspace,
std::string_view  region 
)
static

Collect visible panels for one region in deterministic order.

返回
Owning descriptor snapshots; empty when the region has no visible panels. @cost Linear in workspace panel count; returns an owning vector copy per call.

在文件 WorkspaceLayoutShell.cpp 第 68 行定义.

引用了 a, b, count, eve::editor::EditorWorkspace::getPanelCount(), out, eve::editor::EditorWorkspace::panelAt() , 以及 region.

被这些函数引用 buildDockBody() , 以及 eve::ui_editor::exposeWorkspaceLayoutShellBindings().


该类的文档由以下文件生成: