Handbook
Glossary
<toolbar> ( target -- toolbar )
Factor handbook
»
UI framework
»
Building user interfaces
»
Pre-made UI gadgets
»
Button gadgets
Prev:
<command-button> ( target gesture command -- button )
Next:
button-pen
Vocabulary
ui
.
gadgets
.
toolbar
Inputs
target
an
object
Outputs
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 the
target
's class.
Definition
USING:
accessors
assocs
classes
kernel
ui.baseline-alignment
ui.commands
ui.gadgets
ui.gadgets.tracks
;
IN:
ui.gadgets.toolbar
:
<toolbar>
( target -- toolbar )
horizontal
<track>
1
>>fill
+baseline+
>>align
{
5 5
}
>>gap
swap
[
[
"toolbar"
]
dip
class-of
get-command-at
commands>>
]
[
[
]
curry
[
2dip
<toolbar-button>
f
track-add
]
curry
]
bi
assoc-each
;