23 lines
662 B
Scheme
23 lines
662 B
Scheme
(define (make-standard-viewer value buffer)
|
|
(let ((x 1)
|
|
(y 1)
|
|
(value value)
|
|
(text (layout-result-standard
|
|
(write-to-string value)
|
|
(result-buffer-num-cols buffer))))
|
|
(lambda (message)
|
|
(debug-message "message for make-standard-viewer" message)
|
|
(cond
|
|
((eq? message 'paint)
|
|
(lambda (self win buffer have-focus?)
|
|
;; #### get rid of this cruft
|
|
((make-simple-result-buffer-printer y x text '() '())
|
|
win buffer have-focus?)))
|
|
|
|
((eq? message 'key-press)
|
|
(lambda (self . ignore)
|
|
self))
|
|
(else
|
|
(error "unknwon message in make-standard-viewer" message))))))
|
|
|