Stk.Menu
Menus and menubars.
A menu item with a menu attached can be either Folded
or Unfolded
.
Property "item_menu_state"
for menu state. Default is Folded
.
val shortcut : Key.keystate Props.prop
Keyboard "shortcut"
property for a menu.
An entry in a menu. The child of the entry is displayed in the menu. A (sub)menu can be attached to the item. In this case, when the item is unfolded, its attached menu is displayed.
Menu widget.
Menubar widget.
Convenient function to create a menubar
. Optional argument orientation
defines vertical or horizontal orientation; default is Horizontal
. See widget_arguments
for other arguments.
Convenient function to create a menuitem
. Optional argument shortcut
defines keyboard shortcut. See widget_arguments
for other arguments.
Convenient function to create a menuitem
with a horizontal Pack.box
child. Two label widgets are added to the box. The first one is the label of the item (with initial text
if provided). Optional argument shortcut
defines keyboard shortcut and it is displayed in the second label (which has class_
"menuitem_shortcut"
). See widget_arguments
for other arguments. The function returns the menu item and the first label (the one for the menu item text).
Convenient function to create a menu
. Optional argument orientation
defines vertical or horizontal orientation; default is Vertical
. See widget_arguments
for other arguments.
Menu entry description:
`I (text, cb)
is a label item with text
, and cb
is called when item is activated.`C (text, init, cb)
is a checkbox item with text
; init
indicates whether the box is checked and cb
is called with state when item is activated.`R [(text1, init1, cb1) ; ...]
is same as `C
but describes a list of radiobuttons.`M (text, entries)
describes a submenu with text
for the menu item and a list of entries.popup_menu_entries entries
create a menu according to the entries
description and pops it up. The menu is closed when an item is activated (or an event occurs closing menu windows). This function is typically used for contextual menus.