
1. Lots of #lang-ization, other racketizations, code improvements, etc. 2. Some files that were not working now do. 3. "collects/tests/aligned-pasteboard" had some files that were near duplicates of "collects/mrlib/private/aligned-pasteboard/tests". I've removed the former since in a few places it looked like an older version (eg, there were bogus references to a non-existent "utils.rkt"). The former has more files that are in runnable condition now. 4. There are plenty of tests that look like they're failing, but it wasn't shown since they just return #f, and when they were running with a "-f" these results weren't displayed. 5. I have no idea about the code, this is all just reshuffling and minor editing.
26 lines
830 B
Racket
26 lines
830 B
Racket
#lang racket/gui
|
|
|
|
(require "../aligned-pasteboard.rkt" "../aligned-editor-container.rkt"
|
|
"../stretchable-editor-snip.rkt" "../snip-lib.rkt")
|
|
|
|
(define f (new frame% [label ""] [width 500] [height 500]))
|
|
(define e (new vertical-pasteboard%))
|
|
(define c (new aligned-editor-canvas% [parent f] [editor e]))
|
|
|
|
(define pb (new vertical-pasteboard%))
|
|
(define aes (new aligned-editor-snip%
|
|
[editor pb] [stretchable-width #f] [stretchable-height #f]))
|
|
(define t1 (new text%))
|
|
(define es (new editor-snip% [editor t1]))
|
|
(define t2 (new text%))
|
|
(define ses (new stretchable-editor-snip%
|
|
[editor t2] [stretchable-width #t] [stretchable-height #f]))
|
|
|
|
(send t1 insert "String")
|
|
(send e insert aes)
|
|
(send pb insert es)
|
|
(send pb insert ses)
|
|
|
|
(send f show #t)
|
|
(equal? (snip-width es) (snip-width ses))
|