IUP::Submenu - [GUI element] menu item that, when selected, opens another menu
Creates a menu item that, when selected, opens another menu.
$submenu = IUP::Submenu->new( TITLE=>"Name", child=>$menu_element );
child: (named parameter) optional child menu reference. Can be undef or ommited.
undef
Returns: the identifier of the created element, or undef if an error occurs.
NOTE: You can pass to new() other ATTRIBUTE=>'value' or CALLBACKNAME=>\&func pairs relevant to this element - see IUP::Manual::02_Elements.
new()
ATTRIBUTE=>'value'
CALLBACKNAME=>\&func
For more info about concept of attributes (setting/getting values etc.) see IUP::Manual::03_Attributes. Attributes specific to this element:
[Windows and GTK Only] (non inheritable)
Image name of the submenu image. In Windows, an item in a menu bar cannot have a check mark. Ignored if submenu in a menu bar. A recommended size would be 16x16 to fit the image in the menu item. In Windows, if larger than the check mark area it will be cropped.
(non inheritable)
Submenu Text. The "&" character can be used to define a mnemonic, the next character will be used as key. Use "&&" to show the "&" character instead on defining a mnemonic.
In Windows, returns the HMENU of the parent menu and it is actually created only when its child menu is mapped.
The following common attributes are also accepted:
ACTIVE
For more info about concept of callbacks (setting callback handlers etc.) see IUP::Manual::04_Callbacks. Callbacks specific to this element:
Action generated when the submenu is highlighted.
The following common callbacks are also accepted:
MAP_CB, UNMAP_CB
In Motif and GTK, the text font will be affected by the dialog font when the menu is mapped.
The element IUP::Submenu is used in the following sample scripts:
0-basic/dialog2.pl - IUP::Dialog example
0-basic/item.pl - IUP::Item Example
0-basic/layoutdialog.pl - IUP::LayoutDialog example
0-basic/menu.pl - IUP::Menu example
0-basic/separator.pl - IUP::Separator example
0-basic/submenu.pl - IUP::Submenu example
1-apps/app-mdi.pl - IUP app example
1-apps/app-sample1.pl - example used for screenshot - IUP.pod
1-apps/app-sample2.pl - example based on the original sample.c
IUP::Item, IUP::Separator, IUP::Menu
The original doc: iupsubmenu.html
To install IUP, copy and paste the appropriate command in to your terminal.
cpanm
cpanm IUP
CPAN shell
perl -MCPAN -e shell install IUP
For more information on module installation, please visit the detailed CPAN module installation guide.