Module Widget.DynamicSubmenu (.ml)


module DynamicSubmenu: sig .. end
Module for building dynamic submenus. A submenu is a menu included in another menu.

val make : ?set_active:(string -> bool) ->
submenu:GMenu.menu ->
menu:GMenu.image_menu_item ->
dynList:(unit -> string list) ->
action:(string -> unit -> unit) -> unit -> unit
Makes a dynamic submenu of a given menu (the father). When the father is activated, the submenu entries are recalculated with the given function (dynList).

Exemple:

make              
  ~submenu:w#MACHINE_ELIM_menu 
  ~menu:w#MACHINE_ELIM         
  ~dynList:machineList       
  ~action:(fun x ->fun _ -> prerr_endline x)   ;;