Menu.menuSourceMenu widget.
A menu inherited from Pack.box to arrange its items. Regular menus have vertical orientation (i.e. items are packed vertically, but horizontal orientation is supported.
inherit Stk.Pack.boxClose the menu window if it exists (i.e. if menu is displayed). This also closes windows attached to the submenus of its items.
Create a new window to display the menu. Optional parameters:
x and y for top-left coordoninates of the window. Default is to use mouse position.on_close specifies a function to be called when the menu is closed. Argument indicates if the menu is the last still displayed.method add_item : ?pos:int -> menuitem -> unitMenu items must be added using this method rather than (inherited) #pack. pos can be used to specify the 0-based position of the item among items already present. Default is to insert after all existing items.
method append_item : menuitem -> unitSame as menu.add_item but insert item as last item.
method prepend_item : menuitem -> unitSame as menu.add_item but insert item as first item.
method remove_item : menuitem -> unitMenu items must be removed using this method rather than (inherited) #unpack.