module Wbox:sig..end
type box
type expand =
| |
W |
(* |
Stay at widget's size.
| *) |
| |
H |
(* |
Expands horizontally. Typically, a text-field.
| *) |
| |
V |
(* |
Expands vertically. Typically a side-bar.
| *) |
| |
HV |
(* |
Expands in both directions. Typically, a text editor.
| *) |
val box : ?expand:expand ->
?padding:int -> ?widget:#Widget.widget -> unit -> box~widget, a space is created instead.
Defaults: ~expand:W ~padding:0.
val g : ?expand:expand -> ?padding:int -> #GObj.widget -> boxbox for packing a GObj.widget. Same defaults than box.val w : ?expand:expand -> ?padding:int -> #Widget.widget -> boxbox for packing a widget. Same defaults than box.val h : ?padding:int -> #Widget.widget -> boxw ~expand:Hval v : ?padding:int -> #Widget.widget -> boxw ~expand:Vval hv : ?padding:int -> #Widget.widget -> boxw ~expand:HVval label : ?fill:bool ->
?style:Widget.style ->
?align:Widget.align -> ?padding:int -> string -> boxWidget.label widget using box.
Default: ~fill:false ~style:`Label ~align:`Left ~padding:0
hbox and vbox can be used to created nested boxes.
Typically, local scope opening can be used, typically:
Wbox.(hbox [ w A ; w B ; w C ]),
where A, B and C are widgets, or boxes.
Notice that nested boxes can generally be packed using default
W mode, even if they contains horizontal or vertical widgets.
val hbox : box list -> Widget.widgetval vbox : box list -> Widget.widgetval hgroup : Widget.widget list -> Widget.widgetval vgroup : Widget.widget list -> Widget.widgetval toolbar : box list -> box list -> Widget.widget : box list -> box list -> Widget.widgetval panel : ?top:Widget.widget ->
?left:Widget.widget ->
?right:Widget.widget ->
?bottom:Widget.widget -> #Widget.widget -> Widget.widget~top is layout as a toolbar, left and right as sidebars, and bottom as a status bar.
The main (non-optional) widget is centered with full expansion in both directions.