Editors now support the stream output protocol

slava 2006-09-29 21:18:09 +00:00
parent 6438c25ec4
commit 0776e02d0c
5 changed files with 27 additions and 1 deletions

View File

@ -1,4 +1,5 @@
- auto-invoke code gc - auto-invoke code gc
- code gc sig11
- cocoa: support real redefinition - cocoa: support real redefinition
- fix this: - fix this:
[ 1 2 3 4 5 6 7 8 9 10 10 10 10 10 10 10 10 10 10 11 11 11 113 ] . [ 1 2 3 4 5 6 7 8 9 10 10 10 10 10 10 10 10 10 10 11 11 11 113 ] .
@ -39,7 +40,6 @@
- services do not launch if factor not running - services do not launch if factor not running
- fix ui listener delay - fix ui listener delay
- editor: - editor:
- editor should support stream output protocol
- double/triple click - double/triple click
- autoscroll - autoscroll
- transpose char/word/line - transpose char/word/line

View File

@ -47,10 +47,12 @@ PROVIDE: library/ui {
"tools/workspace.factor" "tools/workspace.factor"
"tools/operations.factor" "tools/operations.factor"
} { } {
"test/gadgets.factor"
"test/models.factor" "test/models.factor"
"test/document.factor" "test/document.factor"
"test/rectangles.factor" "test/rectangles.factor"
"test/fields.factor" "test/fields.factor"
"test/commands.factor" "test/commands.factor"
"test/panes.factor" "test/panes.factor"
"test/editors.factor"
} ; } ;

View File

@ -0,0 +1,10 @@
USING: gadgets-text test kernel io definitions namespaces
gadgets ;
[ t ] [
<editor> "editor" set
"editor" get graft*
"editor" get <plain-writer> [ \ = see ] with-stream
"editor" get editor-text [ \ = see ] string-out =
"editor" get ungraft*
] unit-test

View File

@ -0,0 +1,7 @@
IN: temporary
USING: gadgets test ;
TUPLE: fooey ;
[ ] [ <gadget> <fooey> set-gadget-delegate ] unit-test
[ ] [ f <fooey> set-gadget-delegate ] unit-test

View File

@ -230,3 +230,10 @@ M: editor user-input*
: set-editor-text ( str editor -- ) : set-editor-text ( str editor -- )
control-model set-doc-text ; control-model set-doc-text ;
! Editors support the stream output protocol
M: editor stream-write1 >r ch>string r> stream-write ;
M: editor stream-write control-self user-input ;
M: editor stream-close drop ;