Frama-C API - Configuration
Configuration module for the GUI: all magic visual constants should use this mechanism (window width, ratios, ...).
type configData = | ConfInt of int| ConfBool of bool| ConfFloat of float| ConfString of string| ConfList of configData list
val set : string -> configData -> unitSet a configuration element, with a key. Overwrites the previous values
val find : string -> configDataFind a configuration elements, given a key. Raises Not_found if it cannot find it
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.
Looks for an integer configuration element, and if it is found, it is given to the given function. Otherwise, does nothing
Same as find_int.
Same as use_int.
Same as find_int.
Same as use_int.
Same as find_int.
Same as use_int.
val find_list : string -> configData listval use_list : string -> (configData list -> unit) -> unitval set_list : string -> configData list -> unitHelpers to connect widgets to configuration values. The configuration value is first pushed to the widget using method #set, or the ~default value is used instead.
Then, a callback is registered into the widget via #connect such that subsequent values from user's action are saved back into the configuration file.
class type 'a selector = object ... endAbstract interface to the connected widget. This API is consistent with the Widget ones.
val config_int : key:string -> default:int -> int selector -> unitval config_bool : key:string -> default:bool -> bool selector -> unitval config_string : key:string -> default:string -> string selector -> unitval config_float : key:string -> default:float -> float selector -> unitval config_values : key:string -> default:'a -> values:('a * string) list -> 'a selector -> unitThe values field is used as a dictionary of available values. They are compared with Stdlib.(=).
