public class DockWorkspace extends Container
IDE-like workspace with retractable side panes and a central tab area.
DockWorkspace is intended for professional desktop applications: project explorers, database browsers, chat panes and terminals can be collapsed to a fixed DockBar, reopened with one click and resized by dragging the separator next to the expanded pane. The workspace gives its central area and every expanded side pane a rounded, content-clipping contour by default. The area containing keyboard focus is outlined with the theme accent color. A focused side pane also outlines its associated dock-bar icon. Selected surfaces without focus use the theme's scrollbar-thumb color instead. Tabbed content outlines only the active header and document surface, never the complete tab strip. Expanded dock buttons share their pane's background.
workspace = DockWorkspace()
workspace.center.addTab("Welcome", Label("Ready"), false)
workspace.addPane(DockPane("Projects", ProjectExplorerPane(), DockSide.LEFT))
workspace.addPane(DockPane("Terminal", TerminalWidget(), DockSide.BOTTOM))
window.centralWidget = workspace| Modifier and Type | Member | Description |
|---|---|---|
| public property | barSizebarSize as Int = 52 |
Fixed dock bar thickness in pixels. |
| public readonly property | centercenter as DockCenterArea |
Central tab area. |
| public readonly property | focusedAreafocusedArea as Widget |
Visible docking area containing the window's keyboard target. |
| public property | handleSizehandleSize as Int = 7 |
Separator thickness used for pane resizing. |
| Modifier and Type | Member | Description |
|---|---|---|
| public | DockWorkspace | Creates an empty workspace with all side bars prepared. |
| Modifier and Type | Member | Description |
|---|---|---|
| public | activatePaneactivatePane(pane as DockPane) as Void |
Expands pane and collapses other panes on the same side. |
| public | addPaneaddPane(pane as DockPane) as Void |
Adds a side pane to the workspace. |
| public override | applyLayoutapplyLayout(recursive as Boolean = true) as Void |
No summary. |
| public | beginDragAt | Starts pane resize when x, y hits a separator. |
| public | dragTo | Resizes the currently dragged pane. |
| public | endDragendDrag() as Void |
Ends the current pane resize gesture. |
| public | findPane | Finds a pane by title and optional side. |
| public | handleDockButtonMousePressedAt | Handles only dock-button and pane-close-button mouse presses. |
| public | hidePane | Hides a pane without affecting other sides. |
| public | isResizeHandleAt | Returns true when x, y is over a pane resize handle. |
| public static | ownsContentOutline | Tests whether a view is inside a docking surface with a shared outline. |
| public override | paintpaint(painter as Painter) as Void |
No summary. |
| public override | paintForegroundpaintForeground(painter as Painter) as Void |
Restores selected-surface contours above dock icons, tabs and contents. |
| public override | paintOverlaypaintOverlay(painter as Painter) as Void |
No summary. |
| public | removePane | Removes a side pane and its fixed dock-bar button. |
| public | requestRelayoutrequestRelayout() as Void |
Recomputes child geometry and schedules a repaint. |
| public | resizeHandleOrientationAt | Returns horizontal or vertical for the resize handle under x, y. |
| public override | setBounds | No summary. |
| public | showPane | Shows a pane and collapses any other expanded pane on the same side. |
| public | togglePane | Toggles a pane between collapsed and expanded states. |
| public | updateDockHoverAt | Updates dock-button hover state from window-client coordinates. |