more minor UI cleanups
parent
b092647198
commit
bf59485c2f
|
@ -40,9 +40,6 @@ sequences vectors ;
|
|||
#! is the gadget itself.
|
||||
dup [ dup gadget-parent parents cons ] when ;
|
||||
|
||||
: find-parent ( gadget quot -- ? )
|
||||
>r parents r> find nip ;
|
||||
|
||||
: each-parent ( gadget quot -- ? )
|
||||
#! Keep executing the quotation on higher and higher
|
||||
#! parents until it returns f.
|
||||
|
|
|
@ -33,10 +33,3 @@ C: menu ( assoc -- gadget )
|
|||
! While a menu is open, clicking anywhere sends the click to
|
||||
! the menu.
|
||||
M: menu inside? ( point menu -- ? ) 2drop t ;
|
||||
|
||||
: actionize ( obj assoc -- assoc )
|
||||
#! Prepends an object to each cdr of the assoc list. Utility
|
||||
#! word for constructing menu action association lists.
|
||||
[
|
||||
unswons >r >r unit [ car ] cons r> append r> swons
|
||||
] map-with ;
|
||||
|
|
|
@ -67,7 +67,11 @@ M: pane focusable-child* ( pane -- editor )
|
|||
dup pane-output clear-incremental pane-current clear-gadget ;
|
||||
|
||||
: pane-write-1 ( style text pane -- )
|
||||
>r <presentation> r> pane-current add-gadget ;
|
||||
pick empty? pick empty? and [
|
||||
3drop
|
||||
] [
|
||||
>r <presentation> r> pane-current add-gadget
|
||||
] ifte ;
|
||||
|
||||
: pane-terpri ( pane -- )
|
||||
dup pane-current over pane-output add-incremental
|
||||
|
|
Loading…
Reference in New Issue