package lablgtk3-extras

  1. Overview
  2. Docs

This module contains the gui functions of Configwin.

val file_html_config : string
val debug : bool
val dbg : string -> unit
val html_config_file_and_option : unit -> [ `Open ] Ocf.group * Configwin_types.html_binding list Ocf.conf_option

Return the config group for the html config file, and the option for bindings.

val last_dir : string ref

This variable contains the last directory where the user selected a file.

val select_files : ?parent:GWindow.window_skel -> ?dir:'a -> ?fok:(string -> unit) -> string -> string list

This function allows the user to select a file and returns the selected file name. An optional function allows to change the behaviour of the ok button. A VOIR : mutli-selection ?

val select_date : ?parent:GWindow.window_skel -> string -> (int * int * int) -> (int * int * int) option

Make the user select a date.

class 'a list_selection_box : 'a list ref -> (('a -> string) * string option) list -> string option -> ('a -> 'a) option -> ('a -> string option) -> ('a -> 'a -> bool) -> (unit -> 'a list) -> string -> bool -> object ... end

This class builds a frame with a list and three buttons : one to add items, one to move up selected items, and one to remove the selected items. The class takes in parameter a function used to add items and a list ref which is used to store the content of the list. At last, a title for the frame is also in parameter, so that each instance of the class creates a frame.

class string_param_box : 'a Configwin_types.string_param -> object ... end

This class is used to build a box for a string parameter.

This class is used to build a box for a combo parameter.

Class used to pack a custom box.

This class is used to build a box for a color parameter.

class font_param_box : Configwin_types.font_param -> object ... end

This class is used to build a box for a font parameter.

class text_param_box : 'a Configwin_types.string_param -> object ... end

This class is used to build a box for a text parameter.

class html_param_box : 'a Configwin_types.string_param -> object ... end

This class is used to build a box a html parameter.

class bool_param_box : Configwin_types.bool_param -> object ... end

This class is used to build a box for a boolean parameter.

This class is used to build a box for a file name parameter.

This class is used to build a box for a hot key parameter.

class date_param_box : Configwin_types.date_param -> object ... end

This class is used to build a box for a date parameter.

class 'a list_param_box : 'a Configwin_types.list_param -> object ... end

This class is used to build a box for a parameter whose values are a list.

This class is used to build a box from a configuration structure and adds the page to the given notebook.

val tabbed_box : Configwin_types.configuration_structure list -> (string * (unit -> unit)) list -> GPack.box

Create a vbox with the list of given configuration structure list, and the given list of buttons (defined by their label and callback). Before calling the callback of a button, the apply function of each parameter is called.

val edit : ?parent:GWindow.window_skel -> ?with_apply:bool -> ?apply:(unit -> unit) -> string -> ?width:int -> ?height:int -> Configwin_types.configuration_structure list -> Configwin_types.return_button

This function takes a configuration structure list and creates a window to configure the various parameters.

val box : Configwin_types.parameter_kind list -> GPack.box * (unit -> unit)

Create a vbox with the list of given parameters.

val simple_edit : ?parent:GWindow.window_skel -> ?with_apply:bool -> ?apply:(unit -> unit) -> string -> ?width:int -> ?height:int -> Configwin_types.parameter_kind list -> Configwin_types.return_button

This function takes a list of parameter specifications and creates a window to configure the various parameters.

val edit_string : string -> string -> string
val string : ?editable:bool -> ?expand:bool -> ?help:string -> ?f:(string -> unit) -> string -> string -> Configwin_types.parameter_kind

Create a string param.

val custom_string : ?editable:bool -> ?expand:bool -> ?help:string -> ?f:('a -> unit) -> to_string:('a -> string) -> of_string:(string -> 'a) -> string -> 'a -> Configwin_types.parameter_kind

Create a custom string param.

val bool : ?editable:bool -> ?help:string -> ?f:(bool -> unit) -> string -> bool -> Configwin_types.parameter_kind

Create a bool param.

val list : ?editable:bool -> ?help:string -> ?f:('a list -> unit) -> ?eq:('a -> 'a -> bool) -> ?edit:('a -> 'a) -> ?add:(unit -> 'a list) -> ?color:('a -> string option) -> string -> (('a -> string) * string option) list -> 'a list -> Configwin_types.parameter_kind

Create a list param.

val strings : ?editable:bool -> ?help:string -> ?f:(string list -> unit) -> ?eq:(string -> string -> bool) -> ?add:(unit -> string list) -> string -> string list -> Configwin_types.parameter_kind

Create a strings param.

val color : ?editable:bool -> ?expand:bool -> ?help:string -> ?f:(string -> unit) -> string -> string -> Configwin_types.parameter_kind

Create a color param.

val font : ?editable:bool -> ?expand:bool -> ?help:string -> ?f:(string -> unit) -> string -> string -> Configwin_types.parameter_kind

Create a font param.

val combo : ?editable:bool -> ?expand:bool -> ?help:string -> ?f:(string -> unit) -> ?new_allowed:bool -> string -> string list -> string -> Configwin_types.parameter_kind

Create a combo param.

val text : ?editable:bool -> ?expand:bool -> ?help:string -> ?f:(string -> unit) -> string -> string -> Configwin_types.parameter_kind

Create a text param.

val custom_text : ?editable:bool -> ?expand:bool -> ?help:string -> ?f:('a -> unit) -> to_string:('a -> string) -> of_string:(string -> 'a) -> string -> 'a -> Configwin_types.parameter_kind

Create a custom text param.

val html : ?editable:bool -> ?expand:bool -> ?help:string -> ?f:(string -> unit) -> string -> string -> Configwin_types.parameter_kind

Create a html param.

val filename : ?editable:bool -> ?expand:bool -> ?help:string -> ?f:(string -> unit) -> string -> string -> Configwin_types.parameter_kind

Create a filename param.

val filenames : ?editable:bool -> ?help:string -> ?f:(string list -> unit) -> ?eq:(string -> string -> bool) -> string -> string list -> Configwin_types.parameter_kind

Create a filenames param.

val date : ?editable:bool -> ?expand:bool -> ?help:string -> ?f:((int * int * int) -> unit) -> ?f_string:((int * int * int) -> string) -> string -> (int * int * int) -> Configwin_types.parameter_kind

Create a date param.

val hotkey : ?editable:bool -> ?expand:bool -> ?help:string -> ?f:((Gdk.Tags.modifier list * int) -> unit) -> string -> (Gdk.Tags.modifier list * int) -> Configwin_types.parameter_kind

Create a hot key param.

val custom : ?label:string -> GPack.box -> (unit -> unit) -> bool -> Configwin_types.parameter_kind

Create a custom param.

OCaml

Innovation. Community. Security.