public class DockPane extends Container:
Retractable and resizable side panel hosted by a DockWorkspace.
A pane owns a content widget, a logical side and a preferred dock size. The workspace displays at most one expanded pane per side; collapsed panes remain reachable through their side DockBar button.
workspace = DockWorkspace()
pane = DockPane("Projects", ProjectExplorerPane(), DockSide.LEFT, "assets/icons/ui/project-explorer.svg")
pane.dockSize = 320
workspace.addPane(pane)| Modifier and Type | Member | Description |
|---|---|---|
| public readonly property | contentcontent as Widget: |
Content widget hosted by this pane. |
| public property | dockSizedockSize as Int = 300 |
Current preferred size in the docking direction. |
| public property | headerHeightheaderHeight as Int = 34 |
Header height in pixels. |
| public property | iconicon as String |
Optional SVG icon path or symbolic icon name. |
| public property | isCollapsedisCollapsed as Boolean = false |
Collapsed panes are hidden but keep their button in the DockBar. |
| public property | minimumDockSizeminimumDockSize as Int = 180 |
Minimal pane size while resizing. |
| public property | sideside as String |
Dock side, one of DockSide.LEFT, RIGHT, BOTTOM or TOP. |
| public property | titletitle as String |
Visible title shown in the pane header and dock bar. |
| Modifier and Type | Member | Description |
|---|---|---|
| public | DockPane | Creates a dock pane around a content widget. |
| Modifier and Type | Member | Description |
|---|---|---|
| public override | applyLayoutapplyLayout(recursive as Boolean = true) as Void: |
No summary. |
| public | attachWorkspaceattachWorkspace(workspace as DockWorkspace) as Void: |
Called by DockWorkspace when the pane is inserted. |
| public | collapsecollapse() as Void: |
Collapses this pane. |
| public | collapseButtonContains | Returns true when x, y hits the pane collapse button. |
| public | expandexpand() as Void: |
Expands this pane and collapses other panes on the same side. |
| public | handleMousePressedAt | Handles a mouse press in pane coordinates. |
| public override | paintpaint(painter as Painter) as Void: |
No summary. |
| public override | paintOverlaypaintOverlay(painter as Painter) as Void: |
No summary. |
| public override | setBounds | No summary. |
| public | setContentsetContent(content as Widget) as Void: |
Replaces the hosted content widget while keeping the pane and dock button. |
| public | toggletoggle() as Void: |
Toggles the collapsed state. |