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:
- tools section needs updates
- method ordering and interpreter algorithm sections need updates
- document that can <void*> 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

View File

@ -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-gadget> "Listener" open-window ;
: listener-window* ( quot -- )
<listener-gadget> [ listener-gadget-pane pane-call ] keep
"Listener" open-window ;
: listener-window* ( quot/string -- )
<listener-gadget> [
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* ;