<toolbar> ( target -- toolbar )
Factor documentation
>
Factor handbook
>
UI framework
>
Building user interfaces
>
Pre-made UI gadgets
>
Button gadgets
Prev:
<command-button> ( target gesture command -- button )
Next:
button-pen ( button pen -- button pen )
Vocabulary
ui.gadgets.buttons
Inputs and outputs
target
an
object
toolbar
a
gadget
Word description
Creates a row of
<command-button>
gadgets invoking commands on
target
. The commands are taken from the
"toolbar"
command group of each class in
classes
.
Definition
USING:
accessors
assocs
classes
kernel
ui.commands
ui.gadgets
ui.gadgets.packs
;
IN:
ui.gadgets.buttons
:
<toolbar>
( target -- toolbar )
<shelf>
1
>>fill
{
5 5
}
>>gap
swap
[
[
"toolbar"
]
dip
class
command-map
commands>>
]
[
[
]
curry
[
2dip
<command-button>
add-gadget
]
curry
]
bi
assoc-each
;