more minor UI cleanups
parent
b092647198
commit
bf59485c2f
|
@ -12,7 +12,7 @@
|
||||||
- fix listener prompt display after presentation commands invoked
|
- fix listener prompt display after presentation commands invoked
|
||||||
- tutorial: clickable code snippets
|
- tutorial: clickable code snippets
|
||||||
- theme abstraction in ui
|
- theme abstraction in ui
|
||||||
- stray gesture son stack
|
- stray gestures on stack
|
||||||
|
|
||||||
+ misc
|
+ misc
|
||||||
|
|
||||||
|
|
|
@ -40,9 +40,6 @@ sequences vectors ;
|
||||||
#! is the gadget itself.
|
#! is the gadget itself.
|
||||||
dup [ dup gadget-parent parents cons ] when ;
|
dup [ dup gadget-parent parents cons ] when ;
|
||||||
|
|
||||||
: find-parent ( gadget quot -- ? )
|
|
||||||
>r parents r> find nip ;
|
|
||||||
|
|
||||||
: each-parent ( gadget quot -- ? )
|
: each-parent ( gadget quot -- ? )
|
||||||
#! Keep executing the quotation on higher and higher
|
#! Keep executing the quotation on higher and higher
|
||||||
#! parents until it returns f.
|
#! parents until it returns f.
|
||||||
|
|
|
@ -33,10 +33,3 @@ C: menu ( assoc -- gadget )
|
||||||
! While a menu is open, clicking anywhere sends the click to
|
! While a menu is open, clicking anywhere sends the click to
|
||||||
! the menu.
|
! the menu.
|
||||||
M: menu inside? ( point menu -- ? ) 2drop t ;
|
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 ;
|
dup pane-output clear-incremental pane-current clear-gadget ;
|
||||||
|
|
||||||
: pane-write-1 ( style text pane -- )
|
: 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 -- )
|
: pane-terpri ( pane -- )
|
||||||
dup pane-current over pane-output add-incremental
|
dup pane-current over pane-output add-incremental
|
||||||
|
|
Loading…
Reference in New Issue