package lablgtk3-extras
Install
Dune Dependency
Authors
Maintainers
Sources
md5=a1e65cb9a1b8f0d61da2541599051d9e
sha512=a14faba4a0bd679311ad7c00fd80bb768727e70c84591af51e880a928a545e51c020d5fb3d51752162aff1525a6cd1606a25199e18c0c368b8d112d253bd7320
doc/lablgtk3-extras.configwin/Configwin_types/index.html
Module Configwin_types
Source
This module contains the types used in Configwin.
val string_to_key :
string ->
[> `CONTROL | `LOCK | `MOD1 | `MOD2 | `MOD3 | `MOD4 | `MOD5 | `SHIFT ] list
* int
val key_to_string :
([> `CONTROL | `LOCK | `MOD1 | `MOD2 | `MOD3 | `MOD4 | `MOD5 | `SHIFT ] list
* int) ->
string
val key_option :
?doc:string ->
?cb:((Gdk.Tags.modifier list * int) -> unit) ->
(Gdk.Tags.modifier list * int) ->
(Gdk.Tags.modifier list * int) Ocf.conf_option
To define key options, with the Ocf
module.
type 'a string_param = {
string_label : string;
(*the label of the parameter
*)mutable string_value : 'a;
(*the current value of the parameter
*)string_editable : bool;
(*indicates if the value can be changed
*)string_f_apply : 'a -> unit;
(*the function to call to apply the new value of the parameter
*)string_help : string option;
(*optional help string
*)string_expand : bool;
(*expand or not
*)string_to_string : 'a -> string;
string_of_string : string -> 'a;
}
This type represents a string or filename parameter, or any other type, depending on the given conversion functions.
type bool_param = {
bool_label : string;
(*the label of the parameter
*)mutable bool_value : bool;
(*the current value of the parameter
*)bool_editable : bool;
(*indicates if the value can be changed
*)bool_f_apply : bool -> unit;
(*the function to call to apply the new value of the parameter
*)bool_help : string option;
(*optional help string
*)
}
This type represents a boolean parameter.
type 'a list_param = {
list_label : string;
(*the label of the parameter
*)mutable list_value : 'a list;
(*the current value of the parameter
*)list_columns : (('a -> string) * string option) list;
(*the list of columns: how each must be displayed, and its optional title
*)list_f_edit : ('a -> 'a) option;
(*optional edition function
*)list_eq : 'a -> 'a -> bool;
(*the comparison function used to get list without doubles
*)list_color : 'a -> string option;
(*a function to get the optional color of an element
*)list_editable : bool;
(*indicates if the value can be changed
*)list_f_add : unit -> 'a list;
(*the function to call to add list
*)list_f_apply : 'a list -> unit;
(*the function to call to apply the new value of the parameter
*)list_help : string option;
(*optional help string
*)
}
This type represents a parameter whose value is a list of 'a
.
type combo_param = {
combo_label : string;
mutable combo_value : string;
combo_choices : string list;
combo_editable : bool;
combo_new_allowed : bool;
combo_f_apply : string -> unit;
combo_help : string option;
(*optional help string
*)combo_expand : bool;
(*expand the entry widget or not
*)
}
type color_param = {
color_label : string;
(*the label of the parameter
*)mutable color_value : string;
(*the current value of the parameter
*)color_editable : bool;
(*indicates if the value can be changed
*)color_f_apply : string -> unit;
(*the function to call to apply the new value of the parameter
*)color_help : string option;
(*optional help string
*)color_expand : bool;
(*expand the entry widget or not
*)
}
type date_param = {
date_label : string;
(*the label of the parameter
*)mutable date_value : int * int * int;
(*day, month, year
*)date_editable : bool;
(*indicates if the value can be changed
*)date_f_string : (int * int * int) -> string;
(*the function used to display the current value (day, month, year)
*)date_f_apply : (int * int * int) -> unit;
(*the function to call to apply the new value (day, month, year) of the parameter
*)date_help : string option;
(*optional help string
*)date_expand : bool;
(*expand the entry widget or not
*)
}
type font_param = {
font_label : string;
(*the label of the parameter
*)mutable font_value : string;
(*the font name
*)font_editable : bool;
(*indicates if the value can be changed
*)font_f_apply : string -> unit;
(*the function to call to apply the new value of the parameter
*)font_help : string option;
(*optional help string
*)font_expand : bool;
(*expand the entry widget or not
*)
}
type hotkey_param = {
hk_label : string;
(*the label of the parameter
*)mutable hk_value : Gdk.Tags.modifier list * int;
(*The value, as a list of modifiers and a key code
*)hk_editable : bool;
(*indicates if the value can be changed
*)hk_f_apply : (Gdk.Tags.modifier list * int) -> unit;
(*the function to call to apply the new value of the paramter
*)hk_help : string option;
(*optional help string
*)hk_expand : bool;
(*expand or not
*)
}
type parameter_kind =
| String_param of string string_param
| List_param of unit -> < box : GObj.widget ; apply : unit >
| Filename_param of string string_param
| Bool_param of bool_param
| Text_param of string string_param
| Combo_param of combo_param
| Custom_param of custom_param
| Color_param of color_param
| Date_param of date_param
| Font_param of font_param
| Hotkey_param of hotkey_param
| Html_param of string string_param
This type represents the different kinds of parameters.
type configuration_structure =
| Section of string * parameter_kind list
(*label of the section, parameters
*)| Section_list of string * configuration_structure list
(*label of the section, list of the sub sections
*)
This type represents the structure of the configuration window.
To indicate what button was pushed by the user when the window is closed.
Bindings in the html editor
type html_binding = {
mutable html_key : Gdk.Tags.modifier list * int;
mutable html_begin : string;
mutable html_end : string;
}
val htmlbinding_option :
?doc:string ->
?cb:(html_binding -> unit) ->
html_binding ->
html_binding Ocf.conf_option