Button gadgets
Factor handbook » UI framework » Building user interfaces » Pre-made UI gadgets

Prev:Labeled gadgets
Next:Slider gadgets


The ui.gadgets.buttons vocabulary implements buttons. Buttons respond to mouse clicks by invoking a quotation.
button


There are many ways to create a new button:
<button> ( label quot: ( button -- ) -- button )

<roll-button> ( label quot: ( button -- ) -- button )

<border-button> ( label quot: ( button -- ) -- button )

<repeat-button> ( label quot: ( button -- ) -- button )


Gadgets for invoking commands:
<command-button> ( target gesture command -- button )

<toolbar> ( target -- toolbar )


Button appearance can be customized:
button-pen


Button constructors take label specifiers as input. A label specifier is either a string, an array of strings, a gadget or f.

See also
<command-button>, Commands