clog-panels are now base class of builder panels

This commit is contained in:
David Botton 2022-02-17 19:59:52 -05:00
parent 9b4ed6f74e
commit f916f268fb
3 changed files with 11 additions and 10 deletions

View file

@ -9,7 +9,7 @@
(cl:in-package :clog)
;;; clog-panels are for doing layouts, base class for pluggins and custom
;;; widgets.
;;; widgets and is the base class for CLOG Builder's panels.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Implementation - clog-panel
@ -34,10 +34,11 @@
CLOG-OBJ. Optionally you can set the :X, :Y, :WIDTH and :HEIGHT (in
:UNITS defulting to :px, if set to nil unit type must be provided for
x,y,width and height), BORDER-STYLE (see BORDER-STYLE-TYPE),
BORDER-WIDTH, BORDER-COLOR, :POSITIONING (default is :FIXED) (see
POSITIONING-TYPE), :OVERFLOW (default is :CLIP) with :CONTENT (default
\"\") and :RESIZABLE defaults to :NONE. Additional css styles can be
set in :STYLE (default \"\") if :AUTO-PLACE (default t)
BORDER-WIDTH, BORDER-COLOR, :POSITIONING (default is :FIXED the
default builder panels are :STATIC) (see POSITIONING-TYPE),
:OVERFLOW (default is :CLIP) with :CONTENT (default \"\") and
:RESIZABLE defaults to :NONE. Additional css styles can be set in
:STYLE (default \"\") if :AUTO-PLACE (default t)
place-inside-bottom-of CLOG-OBJ. If hidden is true visiblep is set to
nil. Resizable only works if overflow is set to :SCROLL"))

View file

@ -573,7 +573,7 @@ not a temporary attached one when using select-control."
(get-control-list app panel-id))
(let ((result (format nil
"\(in-package \"~A\"\)
\(defclass ~A \(clog:clog-div\)
\(defclass ~A \(clog:clog-panel\)
\(~{~A~}\)\)
\(defun create-~A \(clog-obj &key \(hidden nil\) \(class nil\) \(html-id nil\) \(auto-place t\)\)
\(let \(\(panel \(change-class \(clog:create-div clog-obj :content \"~A\"

View file

@ -1,12 +1,12 @@
(in-package "CLOG-TOOLS")
(defclass clog-templates (clog:clog-div)
(defclass clog-templates (clog:clog-panel)
( (fill-button :reader fill-button)
(template-box :reader template-box)
(win :accessor win)))
(defun create-clog-templates (clog-obj &key (hidden nil) (class nil) (html-id nil) (auto-place t))
(let ((panel (change-class (clog:create-div clog-obj :content "<form action=\"#\" onsubmit=\"return false;\" target=\"_self\" style=\"box-sizing: content-box; position: static; left: 162px; top: 216px;\" id=\"CLOGB3853161210\"><label for=\"\" style=\"box-sizing: content-box; position: absolute; left: 7px; top: 6px; text-align: start; cursor: default; font: bold 15px / 22.5px Verdana, sans-serif&nbsp;; bottom: 211.5px;\" id=\"CLOGB3853161211\">Available Templates:</label><div style=\"box-sizing: content-box; position: absolute; inset: 35px 7px 45px;\" id=\"CLOGB3853161212\"><select size=\"4\" style=\"box-sizing: content-box; position: static; inset: 40px 5px 5px; width: 100%; height: 100%;\" id=\"CLOGB3853161213\"></select></div><button class=\"\" style=\"box-sizing: content-box; position: absolute; left: 7px; bottom: 5px;\" id=\"CLOGB3853161214\">Fill Template</button></form>"
(let ((panel (change-class (clog:create-div clog-obj :content "<form action=\"#\" onsubmit=\"return false;\" target=\"_self\" style=\"box-sizing: content-box; position: static; left: 162px; top: 216px;\" id=\"CLOGB3854134560\"><label for=\"\" style=\"box-sizing: content-box; position: absolute; left: 7px; top: 6px; text-align: start; cursor: default; font: bold 15px / 22.5px Verdana, sans-serif&nbsp;; bottom: 211.5px;\" id=\"CLOGB3854134561\">Available Templates:</label><div style=\"box-sizing: content-box; position: absolute; inset: 35px 7px 45px;\" id=\"CLOGB3854134562\"><select size=\"4\" style=\"box-sizing: content-box; position: static; inset: 40px 5px 5px; width: 100%; height: 100%;\" id=\"CLOGB3854134563\"></select></div><button class=\"\" style=\"box-sizing: content-box; position: absolute; left: 7px; bottom: 5px;\" id=\"CLOGB3854134564\">Fill Template</button></form>"
:hidden hidden :class class :html-id html-id :auto-place auto-place) 'clog-templates)))
(setf (slot-value panel 'fill-button) (attach-as-child clog-obj "CLOGB3853161214" :clog-type 'CLOG:CLOG-BUTTON :new-id t))
(setf (slot-value panel 'template-box) (attach-as-child clog-obj "CLOGB3853161213" :clog-type 'CLOG:CLOG-SELECT :new-id t))
(setf (slot-value panel 'fill-button) (attach-as-child clog-obj "CLOGB3854134564" :clog-type 'CLOG:CLOG-BUTTON :new-id t))
(setf (slot-value panel 'template-box) (attach-as-child clog-obj "CLOGB3854134563" :clog-type 'CLOG:CLOG-SELECT :new-id t))
(set-on-click (fill-button panel) (lambda (target) (declare (ignorable target)) (fill-button-clicked panel)))
panel))