more stuff in demo 22

This commit is contained in:
David Botton 2021-02-11 22:57:08 -05:00
parent b112cbb059
commit 7c7d33a795

View file

@ -5,19 +5,19 @@
(in-package :clog-user) (in-package :clog-user)
(defun on-file-count (body) (defun on-file-count (body)
(let ((win (create-gui-window body))) (let ((win (create-gui-window body :left (random 600) :top (+ 40 (random 400)))))
(dotimes (n 100) (dotimes (n 100)
;; window-content is the root element for the clog-gui ;; window-content is the root element for the clog-gui
;; windows ;; windows
(create-div (window-content win) :content n)))) (create-div (window-content win) :content n))))
(defun on-file-browse (body) (defun on-file-browse (body)
(let* ((win (create-gui-window body)) (let* ((win (create-gui-window body :left (random 600) :top (+ 40 (random 400))))
(browser (create-child (window-content win) (browser (create-child (window-content win)
"<iframe width=100% height=98% src='https://common-lisp.net/'></iframe>"))))) "<iframe width=100% height=98% src='https://common-lisp.net/'></iframe>")))))
(defun on-file-drawing (body) (defun on-file-drawing (body)
(let* ((win (create-gui-window body)) (let* ((win (create-gui-window body :left (random 600) :top (+ 40 (random 400))))
(canvas (create-canvas (window-content win) :width 600 :height 400)) (canvas (create-canvas (window-content win) :width 600 :height 400))
(cx (create-context2d canvas))) (cx (create-context2d canvas)))
(set-border canvas :thin :solid :black) (set-border canvas :thin :solid :black)
@ -33,7 +33,7 @@
(path-fill cx))) (path-fill cx)))
(defun on-file-movies (body) (defun on-file-movies (body)
(let* ((win (create-gui-window body))) (let* ((win (create-gui-window body :left (random 600) :top (+ 40 (random 400)))))
(create-video (window-content win) :source "https://www.w3schools.com/html/mov_bbb.mp4"))) (create-video (window-content win) :source "https://www.w3schools.com/html/mov_bbb.mp4")))
(defun on-help-about (body) (defun on-help-about (body)