Skip to content

DockingManager

Non-visual layout controller managing the hierarchical docking tree, pane additions, splits, tab reordering, and snapshot serialization/restoration.

Overview

DockingManager is the non-visual model and controller for docking layout trees.

Performs tree mutations: - Adding panes to edge splits or tab groups (addPane, tabPane, splitPane). - Reordering tabs within a leaf (reorderPane). - Detaching panes to floating windows (detachPaneForFloating). - Snapshot generation and restoration (snapshot, restore).

Splitting and Tab-Grouping Panes

dockingRoot.manager().splitPane("editor-1", DockArea.RIGHT, toolPane, 0.3f);
  • DockLayoutSnapshot: Immutable snapshot representing the recursive docking layout tree and active pane selection for serialization and layout persistence.
  • DockNode: Hierarchical docking tree node: either a LEAF containing tabbed DockPanes or a SPLIT node dividing two children horizontally or vertically.
  • DockingRoot: Root visual widget for the IDE docking system hosting dock tree nodes, tab strips, split handles, drop previews, and tear-off floating window integrations.

API

DockingManager::addPane(DockPane)

Adds a pane to the preferred leaf node.

Parameter Type Description
pane DockPane DockPane to add or manipulate.

Returns DockingManager: This DockingManager for method chaining..

DockingManager::closeActivePane()

Closes the currently active pane if permitted by close guards.

Returns boolean: True if the pane was closed; false if cancelled or not found..

DockingManager::closePane(String)

Closes and removes the pane with the specified ID.

Parameter Type Description
paneId String Identifier of the pane.

Returns DockingManager: This DockingManager for method chaining..

DockingManager::containsPane(String)

Checks whether a pane with the given ID exists in the docking tree.

Parameter Type Description
paneId String Identifier of the pane.

Returns boolean: True if a pane with the specified ID exists..

DockingManager::detachPaneForFloating(String)

Detaches a pane from the dock tree for floating without creating the window directly.

Parameter Type Description
paneId String Identifier of the pane.

Returns DockPane: The detached DockPane instance..

DockingManager::dockPane(String, String, DockArea)

Moves an existing pane to a new dock area relative to targetPaneId.

Parameter Type Description
paneId String Identifier of the pane.
targetPaneId String Identifier of the reference target pane.
area DockArea Target dock area.

Returns boolean: True if docking succeeded; false otherwise..

DockingManager::empty()

Returns true if the docking manager contains no panes.

Returns boolean: True if the docking tree contains no panes..

DockingManager::findPane(String)

Finds a DockPane by its identifier, or null if not found.

Parameter Type Description
paneId String Identifier of the pane.

Returns DockPane: The matching DockPane or null if not found..

DockingManager::floatPane(String)

Detaches the pane into a new independent WindowWidget.

Parameter Type Description
paneId String Identifier of the pane.

Returns WindowWidget: The created floating WindowWidget hosting the detached pane..

DockingManager::paneCount()

Returns the total number of registered dock panes.

Returns int: Total number of panes across the entire docking tree..

DockingManager::panes()

Returns an immutable list of all panes across all leaves.

Returns List: Unmodifiable collection of all registered panes..

DockingManager::reorderPane(String, String)

Reorders a pane before another tab in the same leaf during live drag reordering.

Parameter Type Description
paneId String Identifier of the pane.
beforePaneId String Identifier of the pane before which to insert.

Returns boolean: True if tabs were reordered; false otherwise..

DockingManager::restore(DockLayoutSnapshot, Map)

Restores docking layout from a snapshot using the provided pane registry.

Parameter Type Description
snapshot DockLayoutSnapshot Layout snapshot to restore.
paneRegistry Map Map of registered panes by ID.

Returns RestoreResult: True if the snapshot was restored successfully..

DockingManager::rootNode()

Returns the root DockNode of the docking hierarchy.

Returns DockNode: The root node of the docking hierarchy..

DockingManager::selectNextTab()

Selects the next tab in the active leaf.

Returns boolean: True if the active tab was changed; false otherwise..

DockingManager::selectPane(String)

Selects and activates the pane with the specified ID.

Parameter Type Description
paneId String Identifier of the pane.

Returns DockingManager: This DockingManager for method chaining..

DockingManager::selectPreviousTab()

Selects the previous tab in the active leaf.

Returns boolean: True if the active tab was changed; false otherwise..

DockingManager::selectedLeaf()

Returns the leaf node hosting the currently active pane.

Returns DockNode: The currently selected leaf node..

DockingManager::selectedPane()

Returns the currently active selected dock pane.

Returns DockPane: The currently selected active DockPane..

DockingManager::snapshot()

Captures an immutable snapshot of the current docking layout.

Returns DockLayoutSnapshot: A captured snapshot of the current docking layout..

DockingManager::splitPane(String, DockArea, DockPane)

Splits the leaf containing targetPaneId along the specified area with 0.5 ratio.

Parameter Type Description
targetPaneId String Identifier of the reference target pane.
area DockArea Target dock area.
pane DockPane DockPane to add or manipulate.

Returns DockingManager: This DockingManager for method chaining..

DockingManager::splitPane(String, DockArea, DockPane, float)

Splits the leaf containing targetPaneId along the specified area with a custom split ratio.

Parameter Type Description
targetPaneId String Identifier of the reference target pane.
area DockArea Target dock area.
pane DockPane DockPane to add or manipulate.
splitRatio float Split ratio for dividing nodes.

Returns DockingManager: This DockingManager for method chaining..

DockingManager::tabPane(String, DockPane)

Adds a pane as a tab into the leaf containing targetPaneId.

Parameter Type Description
targetPaneId String Identifier of the reference target pane.
pane DockPane DockPane to add or manipulate.

Returns DockingManager: This DockingManager for method chaining..