diff --git a/tools/clog-builder-repl.clog b/tools/clog-builder-repl.clog new file mode 100644 index 0000000..be9639f --- /dev/null +++ b/tools/clog-builder-repl.clog @@ -0,0 +1 @@ +
\ No newline at end of file diff --git a/tools/clog-builder-repl.lisp b/tools/clog-builder-repl.lisp new file mode 100644 index 0000000..105216b --- /dev/null +++ b/tools/clog-builder-repl.lisp @@ -0,0 +1,11 @@ +(in-package "CLOG-TOOLS") +(defclass clog-builder-repl (clog:clog-panel) + ( (clog-terminal-1 :reader clog-terminal-1) +)) +(defun create-clog-builder-repl (clog-obj &key (hidden nil) (class nil) (html-id nil) (auto-place t)) + (let ((panel (change-class (clog:create-div clog-obj :content "
" + :hidden hidden :class class :html-id html-id :auto-place auto-place) 'clog-builder-repl))) + (setf (slot-value panel 'clog-terminal-1) (attach-as-child clog-obj "CLOGB3867322458" :clog-type 'CLOG-TERMINAL:CLOG-TERMINAL-ELEMENT :new-id t)) + (let ((target (clog-terminal-1 panel))) (declare (ignorable target)) (clog-terminal:attach-clog-terminal target :greetings "CLOG Builder REPL") (clog-terminal:prompt target "> ")) + (clog-terminal:set-on-command (clog-terminal-1 panel) (lambda (target data) (declare (ignorable target data)) (clog-terminal:echo target (capture-eval data :clog-obj clog-obj)))) + panel))