Class MenuBar | Terminal.Gui v1 (original) (raw)
Provides a menu bar that spans the top of a Toplevel View with drop-down and cascading menus.
By default, any sub-sub-menus (sub-menus of the MenuItems added to MenuBarItems) are displayed in a cascading manner, where each sub-sub-menu pops out of the sub-menu frame (either to the right or left, depending on where the sub-menu is relative to the edge of the screen). By settingUseSubMenusSingleFrame to true, this behavior can be changed such that all sub-sub-menus are drawn within a single frame below the MenuBar.
public class MenuBar : View, IDisposable, ISupportInitializeNotification, ISupportInitialize
Inheritance
MenuBar
Implements
Inherited Members
Remarks
Constructors
Initializes a new instance of the MenuBar.
Initializes a new instance of the MenuBar class with the specified set of toplevel menu items.
Properties
The specifier character for the hotkey to all menus.
true if the menu is open; otherwise true.
The Key used to activate the menu bar by keyboard.
Gets the view that was last focused before opening the menu.
Gets or sets the array of MenuBarItems for the menu. Only set this after the MenuBar is visible.
Sets or gets the shortcut delimiter separator. The default is "+".
Used for change the navigation key style.
Gets or sets if the sub-menus must be displayed in a single or multiple frames.
By default any sub-sub-menus (sub-menus of the main MenuItems) are displayed in a cascading manner, where each sub-sub-menu pops out of the sub-menu frame (either to the right or left, depending on where the sub-menu is relative to the edge of the screen). By settingUseSubMenusSingleFrame to true, this behavior can be changed such that all sub-sub-menus are drawn within a single frame below the MenuBar.
Gets or sets a value indicating whether this Responder and all its child controls are displayed.
Methods
Closes the Menu programmatically if open and not canceled (as though F9 were pressed).
Method invoked when a mouse event is generated
Method invoked when a view gets focus.
Method invoked when a key is pressed.
Method invoked when a key is released.
Method invoked when a view loses focus.
Virtual method that will invoke the MenuAllClosed.
OnMenuClosing(MenuBarItem, bool, bool)
Virtual method that will invoke the MenuClosing.
Virtual method that will invoke the MenuOpened event if it's defined.
Virtual method that will invoke the MenuOpening event if it's defined.
Opens the Menu programatically, as though the F9 key were pressed.
Positions the cursor in the right position based on the currently focused view in the chain.
This method can be overwritten by views that want to provide accelerator functionality (Alt-key for example), but without interefering with normal ProcessKey behavior.
This method can be overwritten by view that want to provide accelerator functionality (Alt-key for example).
If the view is focused, gives the view a chance to process the keystroke.
Redraws this view and its subviews; only redraws the views that have been flagged for a re-display.
Events
Raised when all the menu is closed.
Raised when a menu is closing passing MenuClosingEventArgs.
Raised when a menu is opened.
Raised as a menu is opening.