commander-s/scheme/std-viewer.scm

23 lines
662 B
Scheme
Raw Normal View History

2005-05-31 09:15:31 -04:00
(define (make-standard-viewer value buffer)
(let ((x 1)
(y 1)
2005-05-31 09:15:31 -04:00
(value value)
(text (layout-result-standard
(write-to-string value)
2005-05-31 09:15:31 -04:00
(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))))))