WindowTitleBar
classin packageklyn.gui.windows
public class WindowTitleBar extends Container
└ WindowTitleBar

Window-owned host for interactive title-bar content.

A Klyn frame integrates the content beside its caption controls. A native frame integrates it when the platform supports that operation; otherwise the same host is placed below the OS title and above the window menu. WindowFrame and its selected value are never changed by this host.

Example
window = MainWindow("Documents")
window.titleBar.content = Button("New document")
window.show()
Properties
Modifier and Type Member Description
public property content
content as Widget
Custom widget, or null to restore the ordinary window title.
public readonly property isIntegrated
isIntegrated as Boolean
Whether custom content occupies the actual title band.
public property minimumDragWidth
minimumDragWidth as Int
Logical width of the free drag area beside integrated content.
public property showTitle
showTitle as Boolean
Whether the window title remains beside integrated custom content.
Inherited Properties
propertyInherited Properties from Container: autoRelayout, childCount, layout, padding
propertyInherited Properties from Widget: accentColor, acceptFileDrops, backgroundColor, borderColor, bottom, canFocus, cornerRadius, cursor, font, foregroundColor, hasFocus, height, isEnabled, isHovered, isManaged, isPressed, isTabStop, isVisible, layoutParams, margin, maxHeight, maxWidth, minHeight, minWidth, parent, preferredHeight, preferredWidth, resolvedStyleCache, resolvedStyleCacheAppearanceMode, resolvedStyleCacheFont, resolvedStyleCacheRevision, resolvedStyleCacheStateKey, resolvedStyleCacheStyleClass, resolvedStyleCacheZoomRevision, right, size, sizePolicy, styleClass, toolTip, width, window, x, y
Inherited Events
eventInherited Events from Widget: filesDropped, focusGained, focusLost, keyPressed, keyReleased, mouseMoved, mousePressed, mouseReleased, mouseWheel, paintRequested, resized
Constructors
Modifier and Type Member Description
public WindowTitleBar Creates an empty host.
Methods
Modifier and Type Member Description
public _place
_place(integrated as Boolean, x as Int, y as Int, width as Int, height as Int) as Void
Internal frame-layout hook; positions the host and its single child.
public override add
add(widget as Widget) as Void
Sets the single hosted widget through the Container API.
public override clear
clear() as Void
Clears content through the Container API and updates window geometry.
public override isTitleBarDragRegion
isTitleBarDragRegion(x as Int, y as Int) as Boolean
Identifies the unused host background as a window drag region.
public override paint
paint(painter as Painter) as Void
Clips content before the reserved drag area, including oversized widgets.
public override preferredSizeIncludesContentZoom
preferredSizeIncludesContentZoom() as Boolean
Reports that preferred heights already include the active scale.
public override remove
remove(widget as Widget) as Boolean
Removes the hosted widget and restores the normal title band.
public override resolvePreferredHeight
resolvePreferredHeight() as Int
Resolves the host height from its content and the active scale.
public override setBounds
setBounds(x as Int, y as Int, width as Int, height as Int) as Void
Keeps hosted content within its allocated frame or fallback row.
Inherited Methods
methodInherited Methods from Container: add, applyLayout, attachWindow, blur, children, clear, paintOverlay, remove, withLayout
methodInherited Methods from Widget: applyThemeMetrics, blur, containsPoint, emitFilesDropped, emitFocusGained, emitFocusLost, emitKeyPressed, emitKeyReleased, emitMouseMoved, emitMousePressed, emitMouseReleased, emitMouseWheel, handleTabKey, isTitleBarDragRegion, notifyPaintRequested, paint, paintClipped, paintForeground, paintOverlay, preferredSizeIncludesContentZoom, repaint, requestFocus, resolvePreferredHeight, resolvePreferredWidth, resolvedFont, setBounds
Inherited Operators
operatorInherited Operators from Container: operator[](index as Int) as Widget, operator[](index as UInt) as Widget