Module Incr_dom_keyboard.Grouped_help_text
module Group_name : Core_kernel.Identifiablemodule View_spec : sig ... endView_specis almost identical toHelp_text.View_spec, but additionally allows the user to customize how to display group names.
module Command = Help_text.Commandinclude Ppx_sexp_conv_lib.Sexpable.S with type t := t
val t_of_sexp : Sexplib0.Sexp.t -> tval sexp_of_t : t -> Sexplib0.Sexp.t
val of_group_list_exn : (Group_name.t * Help_text.t) list -> tof_group_list_exnconverts a list of help text groups into a grouped help text.
val add_group_exn : t -> Group_name.t -> Help_text.t -> tadd_group_exnadds a new group to a grouped help text. This is linear in the number of groups already in the grouped help text.
val groups : t -> (Group_name.t * Help_text.t) listgroupsreturns the help text groups in a grouped help text.
val of_command_list : ?custom_group_order:Group_name.t list -> (Group_name.t * Command.t) list -> tof_command_list,add_command, andcommandsare analogous to the correspondinggroupfunctions above, but deal with single commands instead of help text groups.Commands with the same group name are grouped together.
By default, group order is determined by the order in which the groups first appear in the command list. However, if
custom_group_orderis given, it will be used to determine the group order instead. Any groups that appear incustom_group_orderbut not in the command list will be omitted. Any groups that appear in the command list but not incustom_group_orderwill be added to the end ofcustom_group_order, in the order in which they first appear in the command list.add_commandis linear in both the number of groups in the grouped help text and the number of commands already in its group.
val add_command : t -> Group_name.t -> Command.t -> tval commands : t -> (Group_name.t * Command.t) listval view : t -> View_spec.t -> Incr_dom_keyboard__.Import.Vdom.Node.tviewdisplays a help text table with one row per command, organized into groups. Each group has a row containing the group name preceding the rows corresponding to the group's commands.