Module Ui.Group
Element groups.
Groups allow to gather and layout GUI elements and summarize their actions. See the styling information.
Groups
The type for specifying alignements. `Stretch is dodgy.
val v :
?class':Jstr.t ->
?enabled:bool Note.signal ->
?action:'a Note.event ->
?xdir_align:Note_brr_kit.Ui.Group.align ->
?dir_align:Note_brr_kit.Ui.Group.align ->
dir:Note_brr_kit.Ui.Group.dir ->
Brr.El.t list Note.signal ->
'a Note_brr_kit.Ui.Group.tv ~class' ~enabled ~action ~dir_align ~xdir_align ~dir cs layouts elements cs in a container. Arguments are as follows:
diris the layout direction for elementsdir_alignis the alignment between elements in the layout direction. Defaults to`Start.xdir_alignis the alignement between elements in the direction perpendicular to the layout direction. Defaults to`Start.actioncan be used by the client to summarize the user interaction performed by the underlying elements. Defaults toNote.E.neverenabledvisually indicates if the group can be interacted with. Defaults toNote.S.Bool.true'class'is added to the underlying element's classes.
val dir : 'a Note_brr_kit.Ui.Group.t -> Note_brr_kit.Ui.Group.dirdir g is g's children layout direction.
val dir_align : 'a Note_brr_kit.Ui.Group.t -> Note_brr_kit.Ui.Group.aligndir_align g is g's children alignement along the layout direction.
val xdir_align : 'a Note_brr_kit.Ui.Group.t -> Note_brr_kit.Ui.Group.alignxdir_align g is g's children alignement in the parti the direction.
val action : 'a Note_brr_kit.Ui.Group.t -> 'a Note.eventaction g occurs whenever an action occurs in the group (see v).
val enabled : 'a Note_brr_kit.Ui.Group.t -> bool Note.signalenabled g is true iff g is enabled.
val el : 'a Note_brr_kit.Ui.Group.t -> Brr.El.tel b is b's DOM element.
Transforming UI elements
val with_action :
'b Note.event ->
'a Note_brr_kit.Ui.Group.t ->
'b Note_brr_kit.Ui.Group.twith_action action g uses g for g's action.
val hide_action : 'b Note_brr_kit.Ui.Group.t -> 'a Note_brr_kit.Ui.Group.thide_action g is with_action E.never g.
Styling
The element returned by el makes use of the following CSS classes:
ui-groupalways.ui-dir-{h,v}according todir.ui-dir-align-{start,end,center,justify,distribute,stretch}according todir_alignui-xdir-align-{start,end,center,justify,distribute,stretch}according toxdir_alignui-disabledwheneverenabledisfalse.