package lablgtk3-extras
Install
dune-project
Dependency
Authors
Maintainers
Sources
md5=a1e65cb9a1b8f0d61da2541599051d9e
sha512=a14faba4a0bd679311ad7c00fd80bb768727e70c84591af51e880a928a545e51c020d5fb3d51752162aff1525a6cd1606a25199e18c0c368b8d112d253bd7320
doc/lablgtk3-extras.configwin/Configwin/index.html
Module ConfigwinSource
Building graphical interface to edit configuration parameters.
Types
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 pushed the user when the window is closed.
Ocf key options
val key_option :
?doc:string ->
?cb:((Gdk.Tags.modifier list * int) -> unit) ->
(Gdk.Tags.modifier list * int) ->
(Gdk.Tags.modifier list * int) Ocf.conf_optionFunctions to create parameters
val string :
?editable:bool ->
?expand:bool ->
?help:string ->
?f:(string -> unit) ->
string ->
string ->
parameter_kindstring label value creates a string parameter.
val custom_string :
?editable:bool ->
?expand:bool ->
?help:string ->
?f:('a -> unit) ->
to_string:('a -> string) ->
of_string:(string -> 'a) ->
string ->
'a ->
parameter_kindSame as Configwin.string but for values which are not strings.
val bool :
?editable:bool ->
?help:string ->
?f:(bool -> unit) ->
string ->
bool ->
parameter_kindbool label value creates a boolean parameter.
val strings :
?editable:bool ->
?help:string ->
?f:(string list -> unit) ->
?eq:(string -> string -> bool) ->
?add:(unit -> string list) ->
string ->
string list ->
parameter_kindstrings label value creates a string list parameter.
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 ->
parameter_kindlist label columns value creates a list parameter. columns is a list of pairs (f, title option), with f takeing a value and returning a string to display it. The value is the initial list.
val color :
?editable:bool ->
?expand:bool ->
?help:string ->
?f:(string -> unit) ->
string ->
string ->
parameter_kindcolor label value creates a color parameter.
val font :
?editable:bool ->
?expand:bool ->
?help:string ->
?f:(string -> unit) ->
string ->
string ->
parameter_kindfont label value creates a font parameter.
val combo :
?editable:bool ->
?expand:bool ->
?help:string ->
?f:(string -> unit) ->
?new_allowed:bool ->
string ->
string list ->
string ->
parameter_kindcombo label choices value creates a combo parameter.
val text :
?editable:bool ->
?expand:bool ->
?help:string ->
?f:(string -> unit) ->
string ->
string ->
parameter_kindtext label value creates a text parameter.
val custom_text :
?editable:bool ->
?expand:bool ->
?help:string ->
?f:('a -> unit) ->
to_string:('a -> string) ->
of_string:(string -> 'a) ->
string ->
'a ->
parameter_kindSame as Configwin.text but for values which are not strings.
val html :
?editable:bool ->
?expand:bool ->
?help:string ->
?f:(string -> unit) ->
string ->
string ->
parameter_kindSame as Configwin.text but html bindings are available in the text widget. Use the configwin_html_config utility to edit your bindings.
val filename :
?editable:bool ->
?expand:bool ->
?help:string ->
?f:(string -> unit) ->
string ->
string ->
parameter_kindfilename label value creates a filename parameter.
val filenames :
?editable:bool ->
?help:string ->
?f:(string list -> unit) ->
?eq:(string -> string -> bool) ->
string ->
string list ->
parameter_kindfilenames label value creates a filename list parameter.
val date :
?editable:bool ->
?expand:bool ->
?help:string ->
?f:((int * int * int) -> unit) ->
?f_string:((int * int * int) -> string) ->
string ->
(int * int * int) ->
parameter_kinddate label value creates a date parameter.
val hotkey :
?editable:bool ->
?expand:bool ->
?help:string ->
?f:((Gdk.Tags.modifier list * int) -> unit) ->
string ->
(Gdk.Tags.modifier list * int) ->
parameter_kindhotkey label value creates a hot key parameter. A hot key is defined by a list of modifiers and a key code.
custom box f expand creates a custom parameter, with the given box, the f function is called when the user wants to apply his changes, and expand indicates if the box must expand in its father.
Functions creating configuration windows and boxes
val edit :
?parent:GWindow.window_skel ->
?apply:(unit -> unit) ->
string ->
?width:int ->
?height:int ->
configuration_structure list ->
return_buttonThis function takes a configuration structure and creates a window to configure the various parameters.
val get :
?parent:GWindow.window_skel ->
string ->
?width:int ->
?height:int ->
configuration_structure list ->
return_buttonThis function takes a configuration structure and creates a window used to get the various parameters from the user. It is the same window as edit but there is no apply button.
val simple_edit :
?parent:GWindow.window_skel ->
?apply:(unit -> unit) ->
string ->
?width:int ->
?height:int ->
parameter_kind list ->
return_buttonThis function takes a list of parameter specifications and creates a window to configure the various parameters.
val simple_get :
?parent:GWindow.window_skel ->
string ->
?width:int ->
?height:int ->
parameter_kind list ->
return_buttonThis function takes a list of parameter specifications and creates a window to configure the various parameters, without Apply button.
Create a GPack.box with the list of given parameters, Return the box and the function to call to apply new values to parameters.
Create a GPack.box 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.