Class PopoverMenu | Terminal.Gui v2 (original) (raw)
Namespace
Assembly
Terminal.Gui.dll
Provides a cascading menu that pops over all other content. Can be used as a context menu or a drop-down all other content. Can be used as a context menu or a drop-down menu as part of MenuBarv2 as part of MenuBarv2.
public class PopoverMenu : PopoverBaseImpl, IDisposable, ISupportInitializeNotification, ISupportInitialize, IPopover, IDesignable
Inheritance
PopoverMenu
Implements
Inherited Members
Constructors
Initializes a new instance of the PopoverMenu class.
Initializes a new instance of the PopoverMenu class. If any of the elements ofmenuItems
is null, a see Line will be created instead.
Initializes a new instance of the PopoverMenu class with the specified root Menuv2.
Properties
The default key for activating popover menus.
Specifies the key that will activate the context menu.
The mouse flags that will cause the popover menu to be visible. The default isButton3Clicked which is typically the right mouse button.
Gets or sets the Menuv2 that is the root of the Popover Menu.
Methods
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
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.
Gets all the submenus in the PopoverMenu.
Makes the popover menu visible and locates it at idealScreenPosition
. The actual position of the menu will be adjusted to ensure the menu fully fits on the screen, and the mouse cursor is over the first cell of the first MenuItem.
Called when the user has accepted an item in this menu (or submenu. This is used to determine when to hide the menu.
Called when the user is accepting the state of the View and the Accept has been invoked. Set CommandEventArgs.Cancel totrue and return true to stop processing.
Called when the user has pressed key it wasn't handled by KeyDown and was not bound to a key binding.
Called when a SubView has been added to this View.
Called when Visible has changed.
RaiseAccepted(ICommandContext?)
Raises the OnAccepted(CommandEventArgs)/Accepted event indicating a menu (or submenu) was accepted and the Menus in the PopoverMenu were hidden. Use this to determine when to hide the PopoverMenu.
Locates the popover menu at idealScreenPosition
. The actual position of the menu will be adjusted to ensure the menu fully fits on the screen, and the mouse cursor is over the first cell of the first MenuItem (if possible).
Events
Raised when the user has accepted an item in this menu (or submenu. This is used to determine when to hide the menu.
Raised when Key is changed.