NAME
IUP::Submenu - [GUI element] menu item that, when selected, opens another menu
DESCRIPTION
Creates a menu item that, when selected, opens another menu.
USAGE
CREATION - new() method
$submenu = IUP::Submenu->new( TITLE=>"Name", child=>$menu_element );
child: (named parameter) optional child menu reference. Can be undef
or ommited.
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.
ATTRIBUTES
For more info about concept of attributes (setting/getting values etc.) see IUP::Manual::03_Attributes. Attributes specific to this element:
- IMAGE
-
[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.
- TITLE
-
(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.
- WID
-
(non inheritable)
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:
CALLBACKS
For more info about concept of callbacks (setting callback handlers etc.) see IUP::Manual::04_Callbacks. Callbacks specific to this element:
- HIGHLIGHT_CB
-
Action generated when the submenu is highlighted.
The following common callbacks are also accepted:
NOTES
In Motif and GTK, the text font will be affected by the dialog font when the menu is mapped.
EXAMPLES
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
SEE ALSO
IUP::Item, IUP::Separator, IUP::Menu
The original doc: iupsubmenu.html