Module Gtk_helper.Configuration

module Configuration: sig .. end
Configuration module for the GUI: all magic visual constants should use this mechanism (window width, ratios, ...).
Since Carbon-20101201

type configData = 
| ConfInt of int
| ConfBool of bool
| ConfFloat of float
| ConfString of string
| ConfList of configData list
val load : unit -> unit
val save : unit -> unit
val set : string -> configData -> unit
Set a configuration element, with a key. Overwrites the previous values
val find : string -> configData
Find a configuration elements, given a key. Raises Not_found if it cannot find it
val find_int : ?default:int -> string -> int
Like find but extracts the integer. Raises Not_found if the key is found but is not an integer. Raises Not_found if no default is given and the key is not found. If a default is given and the key is not found then the default value is stored for the given key and returned.
val use_int : string -> (int -> unit) -> unit
Looks for an integer configuration element, and if it is found, it is given to the given function. Otherwise, does nothing
val find_bool : ?default:bool -> string -> bool
Same as .
val use_bool : string -> (bool -> unit) -> unit
Same as Gtk_helper.Configuration.use_int.
val find_float : ?default:float -> string -> float
Same as Gtk_helper.Configuration.find_int.
val use_float : string -> (float -> unit) -> unit
Same as Gtk_helper.Configuration.use_int.
val find_string : ?default:string -> string -> string
Same as Gtk_helper.Configuration.find_int.
val use_string : string -> (string -> unit) -> unit
Same as Gtk_helper.Configuration.use_int.
val find_list : string -> configData list
val use_list : string -> (configData list -> unit) -> unit