2005-05-31 09:15:31 -04:00
|
|
|
(define (make-standard-viewer value buffer)
|
2005-05-31 07:20:20 -04:00
|
|
|
(let ((x 1)
|
|
|
|
(y 1)
|
2005-05-31 09:15:31 -04:00
|
|
|
(value value)
|
|
|
|
(text (layout-result-standard
|
2005-09-27 04:46:34 -04:00
|
|
|
(write-to-string value)
|
2005-05-31 09:15:31 -04:00
|
|
|
(result-buffer-num-cols buffer))))
|
2005-05-31 07:20:20 -04:00
|
|
|
(lambda (message)
|
2005-06-02 03:23:11 -04:00
|
|
|
(debug-message "message for make-standard-viewer" message)
|
2005-05-31 07:20:20 -04:00
|
|
|
(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)
|
2005-06-02 03:23:11 -04:00
|
|
|
self))
|
|
|
|
(else
|
|
|
|
(error "unknwon message in make-standard-viewer" message))))))
|
2005-05-31 07:20:20 -04:00
|
|
|
|