Menu
classin packageklyn.gui.windows
public class Menu extends Widget:
file = Menu("&File")
file.addItem(MenuItem("&Open..."))
file.addSeparator()
file.addItem(MenuItem("E&xit"))
Properties
| Modifier and Type |
Member |
Description |
| public property |
title |
Text displayed for a top-level menu or submenu entry. |
Inherited Properties
propertyInherited 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
Constructors
| Modifier and Type |
Member |
Description |
| public |
Menu |
Creates an empty menu. |
Methods
| Modifier and Type |
Member |
Description |
| public |
addItem |
Appends an action or submenu item. |
| public |
addMenu |
Appends a submenu and returns its owning menu item. |
| public |
addSeparator addSeparator() as Void:
|
Appends a visual separator between two logical action groups. |
| public |
items |
Returns the entries in display order. |
| public |
removeItem |
Removes one entry. |
Inherited Methods
methodInherited Methods from Widget: blur,
containsPoint,
emitKeyPressed,
emitKeyReleased,
emitMouseMoved,
emitMousePressed,
emitMouseReleased,
emitMouseWheel,
handleTabKey,
notifyPaintRequested,
paint,
paintClipped,
paintOverlay,
repaint,
requestFocus,
resolvePreferredHeight,
resolvePreferredWidth,
resolvedFont,
setBounds