Assembly: Terminal.Gui.dll
public class MenuBarItem : MenuItem
Constructors
|
Edit this page
View Source
Declaration
|
Edit this page
View Source
Declaration
public MenuBarItem(ustring title, ustring help, Action action, Func<bool> canExecute = null, MenuItem parent = null)
Parameters
| Type |
Name |
Description |
| ustring |
title |
Title for the menu item. |
| ustring |
help |
Help text to display. Will be displayed next to the Title surrounded by parentheses. |
| Action |
action |
Action to invoke when the menu item is activated. |
| Func<bool> |
canExecute |
Function to determine if the action can currently be executed. |
| MenuItem |
parent |
The parent MenuItem of this if exist, otherwise is null. |
|
Edit this page
View Source
Initializes a new
MenuBarItem with separate list of items.
Declaration
public MenuBarItem(ustring title, List<MenuItem[]> children, MenuItem parent = null)
Parameters
| Type |
Name |
Description |
| ustring |
title |
Title for the menu item. |
| List<MenuItem[]> |
children |
The list of items in the current menu. |
| MenuItem |
parent |
The parent MenuItem of this if exist, otherwise is null. |
|
Edit this page
View Source
Declaration
public MenuBarItem(ustring title, MenuItem[] children, MenuItem parent = null)
Parameters
| Type |
Name |
Description |
| ustring |
title |
Title for the menu item. |
| MenuItem[] |
children |
The items in the current menu. |
| MenuItem |
parent |
The parent MenuItem of this if exist, otherwise is null. |
|
Edit this page
View Source
Declaration
public MenuBarItem(MenuItem[] children)
Parameters
| Type |
Name |
Description |
| MenuItem[] |
children |
The items in the current menu. |
Properties
|
Edit this page
View Source
Declaration
public MenuItem[] Children { get; set; }
Property Value
| Type |
Description |
| MenuItem[] |
The children. |
Methods
|
Edit this page
View Source
Get the index of the
MenuItem parameter.
Declaration
public int GetChildrenIndex(MenuItem children)
Parameters
Returns
| Type |
Description |
| int |
Returns a value bigger than -1 if the MenuItem is a child of this. |
|
Edit this page
View Source
Check if the
MenuItem parameter is a child of this.
Declaration
public bool IsSubMenuOf(MenuItem menuItem)
Parameters
Returns
| Type |
Description |
| bool |
Returns true if it is a child of this. false otherwise. |
|
Edit this page
View Source
Declaration
public MenuBarItem SubMenu(MenuItem children)
Parameters
Returns