DockWorkspace
classin packageklyn.gui.windows
public class DockWorkspace extends Container:
└ DockWorkspace

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)
Properties
Modifier and Type Member Description
public property barSize
barSize as Int = 42
Fixed dock bar thickness in pixels.
public readonly property center
center as DockCenterArea:
Central tab area.
public property handleSize
handleSize as Int = 7
Separator thickness used for pane resizing.
Inherited Properties
propertyInherited Properties from Container: autoRelayout, layout, padding, size
propertyInherited Properties from Widget: accentColor, backgroundColor, borderColor, bottom, canFocus, cornerRadius, font, foregroundColor, hasFocus, height, isEnabled, isHovered, isManaged, isTabStop, isVisible, layoutParams, margin, maxHeight, maxWidth, minHeight, minWidth, parent, preferredHeight, preferredWidth, right, sizePolicy, styleClass, width, window, x, y
Inherited Events
eventInherited Events from Widget: keyPressed, keyReleased, mouseMoved, mousePressed, mouseReleased, mouseWheel, paintRequested, resized
Constructors
Modifier and Type Member Description
public DockWorkspace Creates an empty workspace with all side bars prepared.
Methods
Modifier and Type Member Description
public activatePane
activatePane(pane as DockPane) as Void:
Expands pane and collapses other panes on the same side.
public addPane
addPane(pane as DockPane) as Void:
Adds a side pane to the workspace.
public override applyLayout
applyLayout(recursive as Boolean = true) as Void:
No summary.
public beginDragAt
beginDragAt(x as Int, y as Int) as Boolean:
Starts pane resize when x, y hits a separator.
public dragTo
dragTo(x as Int, y as Int) as Boolean:
Resizes the currently dragged pane.
public endDrag
endDrag() as Void:
Ends the current pane resize gesture.
public findPane
findPane(title as String, side as String = "") as DockPane:
Finds a pane by title and optional side.
public handleDockButtonMousePressedAt
handleDockButtonMousePressedAt(x as Int, y as Int) as Boolean:
Handles only dock-button and pane-close-button mouse presses.
public hidePane
hidePane(title as String, side as String = "") as Boolean:
Hides a pane without affecting other sides.
public isResizeHandleAt
isResizeHandleAt(x as Int, y as Int) as Boolean:
Returns true when x, y is over a pane resize handle.
public override paint
paint(painter as Painter) as Void:
No summary.
public override paintOverlay
paintOverlay(painter as Painter) as Void:
No summary.
public requestRelayout
requestRelayout() as Void:
Recomputes child geometry and schedules a repaint.
public resizeHandleOrientationAt
resizeHandleOrientationAt(x as Int, y as Int) as String:
Returns horizontal or vertical for the resize handle under x, y.
public override setBounds
setBounds(x as Int, y as Int, width as Int, height as Int) as Void:
No summary.
public showPane
showPane(title as String, side as String = "") as Boolean:
Shows a pane and collapses any other expanded pane on the same side.
public togglePane
togglePane(title as String, side as String = "") as Boolean:
Toggles a pane between collapsed and expanded states.
Inherited Methods
methodInherited Methods from Container: add, applyLayout, attachWindow, children, clear, remove, withLayout
methodInherited Methods from Widget: blur, containsPoint, emitKeyPressed, emitKeyReleased, emitMouseMoved, emitMousePressed, emitMouseReleased, emitMouseWheel, handleTabKey, notifyPaintRequested, paint, paintOverlay, repaint, requestFocus, resolvePreferredHeight, resolvePreferredWidth, resolvedFont, setBounds
Inherited Operators
operatorInherited Operators from Container: operator[](index as Int) as Widget:, operator[](index as UInt) as Widget: