chickadee » libui » widgets

widgets SXMLprocedure

Creates widgets as specified by SXML. Returns the created root widget of SXML. The tag name is equal to the widget type, the attributes are mapped to widget-specific procedure calls mutating these and the children are added to the widget if possible. Refer to the individual widget creation and setter procedures to know which attributes are mandatory and which are optional.

The following definition list describes the allowed attributes of all widgets not accepting children:

button
(text)
font-button
None
color-button
(color)
checkbox
(text)
entry, password-entry, search-entry
(text read-only?)
multiline-entry, non-wrapping-multiline-entry
(read-only?)
label
(text)
spinbox, slider
(min max value)
progress-bar
(value)
horizontal-separator, vertical-separator
None
date-picker, time-picker, date-time-picker
None

The remaining widgets can contain a child or children.

window
(title width height menubar? margined?)
window child
None
combobox, editable-combobox, radio-buttons
None
combobox, editable-combobox, radio-buttons children
Must be strings
hbox, vbox
(padded?)
hbox, vbox children
(stretchy?)
tab
None
tab children
(text margined?)
group
(text margined?)
group child
None
form
(padded?)
form children
(text stretchy?)
grid
(padded?)
grid children
(left top xspan yspan hexpand halign vexpand valign)

Additionally to that, one can use handler symbols as described in the documentation of handler-set! and a procedure to add a handler and the special id attribute on any widget to look it up with the widget-by-id procedure.