MenuBar
class in package klyn.gui.windows

    public class MenuBar extends Widget:

Widget
└ MenuBar

Menu bar of a window.

    bar = MenuBar()
    bar.addMenu(Menu("File"))
    window.menuBar = bar

Inherited Properties
property Inherited Properties from Widget: accentColor, backgroundColor, borderColor, bottom, canFocus, cornerRadius, cursor, font, foregroundColor, hasFocus, height, isEnabled, isHovered, isManaged, 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
event Inherited Events from Widget: keyPressed, keyReleased, mouseMoved, mousePressed, mouseReleased, mouseWheel, paintRequested, resized
Constructors

Modifier and Type | Member | Description
--- | --- | ---
public | MenuBar `MenuBar():` | No summary.

Methods

Modifier and Type | Member | Description
--- | --- | ---
public | activateMnemonic `activateMnemonic(key as String) as Boolean:` | Opens the top-level menu matching an Alt mnemonic.
public | addMenu `addMenu(menu as Menu) as Void:` | Adds a top-level menu.
public | closeOpenMenu `closeOpenMenu() as Void:` | Closes the currently opened menu and clears transient hover state.
public | handleKeyPressed `handleKeyPressed(key as String) as Boolean:` | Handles keyboard navigation while a menu popup is opened.
public | menus `menus() as List<Menu>:` | Returns top-level menus.
public override | paint `paint(painter as Painter) as Void:` | No summary.
public override | paintOverlay `paintOverlay(painter as Painter) as Void:` | No summary.
public | popupContainsPoint `popupContainsPoint(x as Int, y as Int) as Boolean:` | Returns true when a point falls inside the currently open popup.
public | removeMenu `removeMenu(menu as Menu) as Boolean:` | Removes a top-level menu.
public override | resolvePreferredHeight `resolvePreferredHeight() as Int:` | Resolved menu-bar height after runtime content zoom.

Inherited Methods
method Inherited Methods from Widget: blur, containsPoint, emitKeyPressed, emitKeyReleased, emitMouseMoved, emitMousePressed, emitMouseReleased, emitMouseWheel, handleTabKey, notifyPaintRequested, paint, paintClipped, paintOverlay, repaint, requestFocus, resolvePreferredHeight, resolvePreferredWidth, resolvedFont, setBounds