changelog shortlog graph tags branches changeset file revisions annotate raw help

Mercurial > demo / ui.lisp

revision 0: eb8ed24e8a76
child 3: 8f59e2f1b8c4
     1.1--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2+++ b/ui.lisp	Sun Apr 30 22:01:32 2023 -0400
     1.3@@ -0,0 +1,14 @@
     1.4+(in-package :cl-demo)
     1.5+
     1.6+(defun on-new-window (body)
     1.7+  "Handle new window event."
     1.8+  (let ((elt (clog:create-child body "<h1>foobar</h1>")))
     1.9+    (clog:set-on-click
    1.10+     elt
    1.11+     (lambda (o)
    1.12+       (setf (clog:color elt) "green")))))
    1.13+
    1.14+(defun start-ui ()
    1.15+  "Start the UI."
    1.16+  (clog:initialize #'on-new-window)
    1.17+  (clog:open-browser))