Clicking input implemented

slava 2006-05-20 21:50:59 +00:00
parent 18fdc91de7
commit 8dce36d191
2 changed files with 22 additions and 9 deletions

View File

@ -18,6 +18,7 @@
+ help: + help:
- tools section needs updates
- method ordering and interpreter algorithm sections need updates - method ordering and interpreter algorithm sections need updates
- document that can <void*> only be called with an alien - document that can <void*> only be called with an alien
- help search - help search
@ -34,16 +35,16 @@
+ ui/help: + ui/help:
- new browser: - new browser:
- separate definition & documentation tabs
- browse generic words and classes - browse generic words and classes
- initial size sucks - initial size sucks
- need actions for reloading the source file and opening word in jEdit
- toggle/radio buttons/tabs or something - toggle/radio buttons/tabs or something
- inspector: less clutter when browsing words
- make-frame should compile - make-frame should compile
- track: - track:
- don't allow negative dimensions - don't allow negative dimensions
- fix top level window positioning - fix top level window positioning
- changing window titles - changing window titles
- reimplement clicking input
- clicks sent twice - clicks sent twice
- speed up ideas: - speed up ideas:
- only do clipping for certain gadgets - only do clipping for certain gadgets
@ -60,6 +61,7 @@
- polish OS X menu bar code - polish OS X menu bar code
- when scrolling wheel, or moving mouse out of window, rollover is not - when scrolling wheel, or moving mouse out of window, rollover is not
updated updated
- focus is not top-level window aware
- display lists - display lists
- saving the image should save window configuration - saving the image should save window configuration
- fix up the min thumb size hack - fix up the min thumb size hack

View File

@ -2,10 +2,10 @@
! See http://factorcode.org/license.txt for BSD license. ! See http://factorcode.org/license.txt for BSD license.
IN: gadgets-listener IN: gadgets-listener
USING: arrays gadgets gadgets-editors gadgets-labels USING: arrays gadgets gadgets-editors gadgets-labels
gadgets-layouts gadgets-panes gadgets-scrolling gadgets-layouts gadgets-panes gadgets-presentations
gadgets-theme generic hashtables io jedit gadgets-scrolling gadgets-theme generic hashtables io jedit
kernel listener math namespaces parser prettyprint kernel listener math namespaces parser prettyprint sequences
sequences styles threads words ; styles threads words ;
TUPLE: listener-gadget scroller stack ; TUPLE: listener-gadget scroller stack ;
@ -66,9 +66,20 @@ M: listener-gadget focusable-child* ( listener -- gadget )
: listener-window ( -- ) : listener-window ( -- )
<listener-gadget> "Listener" open-window ; <listener-gadget> "Listener" open-window ;
: listener-window* ( quot -- ) : listener-window* ( quot/string -- )
<listener-gadget> [ listener-gadget-pane pane-call ] keep <listener-gadget> [
"Listener" open-window ; listener-gadget-pane over quotation?
[ pane-call ] [ replace-input ] if
] keep "Listener" open-window ;
: listener-run-files ( seq -- ) : listener-run-files ( seq -- )
[ [ run-file ] each ] curry listener-window* ; [ [ 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* ;