more minor UI cleanups

cvs
Slava Pestov 2005-07-19 21:51:59 +00:00
parent b092647198
commit bf59485c2f
4 changed files with 6 additions and 12 deletions

View File

@ -12,7 +12,7 @@
- fix listener prompt display after presentation commands invoked
- tutorial: clickable code snippets
- theme abstraction in ui
- stray gesture son stack
- stray gestures on stack
+ misc

View File

@ -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.

View File

@ -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 ;

View File

@ -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