Module Mlpost_lablgtk.Interface

module Interface: sig .. end

Abstract lablgtk in order to display Mlpost figures inside a very simple interface

type interface 
An interface is composed by one control window and by some display window
val new_interface : ?width:int ->
?height:int -> ?title:string -> unit -> interface
create a new interface with an empty control window


val create_text : interface ->
?label:string -> string -> (string -> unit) -> unit
create_text ~label get set adds to the control window a text input. get is the initial value, set is called each times the value of the text input is changed.
val create_option : interface ->
?label:string -> (string * (unit -> unit)) list -> unit
create_option ~label value_list adds to the control window a radio menu item. value_list is a pair of one of the choice and the callback function used when this choice is selected.
val remove_fig : interface -> (unit -> Command.t) -> unit
remove_fig gen_fig removes a display window created by add_fig gen_fig

Required function

functions needed to see one mlpost figure :
val add_fig : interface ->
?width:int ->
?height:int -> ?title:string -> (unit -> Command.t) -> unit
add_fig get_fig add a new display window. get_fig is called each times the window must be refreshed. If the value of one of the interfaces is changed, the displayed figure is refreshed.
val main : interface -> unit
Start the main loop. During the main loop some texts or options can be added and Mlpost_lablgtk.Interface.add_fig can be called