Ui.Group
Element groups.
Groups allow to gather and layout GUI elements and summarize their actions. See the styling information.
The type for specifying alignements. `Stretch
is dodgy.
val v : ?class':Jstr.t -> ?enabled:bool Note.signal -> ?action:'a Note.event -> ?xdir_align:align -> ?dir_align:align ->
dir:dir -> Brr.El.t list Note.signal -> 'a t
v ~class' ~enabled ~action ~dir_align ~xdir_align ~dir cs
layouts elements cs
in a container. Arguments are as follows:
dir
is the layout direction for elementsdir_align
is the alignment between elements in the layout direction. Defaults to `Start
.xdir_align
is the alignement between elements in the direction perpendicular to the layout direction. Defaults to `Start
.action
can be used by the client to summarize the user interaction performed by the underlying elements. Defaults to Note.E.never
enabled
visually indicates if the group can be interacted with. Defaults to Note.S.Bool.true'
class'
is added to the underlying element's classes.val action : 'a t -> 'a Note.event
action g
occurs whenever an action occurs in the group (see v
).
val enabled : 'a t -> bool Note.signal
enabled g
is true
iff g
is enabled.
val with_action : 'b Note.event -> 'a t -> 'b t
with_action action g
uses g
for g
's action.
The element returned by el
makes use of the following CSS classes:
ui-group
always.ui-dir-{h,v}
according to dir
.ui-dir-align-{start,end,center,justify,distribute,stretch}
according to dir_align
ui-xdir-align-{start,end,center,justify,distribute,stretch}
according to xdir_align
ui-disabled
whenever enabled
is false
.