diff --git a/TODO.FACTOR.txt b/TODO.FACTOR.txt index f1095b33fc..2c8cbd027f 100644 --- a/TODO.FACTOR.txt +++ b/TODO.FACTOR.txt @@ -18,6 +18,7 @@ + help: +- tools section needs updates - method ordering and interpreter algorithm sections need updates - document that can only be called with an alien - help search @@ -34,16 +35,16 @@ + ui/help: - new browser: - - separate definition & documentation tabs - browse generic words and classes - initial size sucks + - need actions for reloading the source file and opening word in jEdit - toggle/radio buttons/tabs or something +- inspector: less clutter when browsing words - make-frame should compile - track: - don't allow negative dimensions - fix top level window positioning - changing window titles -- reimplement clicking input - clicks sent twice - speed up ideas: - only do clipping for certain gadgets @@ -60,6 +61,7 @@ - polish OS X menu bar code - when scrolling wheel, or moving mouse out of window, rollover is not updated +- focus is not top-level window aware - display lists - saving the image should save window configuration - fix up the min thumb size hack diff --git a/library/ui/listener.factor b/library/ui/listener.factor index bc057b834f..22e8b1b7bf 100644 --- a/library/ui/listener.factor +++ b/library/ui/listener.factor @@ -2,10 +2,10 @@ ! See http://factorcode.org/license.txt for BSD license. IN: gadgets-listener USING: arrays gadgets gadgets-editors gadgets-labels -gadgets-layouts gadgets-panes gadgets-scrolling -gadgets-theme generic hashtables io jedit -kernel listener math namespaces parser prettyprint -sequences styles threads words ; +gadgets-layouts gadgets-panes gadgets-presentations +gadgets-scrolling gadgets-theme generic hashtables io jedit +kernel listener math namespaces parser prettyprint sequences +styles threads words ; TUPLE: listener-gadget scroller stack ; @@ -66,9 +66,20 @@ M: listener-gadget focusable-child* ( listener -- gadget ) : listener-window ( -- ) "Listener" open-window ; -: listener-window* ( quot -- ) - [ listener-gadget-pane pane-call ] keep - "Listener" open-window ; +: listener-window* ( quot/string -- ) + [ + listener-gadget-pane over quotation? + [ pane-call ] [ replace-input ] if + ] keep "Listener" open-window ; : listener-run-files ( seq -- ) [ [ run-file ] each ] curry listener-window* ; + +: find-listener [ listener-gadget? ] find-parent ; + +M: input show-object ( input button -- ) + >r input-string r> find-listener [ + listener-gadget-pane replace-input + ] [ + listener-window* + ] if* ;