This commit is contained in:
David Botton 2021-02-17 18:31:05 -05:00
parent 6c90da78f9
commit 5235829c6a
2 changed files with 12 additions and 12 deletions

View file

@ -36,8 +36,8 @@
(add-class body "w3-blue-grey") (add-class body "w3-blue-grey")
(let* ((menu (create-gui-menu-bar body)) (let* ((menu (create-gui-menu-bar body))
(tmp (create-gui-menu-icon menu :on-click #'on-help-about)) (tmp (create-gui-menu-icon menu :on-click #'on-help-about))
(file (create-gui-menu-drop-down menu :content "File")) (file (create-gui-menu-drop-down menu :content "Database"))
(tmp (create-gui-menu-drop-down menu :content "Open Database Connection")) (tmp (create-gui-menu-drop-down menu :content "Open Connection" :on-click #'on-db-open))
(win (create-gui-menu-drop-down menu :content "Window")) (win (create-gui-menu-drop-down menu :content "Window"))
(tmp (create-gui-menu-item win :content "Maximize All" :on-click #'maximize-all-windows)) (tmp (create-gui-menu-item win :content "Maximize All" :on-click #'maximize-all-windows))
(tmp (create-gui-menu-item win :content "Normalize All" :on-click #'normalize-all-windows)) (tmp (create-gui-menu-item win :content "Normalize All" :on-click #'normalize-all-windows))

View file

@ -7,20 +7,20 @@
;; For web oriented apps consider using the :client-movement option. ;; For web oriented apps consider using the :client-movement option.
;; See clog-gui-initialize documentation. ;; See clog-gui-initialize documentation.
(defun on-file-count (body) (defun on-file-count (obj)
(let ((win (create-gui-window body :title "Count"))) (let ((win (create-gui-window obj :title "Count")))
(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 (obj)
(let* ((win (create-gui-window body :title "Browse")) (let* ((win (create-gui-window obj :title "Browse"))
(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 (obj)
(let* ((win (create-gui-window body :title "Drawing")) (let* ((win (create-gui-window obj :title "Drawing"))
(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)
@ -35,15 +35,15 @@
(path-stroke cx) (path-stroke cx)
(path-fill cx))) (path-fill cx)))
(defun on-file-movies (body) (defun on-file-movies (obj)
(let* ((win (create-gui-window body :title "Movie")) (let* ((win (create-gui-window obj :title "Movie"))
(movie (create-video (window-content win) (movie (create-video (window-content win)
:source "https://www.w3schools.com/html/mov_bbb.mp4"))) :source "https://www.w3schools.com/html/mov_bbb.mp4")))
(setf (box-width movie) "100%") (setf (box-width movie) "100%")
(setf (box-height movie) "100%"))) (setf (box-height movie) "100%")))
(defun on-file-pinned (body) (defun on-file-pinned (obj)
(let ((win (create-gui-window body :title "Pinned" (let ((win (create-gui-window obj :title "Pinned"
:top (unit :px 50) :top (unit :px 50)
:left (unit :px 0) :left (unit :px 0)
:width 100 :width 100