MenuWidget
Namespace: Hex1b.Widgets
Assembly: Hex1b.dll
A menu that can contain menu items, separators, and submenus. When used in a MenuBar, renders as a clickable trigger. When used in another Menu, renders as a submenu item with an arrow indicator.
public sealed record MenuWidget : Hex1bWidget, IEquatable<Hex1bWidget>, IMenuChild, IEquatable<MenuWidget>Inheritance
Object → Hex1bWidget → MenuWidget
Implements
Constructors
MenuWidget(string, IReadOnlyList<IMenuChild>)
A menu that can contain menu items, separators, and submenus. When used in a MenuBar, renders as a clickable trigger. When used in another Menu, renders as a submenu item with an arrow indicator.
Parameters:
Label(String): The display label for the menu.Children(IReadOnlyList<IMenuChild>): The menu's children (items, separators, submenus).
public MenuWidget(string Label, IReadOnlyList<IMenuChild> Children)Properties
Children
The menu's children (items, separators, submenus).
Returns: IReadOnlyList<IMenuChild>
public IReadOnlyList<IMenuChild> Children { get; init; }Label
The display label for the menu.
Returns: String
public string Label { get; init; }Methods
NoAccelerator()
Disables automatic accelerator assignment for this menu.
Returns: MenuWidget
public MenuWidget NoAccelerator()Fields
Close
Rebindable action: Close the parent menu.
Returns: ActionId
public static readonly ActionId CloseFocusNextInBar
Rebindable action: Focus next menu in bar.
Returns: ActionId
public static readonly ActionId FocusNextInBarFocusPreviousInBar
Rebindable action: Focus previous menu in bar.
Returns: ActionId
public static readonly ActionId FocusPreviousInBarNavigatePrevious
Rebindable action: Navigate to previous menu.
Returns: ActionId
public static readonly ActionId NavigatePreviousNextItem
Rebindable action: Move to next item in popup.
Returns: ActionId
public static readonly ActionId NextItemOpen
Rebindable action: Open the menu or submenu.
Returns: ActionId
public static readonly ActionId OpenPreviousItem
Rebindable action: Move to previous item in popup.
Returns: ActionId
public static readonly ActionId PreviousItem