CDockingManager
- Module
- Arc
- Header
#include "Arc/Docking/CDockingManager.h"- Namespace
Arcf
Type aliases
| Alias | Description |
|---|---|
using TabFactory = FDockTabFactory |
Public functions
| Returns | Name | Description |
|---|---|---|
CDockingManager& | Get | |
void | SetLayout | |
const CDockLayout& | GetLayout | |
void | AddTab | |
void | RemoveTab | |
void | MoveTab | |
void | SplitArea | |
SDockArea* | FindAreaContainingTab | |
SDockArea* | FindArea | |
void | SaveLayoutPreset | |
void | LoadLayoutPreset | |
std::vector<std::string> | GetLayoutPresetNames | |
void | RegisterTabFactory | |
void | RemoveTabFromLayout | Remove a tab from an arbitrary layout root and collapse any area (and its parent splitter) left empty. |
void | CollapseEmptyAreas | Collapse empty areas (and their parent splitters) without removing a tab first — for hosts that prune restored layouts themselves. |
bool | MoveTabInLayout | insertIndex >= 0 places a Center join at that strip position (index counted over the target's tabs excluding the moved tab); -1 appends. |
bool | InsertTabInLayout | Insert a tab that is NOT currently in the layout (tear-off re-dock). |
bool | MoveTabToLayoutEdge | Split against the whole layout: the tab gets a fresh area docked to the given edge of the entire tree, sized to ratio of the root. |
bool | InsertTabAtLayoutEdge | |
SDockArea* | FindAreaInLayout | |
SDockArea* | FindFirstAreaInLayout | |
std::shared_ptr<CDockNode> | CloneTree | Structural deep copy (nodes, areas, tab order, active tab, the persistent flag); the ADockTab objects stay shared. |
void | Reset | Ordered shutdown hook — the layout owns host-created tabs and the factory map owns host lambdas; both must go before this DLL's statics are destroyed. |
Function details
Get
static CDockingManager& Get()SetLayout
void SetLayout(CDockLayout layout)GetLayout
const CDockLayout& GetLayout() constAddTab
void AddTab(const CName& areaId, std::shared_ptr<ADockTab> tab)RemoveTab
void RemoveTab(const CName& tabId)MoveTab
void MoveTab(const CName& tabId, const CName& targetAreaId, EDockDropZone zone)SplitArea
void SplitArea(SDockArea* area, EDockSplitOrientation orientation, std::shared_ptr<ADockTab> newTab, float ratio = 0.5f)FindAreaContainingTab
SDockArea* FindAreaContainingTab(const CName& tabId) constFindArea
SDockArea* FindArea(const CName& areaId) constSaveLayoutPreset
void SaveLayoutPreset(const std::string& name)LoadLayoutPreset
void LoadLayoutPreset(const std::string& name)GetLayoutPresetNames
std::vector<std::string> GetLayoutPresetNames() constRegisterTabFactory
void RegisterTabFactory(const CName& tabId, TabFactory factory)RemoveTabFromLayout
static void RemoveTabFromLayout(std::shared_ptr<CDockNode>& root, const CName& tabId)Remove a tab from an arbitrary layout root and collapse any area (and its parent splitter) left empty. Reused by ADockSpace, which owns its own layout rather than the manager's.
CollapseEmptyAreas
static void CollapseEmptyAreas(std::shared_ptr<CDockNode>& root)Collapse empty areas (and their parent splitters) without removing a tab first — for hosts that prune restored layouts themselves.
MoveTabInLayout
static bool MoveTabInLayout(std::shared_ptr<CDockNode>& root, const CName& tabId, SDockArea* targetArea, EDockDropZone zone, int32_t insertIndex = -1)insertIndex >= 0 places a Center join at that strip position (index counted over the target's tabs excluding the moved tab); -1 appends. Center onto the source area with an index degrades to an in-well reorder instead of the historical no-op.
InsertTabInLayout
static bool InsertTabInLayout(std::shared_ptr<CDockNode>& root, const std::shared_ptr<ADockTab>& tab, SDockArea* targetArea, EDockDropZone zone, int32_t insertIndex = -1)Insert a tab that is NOT currently in the layout (tear-off re-dock). Center joins the target area; edge zones split it at 0.5.
MoveTabToLayoutEdge
static bool MoveTabToLayoutEdge(std::shared_ptr<CDockNode>& root, const CName& tabId, EDockDropZone zone, float ratio = 0.25f)Split against the whole layout: the tab gets a fresh area docked to the given edge of the entire tree, sized to ratio of the root.
InsertTabAtLayoutEdge
static bool InsertTabAtLayoutEdge(std::shared_ptr<CDockNode>& root, const std::shared_ptr<ADockTab>& tab, EDockDropZone zone, float ratio = 0.25f)FindAreaInLayout
static SDockArea* FindAreaInLayout(const std::shared_ptr<CDockNode>& root, const CName& areaId)FindFirstAreaInLayout
static SDockArea* FindFirstAreaInLayout(const std::shared_ptr<CDockNode>& root)CloneTree
static std::shared_ptr<CDockNode> CloneTree(const std::shared_ptr<CDockNode>& root)Structural deep copy (nodes, areas, tab order, active tab, the persistent flag); the ADockTab objects stay shared.
Reset
void Reset()Ordered shutdown hook — the layout owns host-created tabs and the factory map owns host lambdas; both must go before this DLL's statics are destroyed.