#nullable enable
namespace Terminal.Gui;
///
/// is a menu item on . MenuBarItems do not support
/// .
///
public class MenuBarItem : MenuItem
{
/// Initializes a new as a .
/// Title for the menu item.
/// Help text to display. Will be displayed next to the Title surrounded by parentheses.
/// Action to invoke when the menu item is activated.
/// Function to determine if the action can currently be executed.
/// The parent of this if any.
public MenuBarItem (
string title,
string help,
Action action,
Func? canExecute = null,
MenuItem? parent = null
) : base (title, help, action, canExecute, parent)
{
SetInitialProperties (title, null, null, true);
}
/// Initializes a new .
/// Title for the menu item.
/// The items in the current menu.
/// The parent of this if any.
public MenuBarItem (string title, MenuItem [] children, MenuItem? parent = null) { SetInitialProperties (title, children, parent); }
/// Initializes a new with separate list of items.
/// Title for the menu item.
/// The list of items in the current menu.
/// The parent of this if any.
public MenuBarItem (string title, List