Constructor

@:value({ text : null, index : -1, data : null })new(?data:Dynamic, index:Int = -1, ?text:String)

Creates a new MenuItemState object with the given arguments.

Available since

1.4.0

.

Variables

@:value(false)branch:Bool = false

Returns whether the item is a branch or not.

Available since

1.4.0

.

data:Dynamic

An item from the collection used as the Menu data provider.

Available since

1.4.0

.

@:value(true)enabled:Bool = true

Returns whether the item is enabled or not.

Available since

1.4.0

.

See also:

@:value(-1)index:Int = -1

The position of the data within the collection used as the Menu data provider.

Available since

1.4.0

.

menuBarOwner:MenuBar

Returns a reference to the MenuBar that contains this menu item. A Menu is not required to be associated with a MenuBar, so this value may be null.

Available since

1.4.0

.

menuOwner:Menu

Returns a reference to the Menu that contains this item. A menu item may be added to a MenuBar instead of a Menu, so this value may be null.

Available since

1.4.0

.

@:value(false)selected:Bool = false

Returns whether the item is selected or not.

Available since

1.4.0

.

See also:

@:value(false)separator:Bool = false

Returns whether the item is a separator or not.

Available since

1.4.0

.

text:String

Returns the text to display for the item, as returned by the function MenuBar.itemToText or Menu.itemToText.

Available since

1.4.0

.

See also: