Better initial placement

This commit is contained in:
David Botton 2021-02-14 15:39:21 -05:00
parent 6b0fbc44fa
commit 699a494fac
2 changed files with 118 additions and 104 deletions

View file

@ -12,22 +12,19 @@
;; and :client-movement is set to nil. This mode offers numerous events
;; for fine control and is best for local applications although will be a bit
;; more choppy cross continent or via satellite.
(let ((win (create-gui-window body :left (random 600) :top (+ 40 (random 400))
:client-movement t)))
(let ((win (create-gui-window body :client-movement t)))
(dotimes (n 100)
;; window-content is the root element for the clog-gui
;; windows
(create-div (window-content win) :content n))))
(defun on-file-browse (body)
(let* ((win (create-gui-window body :left (random 600) :top (+ 40 (random 400))
:client-movement t))
(let* ((win (create-gui-window body :client-movement t))
(browser (create-child (window-content win)
"<iframe width=100% height=98% src='https://common-lisp.net/'></iframe>")))))
(defun on-file-drawing (body)
(let* ((win (create-gui-window body :left (random 600) :top (+ 40 (random 400))
:client-movement nil))
(let* ((win (create-gui-window body :client-movement nil))
(canvas (create-canvas (window-content win) :width 600 :height 400))
(cx (create-context2d canvas)))
(set-border canvas :thin :solid :black)
@ -43,8 +40,7 @@
(path-fill cx)))
(defun on-file-movies (body)
(let ((win (create-gui-window body :left (random 600) :top (+ 40 (random 400))
:client-movement t)))
(let ((win (create-gui-window body :client-movement t)))
(create-video (window-content win) :source "https://www.w3schools.com/html/mov_bbb.mp4")))
(defun on-help-about (body)