commander-s/scheme/std-viewer.scm

20 lines
513 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
(exp->string value)
(result-buffer-num-cols buffer))))
(lambda (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))))))