chickadee » kiwi » widgets

(widgets GUI [PARENT] SXML)procedure

Creates widgets based on SXML. If PARENT is specified, use that widget as the parent of the newly created widgets, otherwise create top-level widgets.

Elements must be one of (frame scrollbox label button editbox toggle). Each element has mandatory attributes that correspond to their constructor procedures and optional attributes that correspond to their other setter procedures plus generic setter procedures. The following definition lists summarizes them for quick reference:

Mandatory attributes for all widget types:

x
X coordinate
y
Y coordinate
w
width
h
height

Mandatory attributes for specific widget types:

text
Text for label, button and editbox widgets

Optional attributes for all widget types:

tileset
Tileset surface
hidden?
Hide widget, value must be #t
id
Symbol identifier for lookup with widget-by-id
<event handler type>
Procedure, see handler-set! for the attribute name and function signature of the value

Optional attributes for specific widget types:

icon
List of x, y, w and h attributes for label widgets
align
List as specified in label-alignment-set! for label widgets
style
Style symbol as specified in label-style-set! for label widgets
font
Font for label and editbox widgets
color
Color for label and editbox widgets
position
Index for editbox widgets
checked?
Activation state for toggle widgets