using System;
namespace Terminal.Gui {
///
/// An which allows passing a cancelable menu closing event.
///
public class MenuClosingEventArgs : EventArgs {
///
/// The current parent.
///
public MenuBarItem CurrentMenu { get; }
///
/// Indicates whether the current menu will reopen.
///
public bool Reopen { get; }
///
/// Indicates whether the current menu is a sub-menu.
///
public bool IsSubMenu { get; }
///
/// Flag that allows the cancellation of the event. If set to in the
/// event handler, the event will be canceled.
///
public bool Cancel { get; set; }
///
/// Initializes a new instance of .
///
/// The current parent.
/// Whether the current menu will reopen.
/// Indicates whether it is a sub-menu.
public MenuClosingEventArgs (MenuBarItem currentMenu, bool reopen, bool isSubMenu)
{
CurrentMenu = currentMenu;
Reopen = reopen;
IsSubMenu = isSubMenu;
}
}
}