mirror of
https://github.com/rabbibotton/clog.git
synced 2025-12-05 18:20:36 -08:00
Added to panels evaluate, open as text, short cut keys
This commit is contained in:
parent
247cda1fef
commit
a85f2b88a7
5 changed files with 51 additions and 39 deletions
|
|
@ -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)))
|
||||
|
||||
|
|
|
|||
|
|
@ -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"))
|
||||
|
|
|
|||
|
|
@ -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)))
|
||||
|
|
|
|||
2
tools/panel-quick-start.clog
vendored
2
tools/panel-quick-start.clog
vendored
|
|
@ -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<br data-clog-name="none-br-18-11" data-clog-type="br">
|
||||
<br data-clog-name="none-br-19-11" data-clog-type="br">
|
||||
<h3 data-clog-name="none-h3-20-11" data-clog-type="span">Access Children Controls</h3>
|
||||
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<br data-clog-name="none-br-21-11" data-clog-type="br">
|
||||
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<br data-clog-name="none-br-21-11" data-clog-type="br">
|
||||
<br data-clog-name="none-br-22-11" data-clog-type="br">
|
||||
<h3 data-clog-name="none-h3-23-11" data-clog-type="span">Change Creation/Tab Order</h3>
|
||||
Use the control list in lower left panel to drag and drop order<br data-clog-name="none-br-24-11" data-clog-type="br">
|
||||
|
|
|
|||
|
|
@ -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
|
||||
"<img src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAMAAABF0y+mAAABf2lDQ1BzUkdCIElFQzYxOTY2LTIuMQAAKJF1kc8rRFEUxz8zgxEjioVkMQkbM2LUxEYZCSVNY5TBZuaZH2p+vN4bSbbKdooSG78W/AVslbVSREqWsiY26DnXqJHMvd17Pvd7zzmdey7Yw2ktY1b0QCabN0KjAfdMZNbtfKSKFhxAV1Qz9aFgcIKy4+0Gm7JXXpWrvN+/o3YhbmpgqxYe1HQjLzwmPLGc1xVvCjdpqeiC8LGwx5ACha+VHivyk+JkkT8UG+HQMNgbhN3JXxz7xVrKyAjLy2nPpJe0n3rUS1zx7PSU2DZZrZiEGCWAm3FGGMZPLwOy+/Hio1tOlInv+Y6fJCexmuw6KxgskiRFHo+oS5I9LjYhelxmmhXV/799NRN9vmJ2VwAqHyzrpQOcG/BZsKz3fcv6PADHPZxlS/G5Peh/Fb1Q0tp3oX4NTs5LWmwLTteh+U6PGtFvSf28PZGA5yOoi0DjJdTMFXv2c8/hLYRX5asuYHsHOsW/fv4LI2xnxwFcS14AAADkUExURQcFAEEwASwgAD4uAU05AVZAAiEYAKuABJJuBOeuB/2+CAwIADYoAayBBP6/CGBIA1A8AfS4CFA7AR4WAGtPAigeATUnAfm7COCpB6p/BOWsB3VYBA8LAD0uAtWgByQbARkTAcmXBpJtBAgFAN6nB6B4BZBsBYFhBHJWBGNLA1U/Av/ACAQDAF9IA8KSBu+0B553BRsUAVE9A86bBrKGBgkHAKZ9BZ12Bfe6CNahBxMOAQMCAHdaBOatB5t1BQAAANymBwsIAMWUBsqYBr+QBl5HAzcpAvK2CNKeB8+cBumvByZFyZjjEKMAAABMdFJOU////////////////////////////////////////////////////////////////////////////////////////////////////wCejeTMAAAACXBIWXMAAC4jAAAuIwF4pT92AAAA40lEQVQokYWSyQ6CMBCG56ShhxoORoJ7oqJWFEXcoe4aef/3scViZavfhdIv07T/DIQKQC41EqHlSEy+4JTUSQL9VyKSAkmZccJC9kx5Mpc/WzXju/xIeU+z3qBNU94ZZGHLBsrodHFcCqHW6w+s4WhcpQJw4jQgbE1oGns6i0ohdDKOM1+4XC5zJaXejMlugaQrJo0iuWZyUyS3/Ck78bNPuoPPQwhK/DHtsn60vNicKmci4kP+5bphgWHzFpXfgwcW8cngMUKPp+u+2BeTbMui7UTLlM1Wj4l6wNSj+Weo83gDWkirJ693IE0AAAAASUVORK5CYII=\" alt=\"Add image url\" style=\"box-sizing: content-box; position: static; left: 93px; top: 29px;\" id=\"CLOGB3868051567\" data-clog-name=\"image-12\"><span style=\"box-sizing: content-box; position: static; left: 38px; top: 13px;\" id=\"CLOGB3868051568\" data-clog-name=\"span-13\"> <b id=\"CLOGB3868051569\" data-clog-name=\"none-b-1\">CLOG The Common Lisp Omnificent GUI</b></span><div id=\"CLOGB3868051570\" data-clog-name=\"Instructions\">
|
||||
<h2 id=\"CLOGB3868051571\" data-clog-name=\"none-h2-1-11\">Quick Start</h2>
|
||||
<h3 style=\"left: -75px; top: 298.5px;\" id=\"CLOGB3868051572\" data-clog-name=\"none-h3-2-11\">Placing Controls</h3>
|
||||
<b id=\"CLOGB3868051573\" data-clog-name=\"none-b-3-11\">Placing Controls</b> - Click a control from the control pallets in the top left panel. Click on your panel<br id=\"CLOGB3868051574\" data-clog-name=\"none-br-4-11\">
|
||||
<b id=\"CLOGB3868051575\" data-clog-name=\"none-b-5-11\">Static Placement</b> - Click a control from the control pallets in the top left panel. Click on your panel while holding down <ctrl/cmd><br id=\"CLOGB3868051576\" data-clog-name=\"none-br-6-11\">
|
||||
<b id=\"CLOGB3868051577\" data-clog-name=\"none-b-7-11\">Place as child control</b> - 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><br id=\"CLOGB3868051578\" data-clog-name=\"none-br-8-11\">
|
||||
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><br id=\"CLOGB3868051579\" data-clog-name=\"none-br-9-11\">
|
||||
<br id=\"CLOGB3868051580\" data-clog-name=\"none-br-10-11\">
|
||||
<h3 id=\"CLOGB3868051581\" data-clog-name=\"none-h3-11-11\">Existing Controls as Children</h3>
|
||||
<b id=\"CLOGB3868051582\" data-clog-name=\"none-b-12-11\">2 ways:</b><br id=\"CLOGB3868051583\" data-clog-name=\"none-br-13-11\">
|
||||
1. Click the parent control in your panel. Holding <shift> click the control to make a child.<br id=\"CLOGB3868051584\" data-clog-name=\"none-br-14-11\">
|
||||
2. Use the control list in the lower left to drag and drop holding the <shift> key<br id=\"CLOGB3868051585\" data-clog-name=\"none-br-15-11\">
|
||||
<br id=\"CLOGB3868051586\" data-clog-name=\"none-br-16-11\">
|
||||
<h3 id=\"CLOGB3868051587\" data-clog-name=\"none-h3-17-11\">Existing Controls as Static</h3>
|
||||
Use the positioning property in the property panel<br id=\"CLOGB3868051588\" data-clog-name=\"none-br-18-11\">
|
||||
<br id=\"CLOGB3868051589\" data-clog-name=\"none-br-19-11\">
|
||||
<h3 id=\"CLOGB3868051590\" data-clog-name=\"none-h3-20-11\">Access Children Controls</h3>
|
||||
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<br id=\"CLOGB3868051591\" data-clog-name=\"none-br-21-11\">
|
||||
<br id=\"CLOGB3868051592\" data-clog-name=\"none-br-22-11\">
|
||||
<h3 id=\"CLOGB3868051593\" data-clog-name=\"none-h3-23-11\">Change Creation/Tab Order</h3>
|
||||
Use the control list in lower left panel to drag and drop order<br id=\"CLOGB3868051594\" data-clog-name=\"none-br-24-11\">
|
||||
"<img src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAMAAABF0y+mAAABf2lDQ1BzUkdCIElFQzYxOTY2LTIuMQAAKJF1kc8rRFEUxz8zgxEjioVkMQkbM2LUxEYZCSVNY5TBZuaZH2p+vN4bSbbKdooSG78W/AVslbVSREqWsiY26DnXqJHMvd17Pvd7zzmdey7Yw2ktY1b0QCabN0KjAfdMZNbtfKSKFhxAV1Qz9aFgcIKy4+0Gm7JXXpWrvN+/o3YhbmpgqxYe1HQjLzwmPLGc1xVvCjdpqeiC8LGwx5ACha+VHivyk+JkkT8UG+HQMNgbhN3JXxz7xVrKyAjLy2nPpJe0n3rUS1zx7PSU2DZZrZiEGCWAm3FGGMZPLwOy+/Hio1tOlInv+Y6fJCexmuw6KxgskiRFHo+oS5I9LjYhelxmmhXV/799NRN9vmJ2VwAqHyzrpQOcG/BZsKz3fcv6PADHPZxlS/G5Peh/Fb1Q0tp3oX4NTs5LWmwLTteh+U6PGtFvSf28PZGA5yOoi0DjJdTMFXv2c8/hLYRX5asuYHsHOsW/fv4LI2xnxwFcS14AAADkUExURQcFAEEwASwgAD4uAU05AVZAAiEYAKuABJJuBOeuB/2+CAwIADYoAayBBP6/CGBIA1A8AfS4CFA7AR4WAGtPAigeATUnAfm7COCpB6p/BOWsB3VYBA8LAD0uAtWgByQbARkTAcmXBpJtBAgFAN6nB6B4BZBsBYFhBHJWBGNLA1U/Av/ACAQDAF9IA8KSBu+0B553BRsUAVE9A86bBrKGBgkHAKZ9BZ12Bfe6CNahBxMOAQMCAHdaBOatB5t1BQAAANymBwsIAMWUBsqYBr+QBl5HAzcpAvK2CNKeB8+cBumvByZFyZjjEKMAAABMdFJOU////////////////////////////////////////////////////////////////////////////////////////////////////wCejeTMAAAACXBIWXMAAC4jAAAuIwF4pT92AAAA40lEQVQokYWSyQ6CMBCG56ShhxoORoJ7oqJWFEXcoe4aef/3scViZavfhdIv07T/DIQKQC41EqHlSEy+4JTUSQL9VyKSAkmZccJC9kx5Mpc/WzXju/xIeU+z3qBNU94ZZGHLBsrodHFcCqHW6w+s4WhcpQJw4jQgbE1oGns6i0ohdDKOM1+4XC5zJaXejMlugaQrJo0iuWZyUyS3/Ck78bNPuoPPQwhK/DHtsn60vNicKmci4kP+5bphgWHzFpXfgwcW8cngMUKPp+u+2BeTbMui7UTLlM1Wj4l6wNSj+Weo83gDWkirJ693IE0AAAAASUVORK5CYII=\" alt=\"Add image url\" style=\"box-sizing: content-box; position: static; left: 93px; top: 29px;\" id=\"CLOGB3920559741\" data-clog-name=\"image-12\"><span style=\"box-sizing: content-box; position: static; left: 38px; top: 13px;\" id=\"CLOGB3920559742\" data-clog-name=\"span-13\"> <b id=\"CLOGB3920559743\" data-clog-name=\"none-b-1\">CLOG The Common Lisp Omnificent GUI</b></span><div id=\"CLOGB3920559744\" data-clog-name=\"Instructions\">
|
||||
<h2 id=\"CLOGB3920559745\" data-clog-name=\"none-h2-1-11\">Quick Start</h2>
|
||||
<h3 style=\"left: -75px; top: 298.5px;\" id=\"CLOGB3920559746\" data-clog-name=\"none-h3-2-11\">Placing Controls</h3>
|
||||
<b id=\"CLOGB3920559747\" data-clog-name=\"none-b-3-11\">Placing Controls</b> - Click a control from the control pallets in the top left panel. Click on your panel<br id=\"CLOGB3920559748\" data-clog-name=\"none-br-4-11\">
|
||||
<b id=\"CLOGB3920559749\" data-clog-name=\"none-b-5-11\">Static Placement</b> - Click a control from the control pallets in the top left panel. Click on your panel while holding down <ctrl/cmd><br id=\"CLOGB3920559750\" data-clog-name=\"none-br-6-11\">
|
||||
<b id=\"CLOGB3920559751\" data-clog-name=\"none-b-7-11\">Place as child control</b> - 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><br id=\"CLOGB3920559752\" data-clog-name=\"none-br-8-11\">
|
||||
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><br id=\"CLOGB3920559753\" data-clog-name=\"none-br-9-11\">
|
||||
<br id=\"CLOGB3920559754\" data-clog-name=\"none-br-10-11\">
|
||||
<h3 id=\"CLOGB3920559755\" data-clog-name=\"none-h3-11-11\">Existing Controls as Children</h3>
|
||||
<b id=\"CLOGB3920559756\" data-clog-name=\"none-b-12-11\">2 ways:</b><br id=\"CLOGB3920559757\" data-clog-name=\"none-br-13-11\">
|
||||
1. Click the parent control in your panel. Holding <shift> click the control to make a child.<br id=\"CLOGB3920559758\" data-clog-name=\"none-br-14-11\">
|
||||
2. Use the control list in the lower left to drag and drop holding the <shift> key<br id=\"CLOGB3920559759\" data-clog-name=\"none-br-15-11\">
|
||||
<br id=\"CLOGB3920559760\" data-clog-name=\"none-br-16-11\">
|
||||
<h3 id=\"CLOGB3920559761\" data-clog-name=\"none-h3-17-11\">Existing Controls as Static</h3>
|
||||
Use the positioning property in the property panel<br id=\"CLOGB3920559762\" data-clog-name=\"none-br-18-11\">
|
||||
<br id=\"CLOGB3920559763\" data-clog-name=\"none-br-19-11\">
|
||||
<h3 id=\"CLOGB3920559764\" data-clog-name=\"none-h3-20-11\">Access Children Controls</h3>
|
||||
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<br id=\"CLOGB3920559765\" data-clog-name=\"none-br-21-11\">
|
||||
<br id=\"CLOGB3920559766\" data-clog-name=\"none-br-22-11\">
|
||||
<h3 id=\"CLOGB3920559767\" data-clog-name=\"none-h3-23-11\">Change Creation/Tab Order</h3>
|
||||
Use the control list in lower left panel to drag and drop order<br id=\"CLOGB3920559768\" data-clog-name=\"none-br-24-11\">
|
||||
</div>"
|
||||
: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))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue