mirror of
https://github.com/rabbibotton/clog.git
synced 2025-12-06 02:30:42 -08:00
Per window counting of controls
This commit is contained in:
parent
671686dc1e
commit
5ec9ac12a8
1 changed files with 9 additions and 3 deletions
|
|
@ -324,6 +324,7 @@
|
|||
(btn-prop (create-button tool-bar :content "Properties"))
|
||||
(btn-save (create-button tool-bar :content "Save"))
|
||||
(content (center-panel box))
|
||||
(next-id 0)
|
||||
(in-simulation nil)
|
||||
(panel-name (format nil "panel-~A" (clog-connection:generate-id)))
|
||||
(file-name ".")
|
||||
|
|
@ -360,6 +361,8 @@
|
|||
(setf (background-color tool-bar) :silver)
|
||||
(setf (attribute content "data-lisp-name") panel-name)
|
||||
(setf (window-title win) panel-name)
|
||||
(populate-control-list-win)
|
||||
(set-on-window-focus win (lambda (obj) (declare (ignore obj)) (populate-control-list-win)))
|
||||
(set-on-click btn-del (lambda (obj)
|
||||
(declare (ignore obj))
|
||||
(when (current-control app)
|
||||
|
|
@ -463,18 +466,20 @@
|
|||
(t nil)))
|
||||
(placer (when element
|
||||
(create-div obj))))
|
||||
(window-focus win)
|
||||
(unless element
|
||||
(when (current-placer app)
|
||||
(set-border (current-placer app) (unit "px" 0) :none :blue))
|
||||
(setf (current-control app) nil)
|
||||
(setf (current-placer app) nil)
|
||||
(on-populate-control-properties win))
|
||||
(on-populate-control-properties win)
|
||||
(populate-control-list-win))
|
||||
(when element
|
||||
(setf (current-control app) element)
|
||||
(push element control-list)
|
||||
(push placer placer-list)
|
||||
(setf (attribute element "data-lisp-name")
|
||||
(format nil "~A-~A" (getf control :name) (html-id element)))
|
||||
(format nil "~A-~A" (getf control :name) (incf next-id)))
|
||||
(setf (attribute element "data-clog-type") (getf control :name))
|
||||
(setf (box-sizing element) :content-box)
|
||||
(setf (box-sizing placer) :content-box)
|
||||
|
|
@ -485,7 +490,8 @@
|
|||
(setf (current-control app) element)
|
||||
(setf (current-placer app) placer)
|
||||
(set-border placer (unit "px" 2) :solid :blue)
|
||||
(on-populate-control-properties win))
|
||||
(on-populate-control-properties win)
|
||||
(window-focus win))
|
||||
:cancel-event t)
|
||||
(setf (selected-tool app) nil)
|
||||
(setf (positioning element) :absolute)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue