- minibuffer should show a title
- clean up listener's minibuffer-related code
- help search looks funny
-- parse errors: clickable pathnames
+ ui:
! See http://factorcode.org/license.txt for BSD license.
IN: generic
USING: arrays definitions errors hashtables help kernel
-sequences words ;
+sequences words namespaces ;
PREDICATE: array method-spec
dup length 2 = [
[ swap 2array ] map-with ;
M: class subdefs
- dup implementors natural-sort [ 2array ] map-with ;
+ [
+ dup "constructor" word-prop [ , ] when*
+ dup implementors natural-sort [ 2array , ] each-with
+ ] { } make ;
M: method-spec forget
first2 [ remove-hash ] with-methods ;
<default-border> dup faint-boundary ;
C: tile ( definition -- gadget )
- 2dup { tile } "Word commands" <toolbar>
+ 2dup { tile } <toolbar>
<tile-content> over set-gadget-delegate
[ set-tile-definition ] keep ;
-tile "Tile commands" {
- { "Close" f [ close-tile ] }
-} define-commands
-
: show-definition ( definition definitions -- )
2dup definition-index dup 0 >= [
over nth-gadget swap scroll>rect drop
! Define commands in terms of operations
! Tile commands
-tile "Word commands"
+tile "Toolbar"
\ word class-operations [ tile-definition ] modify-operations
[ command-name "Browse" = not ] subset
+{ "Close" f [ close-tile ] } add*
define-commands
! Interactor commands
C: tool ( gadget -- tool )
{
{
- [ dup dup class tool 2array "Toolbar" <toolbar> ]
+ [ dup dup class tool 2array <toolbar> ]
f
f
@top
: restore-windows? ( -- ? )
windows get [ empty? not ] [ f ] if* ;
-: <toolbar> ( target classes group -- toolbar )
- swap
- [ commands hash ] map-with concat
+: <toolbar> ( target classes -- toolbar )
+ [ commands "Toolbar" swap hash ] map concat
[ <command-presentation> ] map-with
make-shelf ;