Class Menu.menubar

Menubar widget.

This widget inherits from Pack.box, with horizontal orientation by default, but vertical orientation is supported.

inherit Stk.Pack.box
method add_item : ?pos:int -> menuitem -> unit

Menu 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 -> unit

Same as menubar.add_item but insert item as last item.

method prepend_item : menuitem -> unit

Same as menubar.add_item but insert item as first item.

method remove_item : menuitem -> unit

Menu items must be removed using this method rather than (inherited) #unpack.

method clear_items : unit

Removes all items.