- fix listener prompt display after presentation commands invoked\r
- tutorial: clickable code snippets\r
- theme abstraction in ui\r
-- stray gesture son stack\r
+- stray gestures on stack\r
\r
+ misc\r
\r
#! 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.
! 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 ;
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