ADockSpace
- Module
- Arc
- Header
#include "Arc/Docking/ADockSpace.h"- Namespace
Arcf
Properties
| Type | Name | Description |
|---|---|---|
ArcDelegate<void(const std::shared_ptr<CDockNode>&, float)> | OnSplitterSizeChanged | Fired when a fixed-pixel seam is dragged — (node, new fixed pixels). Ratio seams write their live ratio straight back into the node. |
ArcDelegate<void(const CName&, const ArcVec2&)> | OnTabDraggedOut | Fired when a tab drag ends outside every dock area — the host's tear-off-to-OS-window hook. |
ArcDelegate<void(const CName&, const ArcVec2&)> | OnTabContextMenu | Fired on right-click over a dock tab (the tab is activated first). Position is dockspace-window-local — the host opens its menu there. |
ArcDelegate<void(const CName&)> | OnTabActivated | Fired when a click makes a different tab active in its well. |
ArcDelegate<void()> | OnLayoutChanged | Fired after any user-driven layout mutation — tab move/reorder/ activate/close, detach/reattach, external drop, splitter drag. NOT fired by SetLayout (programmatic apply). The host's persistence hook: mark the layout dirty and serialize debounced. |
Public functions
| Returns | Name | Description |
|---|---|---|
ARC_WIDGET_ARGS | ||
void | SetLayout | |
const CDockLayout& | GetLayout | |
bool | IsEmpty | True when no area in the layout holds a tab — a float host uses it to close a window whose last tab was dragged away or closed. |
uint32_t | GetTabCount | Tabs across every area. |
bool | IsPointOverTabStripBlank | True when the point (widget-absolute space) sits inside some tab well's strip but over neither a tab handle nor an overflow chevron. |
void | SetStyle | |
const FDockSpaceStyle& | GetStyle | |
void | SetFramelessAreas | Areas drawn without the floating-panel chrome (fill, border, radius) and their tab strip on the window's Surface0 with no rule: a single document that fills the window edge to edge under its tabs, the way an asset editor's window does. |
bool | HasFramelessAreas | |
void | SetLiveTearOffHooks | |
void | CloseTab | Removes the tab from the layout entirely (emptied areas collapse, persistent areas stay). |
void | CloseAllDocumentTabs | Closes every Document-role tab through CloseTab (vetoes respected). |
void | RefreshTab | Rebuilds the well strip hosting the tab — dirty dot / title updates. |
void | SetEmptyAreaContent | Content shown in the body of an empty persistent area (the document well's empty state). |
std::shared_ptr<ADockTab> | FindTab | |
CName | GetAreaIdForTab | |
ArcRect | GetAreaRectForTab | |
std::shared_ptr<ADockTab> | DetachTab | Removes the tab from the layout (emptied areas collapse) and hands it to the caller. |
bool | ReattachTab | Docks a detached tab back: Center-joins preferredAreaId when that area still exists, else the first area in the tree. |
void | UpdateExternalTabDrag | |
void | CancelExternalTabDrag | |
bool | DropExternalTab | Drops a detached tab at the current preview target. |
ArcVec2 | ComputeDesiredSize | |
void | ArrangeChildren | |
bool | CanSkipArrange | Refused: split ratios animate and tab drags re-home areas mid-frame, neither of which passes through Invalidate. |
int32_t | OnPaint | |
bool | CanCacheDesiredSize | Pure pass-through to the built layout tree; every layout edit ends in SetContent, and the drag preview is painted, not measured. |
const char* | GetTypeName |
Function details
ARC_WIDGET_ARGS
ARC_WIDGET_ARGS(ADockSpace) ARC_ARG(FDockSpaceStyle, Style) ARC_WIDGET_ARGS_END() void Construct(const CArguments& args)SetLayout
void SetLayout(const CDockLayout& layout)GetLayout
const CDockLayout& GetLayout() constIsEmpty
bool IsEmpty() constTrue when no area in the layout holds a tab — a float host uses it to close a window whose last tab was dragged away or closed.
GetTabCount
uint32_t GetTabCount() constTabs across every area. A float host asks it to tell "this window holds several tabs" from "this window IS the tab" — tearing the only tab out of a float would destroy and rebuild the window under the cursor for no visible change.
IsPointOverTabStripBlank
bool IsPointOverTabStripBlank(const ArcVec2& absolutePos) constTrue when the point (widget-absolute space) sits inside some tab well's strip but over neither a tab handle nor an overflow chevron. Float chrome uses it to keep the blank strip OS-draggable while the tabs themselves stay interactive.
SetStyle
void SetStyle(const FDockSpaceStyle& style)GetStyle
const FDockSpaceStyle& GetStyle() constSetFramelessAreas
void SetFramelessAreas(bool frameless)Areas drawn without the floating-panel chrome (fill, border, radius) and their tab strip on the window's Surface0 with no rule: a single document that fills the window edge to edge under its tabs, the way an asset editor's window does.
HasFramelessAreas
bool HasFramelessAreas() constSetLiveTearOffHooks
void SetLiveTearOffHooks(FLiveTearOffHooks hooks)CloseTab
void CloseTab(const CName& tabId, bool force = false)Removes the tab from the layout entirely (emptied areas collapse, persistent areas stay). The tab's close-request hook can veto unless force is set — every close path (button, middle-click, context menu) funnels through here so the veto is universal.
CloseAllDocumentTabs
void CloseAllDocumentTabs()Closes every Document-role tab through CloseTab (vetoes respected). Panel and Major tabs are untouched.
RefreshTab
void RefreshTab(const CName& tabId)Rebuilds the well strip hosting the tab — dirty dot / title updates.
SetEmptyAreaContent
void SetEmptyAreaContent(std::function<TSharedPtr<AWidget>()> factory)Content shown in the body of an empty persistent area (the document well's empty state). Called per rebuild — return a fresh widget.
FindTab
std::shared_ptr<ADockTab> FindTab(const CName& tabId) constGetAreaIdForTab
CName GetAreaIdForTab(const CName& tabId) constGetAreaRectForTab
ArcRect GetAreaRectForTab(const CName& tabId) constDetachTab
std::shared_ptr<ADockTab> DetachTab(const CName& tabId)Removes the tab from the layout (emptied areas collapse) and hands it to the caller. Returns null when the tab is not in this layout.
ReattachTab
bool ReattachTab(const std::shared_ptr<ADockTab>& tab, const CName& preferredAreaId)Docks a detached tab back: Center-joins preferredAreaId when that area still exists, else the first area in the tree.
UpdateExternalTabDrag
void UpdateExternalTabDrag(const CName& tabId, const std::string& title, const ArcVec2& localPos)CancelExternalTabDrag
void CancelExternalTabDrag()DropExternalTab
bool DropExternalTab(const std::shared_ptr<ADockTab>& tab, const ArcVec2& localPos)Drops a detached tab at the current preview target. Returns false (layout untouched) when the position hits no dock area.
ComputeDesiredSize
ArcVec2 ComputeDesiredSize(float scale) const overrideArrangeChildren
void ArrangeChildren(const CGeometry& geo) overrideCanSkipArrange
bool CanSkipArrange() const overrideRefused: split ratios animate and tab drags re-home areas mid-frame, neither of which passes through Invalidate.
OnPaint
int32_t OnPaint(const CArcPaintArgs& args, const CGeometry& geo, CArcUIRenderer& renderer, int32_t layerId) const overrideCanCacheDesiredSize
bool CanCacheDesiredSize() const overridePure pass-through to the built layout tree; every layout edit ends in SetContent, and the drag preview is painted, not measured.
GetTypeName
const char* GetTypeName() const override