Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Source file column_intf.ml
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125open!Coreopen!ImportmoduleAlign=structtypet=|Left|Right|Center[@@derivingsexp_of]endmoduleShow=structtypet=[`Yes|`No|`If_not_empty][@@derivingsexp_of]endmoduletypeColumn=sigmoduleAlign=AlignmoduleShow=Showtype'at[@@derivingsexp_of](** creates a column given the header and the to-string function *)valcreate:?align:Align.t(* Default: left *)->?min_width:int->?max_width:int->?show:[`Yes|`No|`If_not_empty](* Default: `Yes *)->string->('a->string)->'at(** like create, except that the to_string function must provide a list of
attributes. *)valcreate_attr:?align:Align.t(* Default: left *)->?min_width:int->?max_width:int->?show:[`Yes|`No|`If_not_empty](* Default: `Yes *)->string->('a->Attr.tlist*string)->'at(** like create_attr, except that you can specify many lines with different
attributes. *)valcreate_attrs:?align:Align.t(* Default: left *)->?min_width:int->?max_width:int->?show:[`Yes|`No|`If_not_empty](* Default: `Yes *)->string->('a->(Attr.tlist*string)list)->'atvallift:'at->f:('b->'a)->'btvalalign:_t->Align.tvalheader:'at->stringvalshow:_t->Show.tvalto_data:'at->'a->(Attr.tlist*string)listmoduleOf_field:sig(** This module is used for constructing lists of ['a t]s from a record's fields. The
intention is to use [Fields.to_list] to obtain a list. *)(** Create a column based on a field of a record. *)valfield:?align:Align.t(* Default: left *)->?min_width:int->?max_width:int->?show:[`Yes|`No|`If_not_empty]->?header:string(** Defaults to field name *)->('field->string)->('record,'field)Field.t->'recordt(** [field_attr] is to [field] as [create_attr] is to [create]. *)valfield_attr:?align:Align.t(* Default: left *)->?min_width:int->?max_width:int->?show:[`Yes|`No|`If_not_empty]->?header:string(** Defaults to field name *)->('field->Attr.tlist*string)->('record,'field)Field.t->'recordt(** Like [field], but defaults to [""] if [None] *)valfield_opt:?align:Align.t(* Default: left *)->?min_width:int->?max_width:int->?show:[`Yes|`No|`If_not_empty]->?header:string(** Defaults to field name *)->('field->string)->('record,'fieldoption)Field.t->'recordt(** Like [field_attr], but defaults to [([], "")] if [None] *)valfield_opt_attr:?align:Align.t(* Default: left *)->?min_width:int->?max_width:int->?show:[`Yes|`No|`If_not_empty]->?header:string(** Defaults to field name *)->('field->Attr.tlist*string)->('record,'fieldoption)Field.t->'recordtendmodulePrivate:sig(** [layout ts values ~spacing ~max_width = widths] where the nth int in [widths] is
the width to which the nth column in [ts] should wrap its contents.
[spacing] is the number of spaces to leave on either side of the contents of each
cell. [layout] also leaves a character per column for a vertical separator.
[layout] raises if all this cannot fit into [max_width]. *)vallayout:'atlist->'alist->spacing:int->max_width:int->intlistvalto_cell:'at->value:'a->Cell.tendend