- bb:make-widgets SPEC WIDTH HEIGHT #!optional CHARMAPprocedure
Creates the widgets defined in the graphical representation string SPEC in a window of the dimensions WIDTH and HEIGHT. The graphical representation string is an ASCII picture of the widget layout, with uppercase characters designating widget types:
- B - button
- C - check-xbox
- E - entry
- I - edit
- N - counter
- M - menu-bar
- D - dial
- S - slider
- A - adjuster
- L - list
- W - label
- O - radio-button
- P - progress
- T - tabs
- F - glwindow
- X - tile
- G - group
- K - pack
- Z - scroll
- R - roller
- J - clock
- V - live-image
- H - choice-button
- < - return-button
- % - int-entry
- * - int-entry
- > - menu-button
- Y - tree
A widgets dimensions are computed by drawing a contguous line along the upper and left border, starting from the origin of the widget:
01234567890123456789 .................... .....BBBBBBBBB...... .....BBBBBBBBB...... .....BBBBBBBBB...... ....................
Here we would have a button at 5/1, with width 9 and height 3 (before adjusting the dimensions to the specified width and height of the complete layout).
bb:make-widgets returns an association list of the form (TAG . WIDGET) which maps widget-tags to created widgets. If the optional argument CHARMAP (an list of lists of the form (ALIASCHAR CHAR TAG)) is given, then any occurrence of ALIASCHAR in the picture is treated as CHAR. The TAG will be returned in the widget a-list. If CHARMAP is not given, then the tag defaults to the usual widget type character.
Specially delimited strings can be embedded in the widget pictures:
"STRING"
Sets the text property of the widget.
|STRING|
Sets the direction, box type, slider type or color of the widget. Valid values for STRING are:
Direction:
- v
- h
Slider type:
- vfill
- hfill
- vnice
- hnice
box type :
- no
- flat
- up
- down
- thinup
- thindown
- upframe
- downframe
- thinupframe
- thindownframe
- engraved
- embossed
- engravedframe
- embossedframe
- border
color:
- gray
- black
- red
- green
- yellow
- blue
- magenta
- cyan
- darkred
- darkgreen
- darkyellow
- darkblue
- darkmagenta
- darkcyan
- white
'STRING, ...'
Adds items to a list widget.
#STRING#
STRING should be the name of an image file (as understood by bb:image).
:STRING:
STRING should be the name of a global variable holding a callback, or an expression evaluating to a procedure or name.