[ <radio-button> ] <radio-controls>
{ 5 5 } >>gap ;
-: command-button-quot ( gesture command -- quot )
- '[ _ _ invoke-command drop ] ;
+: command-button-quot ( target command -- quot )
+ '[ _ _ invoke-command ] ;
: <command-button> ( target gesture command -- button )
- [ command-string swap ] keep command-button-quot <border-button> ;
+ [ command-string swap ] keep command-button-quot
+ '[ drop @ ] <border-button> ;
: <toolbar> ( target -- toolbar )
<shelf>
{ renderer initial: trivial-renderer }
{ action initial: [ drop ] }
single-click?
-{ hook initial: [ ] }
+{ hook initial: [ drop ] }
{ gap initial: 2 }
column-widths total-width
focus-border-color
: row-action ( table -- )
dup selected-row
- [ swap [ action>> call ] [ hook>> call ] bi ]
+ [ swap [ action>> call ] [ dup hook>> call ] bi ]
[ 2drop ]
if ;
: show-table-menu ( table -- )
[
[ nip ]
- [ [ nth-row drop ] [ renderer>> row-value ] [ hook>> ] tri ] 2bi
+ [ swap select-row ]
+ [
+ [ nth-row drop ]
+ [ renderer>> row-value ]
+ [ dup hook>> curry ]
+ tri
+ ] 2tri
show-operations-menu
] [ drop ] if-mouse-row ;
'[ @ sorted-links ] <filter>
link-renderer [ second ] <search-table>
[ invoke-primary-operation ] >>action
- dup '[ _ hide-glass ] >>hook
+ [ hide-glass ] >>hook
t >>selection-required? ;
: <links-popup> ( model quot title -- gadget )
[ history>> history-add drop ] [ control-value ] [ select-all ] tri
[ parse-lines ] with-compilation-unit ;
-:: <debugger-popup> ( interactor error continuation -- popup )
- error continuation error compute-restarts
- [ interactor hide-glass ] <debugger>
- "Error" <labeled-gadget> ;
+: <debugger-popup> ( error continuation -- popup )
+ over compute-restarts [ hide-glass ] <debugger> "Error" <labeled-gadget> ;
: debugger-popup ( interactor error continuation -- )
- [ [ drop one-line-elt ] 2keep ] dip <debugger-popup> show-listener-popup ;
+ [ one-line-elt ] 2dip <debugger-popup> show-listener-popup ;
: handle-parse-error ( interactor error -- )
dup lexer-error? [ 2dup go-to-error error>> ] when
: listener-thread ( listener -- )
dup listener-streams [
- [ com-follow ] help-hook set
+ [ com-browse ] help-hook set
'[ [ _ input>> ] 2dip debugger-popup ] error-hook set
welcome.
listener
[ wait-for-listener ]
} cleave ;
-: listener-help ( -- ) "ui-listener" com-follow ;
+: listener-help ( -- ) "ui-listener" com-browse ;
\ listener-help H{ { +nullary+ t } } define-command