From 72c76fb7b6f1b99c654ae9b8deee0dacfda6a7d5 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Mon, 27 Mar 2023 08:31:59 -0400 Subject: Allow REPL to render more than just text. --- catbird/repl.scm | 130 +++++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 92 insertions(+), 38 deletions(-) diff --git a/catbird/repl.scm b/catbird/repl.scm index 7378ecf..d3768b5 100644 --- a/catbird/repl.scm +++ b/catbird/repl.scm @@ -28,10 +28,12 @@ #:use-module (catbird region) #:use-module (catbird ring-buffer) #:use-module (catbird scene) + #:use-module (catbird ui) #:use-module (chickadee) #:use-module (chickadee graphics color) #:use-module (chickadee graphics path) #:use-module (chickadee graphics text) + #:use-module (chickadee graphics texture) #:use-module (chickadee math vector) #:use-module (ice-9 exceptions) #:use-module (ice-9 match) @@ -42,13 +44,68 @@ #:use-module (system base language) #:export ( - resize-repl)) + resize-repl + repl-print)) ;; TODO: Multiple values ;; TODO: Multiple expressions ;; TODO: Debugger ;; TODO: Switching languages + +;;; +;;; Graphical Printers +;;; + +(define-method (repl-print obj) + (make