MenuItem - Garland-g/perl6-libui GitHub Wiki

MenuItem

Libui::MenuItem

An item in a Menu. They can only be created by Menu methods.

Methods

enable()

Enables the MenuItem, allowing it to be clicked.

disable()

Disables the MenuItem, preventing it from being clicked.

clicked() returns Supply

Returns a Supply. An event is emitted whenever the MenuItem is clicked.

checked() returns Bool

Returns True if the MenuItem is checked.

set-checked(Bool:D(Int) $checked) or checked(Bool:D(Int) $checked)

Sets the MenuItem's checked state.