class Iup::MenuItem

A menu item is the interactive part of a menu, and acts like a button. The menu item can display a simple text label, an image, or act as a check box. When placed within a menu with the radio flag set, several menu items can act as a radio button group within a menu.

Example

(1) Item with text and action.

item_exit = Iup::MenuItem.new('Exit', ->{ Iup::CLOSE })

(2) Checkbox

show_toolbar = Iup::MenuItem.new('Show toolbar') do |i|
  i.value = :off # assign a value to make menu item a checkbox
  i.autotoggle = :yes # allow value to change when menu item clicked
end

Placing a set of checkbox menuitems into a Menu with radio set turns the menuitems into a linked radio group.

See also: Menu, Separator, SubMenu.