Repository navigation
MenuBar
Home | API by Category | Complete API Index | API Status
| Field | Value |
|---|---|
| Full name | Electron2D.MenuBar |
| Namespace | Electron2D |
| Kind | class |
| Category | API Rendering |
Displays a themed horizontal menu strip for its direct ordinary PopupMenu children.
public class Electron2D.MenuBarMenus retain child identity across reordering. Titles follow each popup's Title or Name unless explicitly overridden. Header scene fields follow their popup when packing prunes siblings. Popup nodes retain normal scene ownership. Presentation uses the embedding viewport; system global menus require a native menu backend. Attached access requires the scene owner thread.
Inherits: Control
Kind: constructor
public MenuBar()Creates an empty menu strip with accessibility focus and shortcut input enabled.
Kind: method
protected override System.Func<Electron2D.Node> CreateSceneInstanceFactory()Kind: method
protected override System.Void Dispose(System.Boolean disposing)Kind: method
public System.Int32 GetMenuCount()Returns the number of direct ordinary PopupMenu children, including hidden and disabled menus.
The current menu count.
Kind: method
public Electron2D.PopupMenu GetMenuPopup(System.Int32 menu)Returns a borrowed popup without changing its parent or lifetime.
The corresponding child.
-
menu: A valid zero-based menu index.
Kind: method
public System.String GetMenuTitle(System.Int32 menu)Returns the explicit title or the child's current Title/Name.
The untranslated title.
-
menu: A valid menu index.
Kind: method
public System.String GetMenuTooltip(System.Int32 menu)Returns one menu's tooltip.
Empty initially.
-
menu: A valid menu index.
Kind: method
protected override System.Collections.Generic.IEnumerable<Electron2D.PropertyDescriptor> GetPropertyDescriptors()Kind: method
public System.Boolean IsMenuDisabled(System.Int32 menu)Returns whether user opening and shortcuts are disabled for one menu.
False initially.
-
menu: A valid menu index.
Kind: method
public System.Boolean IsMenuHidden(System.Int32 menu)Returns whether one menu is omitted from the strip and shortcuts.
False initially.
-
menu: A valid menu index.
Kind: method
public System.Boolean IsNativeMenu()Reports whether this strip currently uses a system global menu.
False for the current canvas menu backend, including native popup windows.
Kind: method
protected override System.Void OnGUIInput(Electron2D.InputEvent input)Kind: method
protected override Electron2D.Vector2 OnGetMinimumSize()Kind: method
protected override System.String OnGetTooltip(Electron2D.Vector2 atPosition)Kind: method
protected override System.Void OnNotification(System.Int32 what)Kind: method
protected override System.Void OnShortcutInput(Electron2D.InputEvent input)Kind: method
public System.Void SetDisableShortcuts(System.Boolean disabled)Disables the owner shortcut stage without changing individual popup item records.
-
disabled: Whether shortcuts are disabled.
Kind: method
public System.Void SetMenuDisabled(System.Int32 menu, System.Boolean disabled)Changes the disabled flag and closes this menu if necessary.
-
menu: A valid menu index. -
disabled: Whether interaction is disabled.
Kind: method
public System.Void SetMenuHidden(System.Int32 menu, System.Boolean hidden)Changes header visibility without changing child membership.
-
menu: A valid menu index. -
hidden: Whether the header is hidden.
Kind: method
public System.Void SetMenuTitle(System.Int32 menu, System.String title)Overrides one menu's title; matching the child's current Title/Name restores automatic naming.
-
menu: A valid menu index. -
title: Nonnull source text.
Kind: method
public System.Void SetMenuTooltip(System.Int32 menu, System.String tooltip)Changes one menu's tooltip.
-
menu: A valid menu index. -
tooltip: Nonnull source text.
Kind: method
protected override System.Void ValidateDisposal()Kind: method
protected override System.Void ValidateMutation()Kind: property
public System.Boolean Flat { get; set; }Gets or sets suppression of item decorations while retaining text and layout margins.
False initially.
Kind: property
public System.String Language { get; set; }Gets or sets the shaping language; empty uses the current translation locale.
Empty initially. NUL is rejected.
Kind: property
public System.Boolean SwitchOnHover { get; set; }Gets or sets hover switching while a menu in this strip is open.
True initially. Hidden, disabled and obscured targets are skipped.
Kind: property
public Electron2D.TextDirection TextDirection { get; set; }Gets or sets the base writing direction independently of visual layout direction.
Auto initially; Inherited follows layout direction.