$command-map ( element -- ) (original) (raw)

$command-map ( element -- )
Factor handbook » UI framework » Implementing new gadgets » UI gestures » Commands

Prev: invoke-command ( target command -- )
Next: $command ( element -- )

Vocabulary
ui.commands

Inputs

element a pair { class map }

Outputs
None

Word description
Prints a command map, where the first element of the pair is a class word and the second is a command map name.

Definition

USING: accessors help.markup kernel sequences ;

IN: ui.commands

: $command-map ( element -- )
[ second (command-name) " commands" append $heading ] [
first2 swap get-command-at
[ blurb>> print-element ] [ commands>> command-map. ] bi
] bi ;