diff --git a/tools/clog-builder-eval.lisp b/tools/clog-builder-eval.lisp index 9073dce..ca7416d 100644 --- a/tools/clog-builder-eval.lisp +++ b/tools/clog-builder-eval.lisp @@ -30,7 +30,7 @@ (format nil "~A~%=>~A~%" result eval-result) *package*)))))) -(defun do-eval (obj form-string cname &key (package "clog-user") custom-boot) +(defun do-eval (obj form-string cname &key (package "clog-user") (test t) custom-boot) "Render, evalute and run code for panel" (let* ((result (capture-eval (format nil "~A~% (clog:set-on-new-window~ (lambda (body)~ @@ -47,9 +47,9 @@ (format nil ":boot-file \"~A\" " custom-boot) "")) :eval-in-package package))) - (if *app-mode* - (open-browser :url (format nil "http://127.0.0.1:~A/test" *clog-port*)) - (open-window (window (connection-body obj)) - (format nil "/test" *clog-port*))) + (when test + (if *clogframe-mode* + (open-browser :url (format nil "http://127.0.0.1:~A/test" *clog-port*)) + (open-window (window (connection-body obj)) "/test"))) (on-open-file obj :title-class "w3-yellow" :title "test eval" :text result))) diff --git a/tools/clog-builder-files.lisp b/tools/clog-builder-files.lisp index 843f27a..4f87386 100644 --- a/tools/clog-builder-files.lisp +++ b/tools/clog-builder-files.lisp @@ -70,14 +70,14 @@ (m-saveas (create-gui-menu-item m-file :content "save as..")) (m-emacs (create-gui-menu-item m-file :content "open in emacs")) (m-edit (create-gui-menu-drop-down menu :content "Edit")) - (m-undo (create-gui-menu-item m-edit :content "undo")) - (m-redo (create-gui-menu-item m-edit :content "redo")) - (m-copy (create-gui-menu-item m-edit :content "copy")) - (m-paste (create-gui-menu-item m-edit :content "paste")) - (m-cut (create-gui-menu-item m-edit :content "cut")) - (m-del (create-gui-menu-item m-edit :content "delete")) + (m-undo (create-gui-menu-item m-edit :content "undo (cmd/ctrl-z)")) + (m-redo (create-gui-menu-item m-edit :content "redo (shift cmd/ctrl-z)")) + (m-copy (create-gui-menu-item m-edit :content "copy (cmd/ctrl-c)")) + (m-paste (create-gui-menu-item m-edit :content "paste (cmd/ctrl-v)")) + (m-cut (create-gui-menu-item m-edit :content "cut (cmd/ctrl-x)")) + (m-del (create-gui-menu-item m-edit :content "delete (del)")) (m-lisp (create-gui-menu-drop-down menu :content "Lisp")) - (m-efrm (create-gui-menu-item m-lisp :content "evaluate form")) + (m-efrm (create-gui-menu-item m-lisp :content "evaluate form (cmd/alt-[)")) (m-esel (create-gui-menu-item m-lisp :content "evaluate selection")) (m-test (create-gui-menu-item m-lisp :content "evaluate all")) (m-brws (create-gui-menu-item m-lisp :content "systen browse selection")) diff --git a/tools/clog-builder-panels.lisp b/tools/clog-builder-panels.lisp index 011ee79..f8b655b 100644 --- a/tools/clog-builder-panels.lisp +++ b/tools/clog-builder-panels.lisp @@ -519,6 +519,7 @@ not a temporarily attached one when using select-control." (m-reopn (create-gui-menu-item m-file :content "save, close and popup this panel")) (m-reopnb (create-gui-menu-item m-file :content "save, close and popup this panel custom boot file")) (m-reopnh (create-gui-menu-item m-file :content "save, close and popup this panel no css")) + (m-reopns (create-gui-menu-item m-file :content "save, close and reopen as text source")) (m-edit (create-gui-menu-drop-down menu :content "Edit")) (m-undo (create-gui-menu-item m-edit :content "undo")) (m-redo (create-gui-menu-item m-edit :content "redo")) @@ -529,6 +530,8 @@ not a temporarily attached one when using select-control." (m-lisp (create-gui-menu-drop-down menu :content "Lisp")) (m-rndr (create-gui-menu-item m-lisp :content "render form to lisp")) (m-rndras (create-gui-menu-item m-lisp :content "render form to lisp as...")) + (m-rndr (create-gui-menu-item m-lisp :content "render form to lisp")) + (m-eval (create-gui-menu-item m-lisp :content "evaluate")) (m-test (create-gui-menu-item m-lisp :content "evaluate and test")) (m-events (create-gui-menu-drop-down menu :content "controls")) (tmp (create-gui-menu-item m-events :content "show control properties" :on-click 'on-show-control-properties-win)) @@ -881,9 +884,10 @@ not a temporarily attached one when using select-control." (lambda (result) (when result (do-save obj file-name data)))))))) - (eval-test (obj) + (eval-test (obj &key (test t)) (do-eval obj (render-clog-code content (bottom-panel box)) (attribute content "data-clog-name") + :test test :package (attribute content "data-in-package"))) (render (obj data &key save-as) (cond ((or (equal render-file-name "") @@ -944,6 +948,11 @@ not a temporarily attached one when using select-control." (save obj nil)) (window-close win) (on-new-builder-panel obj :open-file file-name :open-ext :custom))) + (set-on-click m-reopns (lambda (obj) + (when is-dirty + (save obj nil)) + (window-close win) + (on-open-file obj :open-file file-name))) (set-on-click m-reopnb (lambda (obj) (input-dialog obj "Boot file Name?" (lambda (file) @@ -957,6 +966,8 @@ not a temporarily attached one when using select-control." (save obj nil)) (window-close win) (on-new-builder-panel obj :open-file file-name))) + (set-on-click m-eval (lambda (obj) + (eval-test obj :test nil))) (set-on-click btn-test #'eval-test) (set-on-click m-test #'eval-test) (set-on-mouse-click btn-rndr (lambda (obj data) (render obj data))) diff --git a/tools/panel-quick-start.clog b/tools/panel-quick-start.clog index d5e671a..5226454 100644 --- a/tools/panel-quick-start.clog +++ b/tools/panel-quick-start.clog @@ -15,7 +15,7 @@ Place as static and child control - Click the parent control in your panel. Clic Use the positioning property in the property panel

Access Children Controls

-Double click the parent control, it will freeze (unfreeze by double clicking it in the control list in the lower left panel), and children can not be manipulated
+Double click the parent control in the control list, it will freeze (unfreeze by double clicking it in the control list in the lower left panel), and children can not be manipulated

Change Creation/Tab Order

Use the control list in lower left panel to drag and drop order
diff --git a/tools/panel-quick-start.lisp b/tools/panel-quick-start.lisp index fc9b31a..2c90085 100644 --- a/tools/panel-quick-start.lisp +++ b/tools/panel-quick-start.lisp @@ -1,4 +1,5 @@ -(in-package "CLOG-TOOLS") +;;;; CLOG Builder generated code - modify original .clog file and rerender +(in-package :clog-tools) (defclass quick-start (clog:clog-panel) ((instructions :reader instructions) (span-13 :reader span-13) (image-12 :reader image-12))) @@ -7,38 +8,38 @@ (let ((panel (change-class (clog:create-div clog-obj :content - "\"Add CLOG The Common Lisp Omnificent GUI
-

Quick Start

-

Placing Controls

-Placing Controls - Click a control from the control pallets in the top left panel. Click on your panel
-Static Placement - Click a control from the control pallets in the top left panel. Click on your panel while holding down <ctrl/cmd>
-Place as child control - Click the parent control in your panel. Click a control from the control pallets in the top left panel. Click on your panel while holding down <shift>
-Place as static and child control - Click the parent control in your panel. Click a control from the control pallets in the top left panel. Click on your panel while holding down <shift>+<ctrl/cmd>
-
-

Existing Controls as Children

-2 ways:
-1. Click the parent control in your panel. Holding <shift> click the control to make a child.
-2. Use the control list in the lower left to drag and drop holding the <shift> key
-
-

Existing Controls as Static

-Use the positioning property in the property panel
-
-

Access Children Controls

-Double click the parent control, it will freeze (unfreeze by double clicking it in the control list in the lower left panel), and children can not be manipulated
-
-

Change Creation/Tab Order

-Use the control list in lower left panel to drag and drop order
+ "\"Add CLOG The Common Lisp Omnificent GUI
+

Quick Start

+

Placing Controls

+Placing Controls - Click a control from the control pallets in the top left panel. Click on your panel
+Static Placement - Click a control from the control pallets in the top left panel. Click on your panel while holding down <ctrl/cmd>
+Place as child control - Click the parent control in your panel. Click a control from the control pallets in the top left panel. Click on your panel while holding down <shift>
+Place as static and child control - Click the parent control in your panel. Click a control from the control pallets in the top left panel. Click on your panel while holding down <shift>+<ctrl/cmd>
+
+

Existing Controls as Children

+2 ways:
+1. Click the parent control in your panel. Holding <shift> click the control to make a child.
+2. Use the control list in the lower left to drag and drop holding the <shift> key
+
+

Existing Controls as Static

+Use the positioning property in the property panel
+
+

Access Children Controls

+Double click the parent control in the control list, it will freeze (unfreeze by double clicking it in the control list in the lower left panel), and children can not be manipulated
+
+

Change Creation/Tab Order

+Use the control list in lower left panel to drag and drop order
" :hidden hidden :class class :html-id html-id :auto-place auto-place) 'quick-start))) (setf (slot-value panel 'instructions) - (attach-as-child clog-obj "CLOGB3868051570" :clog-type + (attach-as-child clog-obj "CLOGB3920559744" :clog-type 'clog:clog-div :new-id t)) (setf (slot-value panel 'span-13) - (attach-as-child clog-obj "CLOGB3868051568" :clog-type + (attach-as-child clog-obj "CLOGB3920559742" :clog-type 'clog:clog-span :new-id t)) (setf (slot-value panel 'image-12) - (attach-as-child clog-obj "CLOGB3868051567" :clog-type + (attach-as-child clog-obj "CLOGB3920559741" :clog-type 'clog:clog-img :new-id t)) panel))