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
Interfaces
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_pic : interface -> (unit -> Command.t) -> unit
remove_pic gen_pic
removes a display window created by
add_pic gen_pic
Required function
functions needed to see one mlpost picure :
val add_pic : interface ->
?width:int ->
?height:int ->
?title:string ->
?show_corner:bool ->
?auto_aspect:Mlpost_lablgtk.auto_aspect -> (unit -> Command.t) -> unit
add_pic get_pic
add a new display window. get_pic
is
called each times the window must be refreshed. If the value
of one of the interfaces is changed, the displayed picure is
refreshed.
val main : interface -> unit