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.
workspace = DockWorkspace()
workspace.center.addTab("Welcome", Label("Ready"), false)
workspace.addPane(DockPane("Projects", ProjectExplorerPane(), DockSide.LEFT))
workspace.addPane(DockPane("Terminal", TerminalExecutionPane(), DockSide.BOTTOM))
window.setCentralWidget(workspace)| Modifier and Type | Member | Description |
|---|---|---|
| public property | barSizebarSize as Int = 42 |
Fixed dock bar thickness in pixels. |
| public readonly property | centercenter as DockCenterArea: |
Central tab area. |
| 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 override | paintpaint(painter as Painter) as Void: |
No summary. |
| public override | paintOverlaypaintOverlay(painter as Painter) as Void: |
No summary. |
| 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. |