MainWindow
classin packageklyn.gui.windows
public class MainWindow extends Window
└ Window
└ MainWindow

Main application window.

Window dimensions include the complete frame. The central container fills the available client area below the menu bar, excluding the frame. Built-in themes impose no window padding. Use an explicit container margin for outer spacing, or container padding to inset its children. The optional spaced-content container style supplies a theme-scaled 10-pixel margin.

win = MainWindow("Demo")
win.centralWidget.layout = VBoxLayout(spacing=12)
win.centralWidget.styleClass = "spaced-content"
win.applyTheme()
Properties
Modifier and Type Member Description
public property centralWidget
centralWidget as Container = Container()
No summary.
public property menuBar
menuBar as MenuBar = null
No summary.
Inherited Properties
propertyInherited Properties from Window: appearanceMode, clientHeight, clientSize, clientWidth, focusedWidget, frame, icon, isVisible, title
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 Window: closed
eventInherited Events from Widget: filesDropped, focusGained, focusLost, keyPressed, keyReleased, mouseMoved, mousePressed, mouseReleased, mouseWheel, paintRequested, resized
Constructors
Modifier and Type Member Description
public MainWindow
MainWindow(title as String = "")
No summary.
Methods
Modifier and Type Member Description
public override applyLayout
applyLayout() as Void
No summary.
public override applyTheme
applyTheme(mode as String = null) as Void
Applies the active KSS theme to the complete window tree.
public override paint
paint(painter as Painter) as Void
Paints the main window background and its central widget tree using the active KSS theme.
public override relayout
relayout() as Void
No summary.
public override render
render(painter as Painter) as Void
No summary.
public override setBounds
setBounds(x as Int, y as Int, width as Int, height as Int) as Void
No summary.
Inherited Methods
methodInherited Methods from Window: adjustContentZoom, adjustFontZoom, applyContentZoom, applyLayout, applyNativeFrame, applyTheme, capture, capture, centerIn, close, copyToClipboard, emitClosed, getPlacement, maximize, readFromClipboard, relayout, render, repaint, repaintWidget, resetContentZoom, resetFontZoom, restore, run, setPlacement, show, simulateFilesDropped, simulateMouseClick, simulateMousePressed, simulateMouseReleased, syncContentZoomSize, theme
methodInherited Methods from Widget: applyThemeMetrics, blur, containsPoint, emitFilesDropped, emitFocusGained, emitFocusLost, emitKeyPressed, emitKeyReleased, emitMouseMoved, emitMousePressed, emitMouseReleased, emitMouseWheel, handleTabKey, notifyPaintRequested, paint, paintClipped, paintForeground, paintOverlay, preferredSizeIncludesContentZoom, repaint, requestFocus, resolvePreferredHeight, resolvePreferredWidth, resolvedFont, setBounds