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

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


Class description
A button is a gadget which responds to mouse clicks by invoking a quotation.

A button's appearance can vary depending on the state of the mouse button if the interior or boundary slots are set to instances of button-pen.

A button can be selected, which is distinct from being pressed. This state is held in the selected? slot, and is used by checkbox instances to render themselves when they're checked.

A button can optionally display a message in the window's status bar whenever the mouse cursor hovers over the button. To enable this behavior, just set a string to the button's tooltip slot.