Skip to main content

Module docking

Module docking 

Source
Expand description

DockingLayout — a VS Code-style dockable layout: a fixed centre slot (the app’s main content) surrounded by four collapsible, splittable, draggable side regions (leading / trailing / top / bottom), backed by a cloneable, serializable DockingModel.

See docs/docking.md for the full reference. The structure is four levels deep:

DockingLayout
└── Centre + 4 Sides
    └── Side = [optional DockActivityBar rail] + collapsible content region
        └── content region holds ONE TabWidget (strip optional / replaced
            by the rail)
            └── Tab → DockArrangement (a Splitter of panes, each a single
                DockWidget or a ToolBox of DockWidgets)
                └── DockWidget — the atomic dockable unit

Structs§

CornerOwners
Which side owns each corner. Default = the classic IDE shell where the top and bottom bars span the full width and the leading / trailing columns occupy only the middle band.
DockAction
A dockless command button in the activity rail: it looks and behaves like an activity item, but opens no panel — activating it just runs a closure.
DockActionId
Stable identity for a DockAction.
DockLayoutState
The full serializable snapshot of a DockingModel.
DockLoc
Where a dock currently lives. One dock per Splitter pane, so a (side, tab_idx, pane_idx) triple addresses it exactly.
DockOpenLocation
Target for DockingModel::open_dock / DockingModel::move_dock.
DockPolicy
App-declared policy that locks down end-user layout edits on a DockingLayout. Each flag removes a user affordance only — the programmatic DockingModel API (a “Toggle panel” button, open_dock, set_tab_hidden, …) keeps working regardless, so the app can still drive the layout it has locked for the user.
DockRail
App-facing configuration for a side’s activity rail (Rail presentation).
DockSideState
One side’s persisted state.
DockTabId
Process-unique identity for a dock tab (a tab of a side’s TabWidget).
DockTabState
One tab’s persisted state: its Splitter sizing + the dock id in each pane (one dock per Splitter pane).
DockWidget
App-facing declaration of a dock widget: identity, chrome metadata, and a lazy content factory. Collect these on DockingLayout::dock.
DockWidgetId
Process-unique identity for a registered dock widget (the atomic unit).
DockingLayout
The docking layout widget. See the module docs and docs/docking.md.
DockingModel
The shared docking-layout model. Clone = share-by-handle.
DockingRects
The computed geometry: four side breakdowns plus the centre rect.
SideLayout
Per-side geometry inputs (all logical pixels), in LTR space.
SideRects
The three sub-rectangles a side contributes: the always-visible rail, the resizable content, and the resize handle. Any of them is [Rect::ZERO] when absent.

Enums§

DockActionPlacement
Where a DockAction sits along the rail’s column.
DockCorner
One of the four corners of the container. Each corner is owned by exactly one of its two adjacent sides (Qt setCorner).
DockOpenMode
Placement mode for a programmatically-opened dock.
DockRailItemSize
Activity-bar item size for a side’s rail (context-menu “Activity bar size”).
DockSide
One of the four dockable sides. Leading/Trailing are writing-direction-relative (mirrored under RTL by the caller); Top/ Bottom never mirror.
DockTabDisplay
How a side’s dock tabs render (context-menu “Tab size”).
TabPresentation
How a side surfaces its tabs: an in-side strip (the TabWidget’s own bar) or an always-visible activity rail outboard of the collapsible content.

Type Aliases§

DockContentFactory
Builds a dock widget’s content on demand (keyed by its DockWidgetId).
DockIconFactory
Builds an icon for a dock widget’s tab / rail item on demand.
DockRailSlot
Factory for a rail slot widget (rebuilt on each rail rebuild).