Class MenuBar | Terminal.Gui v2 (original) (raw)
Namespace
Assembly
Terminal.Gui.dll
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.
[Obsolete("Use MenuBarv2 instead.", false)]
public class MenuBar : View, IDisposable, ISupportInitializeNotification, ISupportInitialize, IDesignable
Inheritance
MenuBar
Implements
Inherited Members
Constructors
Initializes a new instance of the MenuBar.
Properties
The specifier character for the hot keys.
true if the menu is open; otherwise true.
The Key used to activate or close the menu bar by keyboard. The default is F9.
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 theMenuBar is visible.
The default LineStyle for Menus's border. The default isSingle.
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 setting UseSubMenusSingleFrame totrue, 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 View is visible.
Methods
Closes the Menu programmatically if open and not canceled (as though F9 were pressed).
Causes the View to enable design-time mode. This typically means that the view will load demo data and be configured to allow for design-time manipulation.
Called when the View's content is to be drawn. The default implementation does nothing.
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.
Called when a mouse event occurs within the view's Viewport.
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.
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.