 : new-button ( label quot class -- button )
     [ swap >label ] dip new-border swap >>quot ; inline
 
-: <button> ( label quot -- button )
+: <button> ( label quot: ( button -- ) -- button )
     button new-button ;
 
 TUPLE: button-pen

: gesture>tooltip ( gesture -- str/f )
    gesture>string dup [ "Shortcut: " prepend ] when ;

: <command-button> ( target gesture command -- button )
    swapd [ command-name swap ] keep command-button-quot
    '[ drop @ ] <border-button> swap gesture>tooltip >>tooltip ;

: <toolbar> ( target -- toolbar )
    <shelf>

    { T{ button-up } [ button-update ] }
} set-gestures

: <repeat-button> ( label quot: ( button -- ) -- button )
    #! Button that calls the quotation every 100ms as long as
    #! the mouse is held down.
    repeat-button new-button border-button-theme ;
