From 3dd0183bf488217701bafa9f39a0dd486ad7b59a Mon Sep 17 00:00:00 2001 From: David Botton Date: Mon, 29 Jul 2024 14:12:53 -0400 Subject: [PATCH] text dialog for custom slots --- tools/clog-builder-api.lisp | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/tools/clog-builder-api.lisp b/tools/clog-builder-api.lisp index 42f49a5..7245220 100644 --- a/tools/clog-builder-api.lisp +++ b/tools/clog-builder-api.lisp @@ -11,7 +11,24 @@ :properties ((:name "in-package" :attr "data-in-package") (:name "custom slots" - :attr "data-custom-slots") + :setup ,(lambda (control td1 td2) + (declare (ignore td1)) + (setf (advisory-title td2) "double click for external text editor") + (set-on-double-click td2 (lambda (obj) + (let ((*default-title-class* *builder-title-class*) + (*default-border-class* *builder-border-class*)) + (input-dialog obj "Enter slots:" + (lambda (result) + (when result + (setf (attribute control "data-custom-slots") result) + (setf (text td2) result))) + :default-value (attribute control "data-custom-slots") + :width 800 + :height 420 + :size 80 + :rows 10))))) + :get ,(lambda (control) (attribute control "data-custom-slots")) + :set ,(lambda (control obj) (setf (attribute control "data-custom-slots") (text obj)))) (:name "width" :get ,(lambda (control) (width control)) :setup :read-only)