mirror of
https://github.com/rabbibotton/clog.git
synced 2025-12-06 02:30:42 -08:00
fix scroll issue in repl playground
This commit is contained in:
parent
0ad5b13463
commit
2343bd6661
1 changed files with 26 additions and 22 deletions
|
|
@ -2,10 +2,10 @@
|
||||||
|
|
||||||
(defun on-open-repl-console (obj repl)
|
(defun on-open-repl-console (obj repl)
|
||||||
(let* ((win (on-open-file obj :title "CLOG REPL Console"
|
(let* ((win (on-open-file obj :title "CLOG REPL Console"
|
||||||
:is-console t
|
:is-console t
|
||||||
:top 520 :left 300
|
:top 520 :left 300
|
||||||
:closer-html "⨀"
|
:closer-html "⨀"
|
||||||
:editor-use-console-for-evals t)))
|
:editor-use-console-for-evals t)))
|
||||||
(set-on-window-can-close win (lambda (obj)
|
(set-on-window-can-close win (lambda (obj)
|
||||||
(declare (ignore obj))
|
(declare (ignore obj))
|
||||||
(window-focus win)
|
(window-focus win)
|
||||||
|
|
@ -27,6 +27,10 @@
|
||||||
(repl (create-clog-builder-repl (window-content win))))
|
(repl (create-clog-builder-repl (window-content win))))
|
||||||
(when package
|
(when package
|
||||||
(setf (text-value (package-div repl)) package))
|
(setf (text-value (package-div repl)) package))
|
||||||
|
(clog-ace:resize (playground repl))
|
||||||
|
(set-on-window-size-done win (lambda (obj)
|
||||||
|
(declare (ignore obj))
|
||||||
|
(clog-ace:resize (playground repl))))
|
||||||
(set-on-click (create-span (window-icon-area win)
|
(set-on-click (create-span (window-icon-area win)
|
||||||
:content (format nil "~A " (code-char #x26F6))
|
:content (format nil "~A " (code-char #x26F6))
|
||||||
:auto-place :top)
|
:auto-place :top)
|
||||||
|
|
@ -41,12 +45,12 @@
|
||||||
(set-on-window-move win (lambda (obj)
|
(set-on-window-move win (lambda (obj)
|
||||||
(setf (width obj) (width obj))
|
(setf (width obj) (width obj))
|
||||||
(setf (height obj) (height obj))))))
|
(setf (height obj) (height obj))))))
|
||||||
(set-on-click (create-span (window-icon-area win)
|
(set-on-click (create-span (window-icon-area win)
|
||||||
:content "- "
|
:content "- "
|
||||||
:auto-place :top)
|
:auto-place :top)
|
||||||
(lambda (obj)
|
(lambda (obj)
|
||||||
(declare (ignore obj))
|
(declare (ignore obj))
|
||||||
(setf (hiddenp win) t)))
|
(setf (hiddenp win) t)))
|
||||||
(when *clog-repl-private-console*
|
(when *clog-repl-private-console*
|
||||||
(let ((pcon (on-open-repl-console obj win)))
|
(let ((pcon (on-open-repl-console obj win)))
|
||||||
(set-on-click (create-span (window-icon-area win)
|
(set-on-click (create-span (window-icon-area win)
|
||||||
|
|
@ -89,18 +93,18 @@
|
||||||
(equalp data ":q"))
|
(equalp data ":q"))
|
||||||
(window-close (parent (parent panel))))
|
(window-close (parent (parent panel))))
|
||||||
((equalp data "(clog-builder-repl)")
|
((equalp data "(clog-builder-repl)")
|
||||||
(let* ((*default-title-class* *builder-title-class*)
|
(let* ((*default-title-class* *builder-title-class*)
|
||||||
(*default-border-class* *builder-border-class*)
|
(*default-border-class* *builder-border-class*)
|
||||||
(win (create-gui-window panel :title "CLOG Builder REPL GUI Window"
|
(win (create-gui-window panel :title "CLOG Builder REPL GUI Window"
|
||||||
:height 400 :width 600
|
:height 400 :width 600
|
||||||
:has-pinner t
|
:has-pinner t
|
||||||
:client-movement *client-side-movement*)))
|
:client-movement *client-side-movement*)))
|
||||||
(setf clog-user::*body* (window-content win))
|
(setf clog-user::*body* (window-content win))
|
||||||
(set-on-window-close win
|
(set-on-window-close win
|
||||||
(lambda (obj)
|
(lambda (obj)
|
||||||
(when (eq obj clog-user::*body*)
|
(when (eq obj clog-user::*body*)
|
||||||
(setf clog-user::*body* nil))))
|
(setf clog-user::*body* nil))))
|
||||||
(clog-terminal:echo target "Use clog-user:*body* to access the clog-builder-repl window.")))
|
(clog-terminal:echo target "Use clog-user:*body* to access the clog-builder-repl window.")))
|
||||||
(t
|
(t
|
||||||
(setf data (format nil "(let ((tmp (progn ~A)))
|
(setf data (format nil "(let ((tmp (progn ~A)))
|
||||||
(setf /// //) (setf // /) (setf / (list tmp))
|
(setf /// //) (setf // /) (setf / (list tmp))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue