class Iup::SubMenu
A menu item that, when selected, opens another menu. Apart from its text label, a menu item may include an optional image.
Example
The following line associates the βFileβ name with its menu, ready to place into a parent menu:
file_submenu = Iup::SubMenu.new('File', file_menu))
Attributes
Image name or instance to show on menu. This can use an actual image object, or the name of an image from IupImageLib.
String to show on menu.
Native widget identifier.
Public Class Methods
Source
# File lib/wrapped/submenu.rb, line 24 def initialize title, child_menu @handle = IupLib.IupSubmenu(title, child_menu.handle) # run any provided block on instance, to set up further attributes yield self if block_given? end
Creates instance of a submenu. If a block is given, the new instance is yielded to it.
-
title- displayed name of menu -
child_menu- child menu to open