Stk.FlexSourceFlex container widget.
Property to specify the size of space between two items.
Property "flex_wrap" to specify whether lines can be wrapped when they don't fit.
Property "flex_wrap_on_break" to specify whether a line is broken when a `Break item is encountered.
Property "flex_collapse_spaces" to specify whether `Space items must be collapsed.
Property "flex_item_expand" to specify how an item must expand. A value higher than the other items on the same line will give more space to this item.
Item kind indicates how to handle an item:
`Break indicates a break of line, which can be considered as space or real break, depending on the wrap_on_break property,`Block indicates that this item must be arranged alone on a line,`Item indicates that this item is "normal" and can be arranged inline,`Space b indicates that this item is a space in arrangement algorithm. b = true is used internally to indicate that this space must be taken into account when computing coordinates."flex_item_kind" property. Default value is `Item.
Justification of items:
`Start aligns items on the left in horizontal flex, on top in vertical flex.`End aligns items on the right in horizontal flex, on bottom in vertical flex.`Center centers items #CaptainObvious.`Space_around distributes spaces at the beginning of line, between items and at the end of line.`Space_betwwen distributes spaces between items, leaving no space at the beginning and the end of the line.`Justified is like `Space_between except that the last line is justified as `Start (like a regular text paragraph).val justifications :
[> `Center | `End | `Justified | `Space_around | `Space_between | `Start ]
list"flex_justification" property. Default value is `Start.
val css_justification_prop :
?inherited:bool ->
?def:justification ->
justification Props.prop ->
justification Css.P.propval items_alignment_of_string :
string ->
[ `Baseline | `Center | `End | `Start | `Stretch ] option"flex_items_alignment" property. Default is `Baseline.
val css_items_alignment_prop :
?inherited:bool ->
?def:[ `Baseline | `Center | `End | `Start | `Stretch ] ->
[ `Baseline | `Center | `End | `Start | `Stretch ] Props.prop ->
[ `Baseline | `Center | `End | `Start | `Stretch ] Css.P.propval content_alignments :
[> `Center | `End | `Space_around | `Space_between | `Start | `Stretch ] listval string_of_content_alignment :
[< `Center | `End | `Space_around | `Space_between | `Start | `Stretch ] ->
stringval content_alignment_of_string :
string ->
[ `Center | `End | `Space_around | `Space_between | `Start | `Stretch ]
option"flex_content_alignment" property. Default is `Stretch.
val css_content_alignment_prop :
?inherited:bool ->
?def:[ `Center | `End | `Space_around | `Space_between | `Start | `Stretch ] ->
[ `Center | `End | `Space_around | `Space_between | `Start | `Stretch ]
Props.prop ->
[ `Center | `End | `Space_around | `Space_between | `Start | `Stretch ]
Css.P.propclass space : ?classes:string list option -> ?name:string option -> ?props:Props.t option -> ?wdata:
Widget.wdata
option -> unit -> object ... endval space :
?classes:string list ->
?name:string ->
?props:Props.t ->
?wdata:Widget.wdata ->
unit ->
spaceCreate a space item with correct item_kind value. See Widget arguments for arguments.
val break :
?classes:string list ->
?name:string ->
?props:Props.t ->
?wdata:Widget.wdata ->
unit ->
spaceCreate a space item with `Break for item_kind property. Widget has same kind as space with additional class "break". See Widget arguments for arguments.
class 'a flex : ?classes:string list option -> ?name:string option -> ?props:Props.t option -> ?wdata:
Widget.wdata
option -> unit -> object ... endContainer widget behaving like CSS flex box. The widget has class "vertical" or "horizontal" depending on orientation.
val flex :
?classes:string list ->
?name:string ->
?props:Props.t ->
?wdata:Widget.wdata ->
?orientation:Props.orientation ->
?justification:justification ->
?items_alignment:items_alignment ->
?content_alignment:content_alignment ->
?inter_space:int ->
?wrap:bool ->
?wrap_on_break:bool ->
?collapse_spaces:bool ->
?pack:(Widget.widget -> unit) ->
unit ->
'a flexConvenient function to create a flex. Optional arguments:
orientation specifies horizontal or vertical packing. Default is Props.orientation.Horizontal.justification, items_alignment, content_alignment, inter_space, wrap, wrap_on_break and collapse_spaces are used to set the corresponding properties.See Widget arguments for other arguments.
val hflex :
?classes:string list ->
?name:string ->
?props:Props.t ->
?wdata:Widget.wdata ->
?justification:justification ->
?items_alignment:items_alignment ->
?content_alignment:content_alignment ->
?inter_space:int ->
?wrap:bool ->
?wrap_on_break:bool ->
?collapse_spaces:bool ->
?pack:(Widget.widget -> unit) ->
unit ->
'a flexval vlfex :
?classes:string list ->
?name:string ->
?props:Props.t ->
?wdata:Widget.wdata ->
?justification:justification ->
?items_alignment:items_alignment ->
?content_alignment:content_alignment ->
?inter_space:int ->
?wrap:bool ->
?wrap_on_break:bool ->
?collapse_spaces:bool ->
?pack:(Widget.widget -> unit) ->
unit ->
'a flex