Update file headings and names

This commit is contained in:
David Botton 2024-03-17 22:08:41 -04:00
parent 22d0fba55e
commit 6da8638712
54 changed files with 235 additions and 231 deletions

View file

@ -1,3 +1,12 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;; CLOG - The Common Lisp Omnificent GUI ;;;;
;;;; (c) David Botton ;;;;
;;;; ;;;;
;;;; asdf-ext.lisp ;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Extension to asdf to handle clog panel files
(in-package :asdf)
(defclass clog-file (asdf:doc-file) ((type :initform "clog")))

View file

@ -1,7 +1,6 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;; CLOG - The Common Lisp Omnificent GUI ;;;;
;;;; (c) 2020-2022 David Botton ;;;;
;;;; License BSD 3 Clause ;;;;
;;;; (c) David Botton ;;;;
;;;; ;;;;
;;;; clog-auth.lisp ;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

View file

@ -1,7 +1,6 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;; CLOG - The Common Lisp Omnificent GUI ;;;;
;;;; (c) 2020-2022 David Botton ;;;;
;;;; License BSD 3 Clause ;;;;
;;;; (c) David Botton ;;;;
;;;; ;;;;
;;;; clog-base.lisp ;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@ -54,7 +53,7 @@ lisp and an HTML DOM element."))
;;;;;;;;;;;;;
(defgeneric html-id (clog-obj)
(:documentation "Internal html-id of CLOG-Obj. (Internal)"))
(:documentation "Internal html-id of clog-obj. (Internal)"))
;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; connection-data-mutex ;;
@ -76,7 +75,7 @@ lisp and an HTML DOM element."))
;;;;;;;;;;;;;;;
(defgeneric script-id (clog-obj)
(:documentation "Return the script id for OBJ based on the html-id set
(:documentation "Return the script id for CLOG-OBJ based on the html-id set
during attachment. (Private)"))
(defmethod script-id ((obj clog-obj))
@ -99,8 +98,9 @@ during attachment. (Private)"))
;;;;;;;;;;;;;;;;
(defgeneric js-execute (clog-obj script)
(:documentation "Execure SCRIPT on browser. Result is
discarded, return CLOG-OBJ. (Internal)"))
(:documentation "Execute JavaScript SCRIPT on browser. CLOG-OBJ is used to
obtain the connection the script should run on. Result is discarded, return
CLOG-OBJ. (Internal)"))
(defmethod js-execute ((obj clog-obj) script)
(cached-execute (connection-id obj) script)
@ -111,7 +111,8 @@ discarded, return CLOG-OBJ. (Internal)"))
;;;;;;;;;;;;;;
(defgeneric js-query (clog-obj script &key default-answer)
(:documentation "Execure SCRIPT on browser and return result. (Internal)"))
(:documentation "Execute JavaScript SCRIPT on browser and return result.
CLOG-OBJ us used to obtain the connection the script should run on. (Internal)"))
(defmethod js-query ((obj clog-obj) script &key (default-answer nil))
(flush-connection-cache obj)
@ -134,7 +135,7 @@ flushed with FLUSH-CONNECTION-CACHE or a query is made."
;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defun flush-connection-cache (clog-obj)
"Flush connection cache if on."
"Flush connection cache if on CLOG-OBJ is located on."
(when *connection-cache*
(dolist (script (reverse *connection-cache*))
(unless (eq script :cache)
@ -146,8 +147,8 @@ flushed with FLUSH-CONNECTION-CACHE or a query is made."
;;;;;;;;;;;;;
(defgeneric execute (clog-obj method)
(:documentation "Execute the JavaScript METHOD on OBJ. Result is
discarded. see JQUERY-EXECUTE (Internal)"))
(:documentation "Execute the JavaScript METHOD on OBJ. Returns
CLOG-OBJ. see JQUERY-EXECUTE (Internal)"))
(defmethod execute ((obj clog-obj) method)
(js-execute obj (format nil "~A.~A" (script-id obj) method)))
@ -347,7 +348,7 @@ result or if time out DEFAULT-ANSWER. see JQUERY-QUERY (Internal)"))
post-eval
cancel-event
one-time)
(:documentation "Create the hook for incoming events. (Private)"))
(:documentation "Create the low-level hook for incoming events. (Private)"))
(defmethod set-event ((obj clog-obj) event handler
&key (call-back-script "")
@ -468,45 +469,19 @@ result or if time out DEFAULT-ANSWER. see JQUERY-QUERY (Internal)"))
(defgeneric connection-data (clog-obj)
(:documentation "Get connection-data that is associated with
clog-obj that will persist regardless of thread. The event hooks
are stored in this string based hash in the format of:
clog-obj's connection that will persist regardless of thread calling.
The event hooks are stored in this string based hash in the format of:
\"html-id:event-name\" => #'event-handler. clog-* keys are reserved
for internal use of clog. The key \"clog-body\" is set to the
clog-body of this connection and accessible with CONNECTION-BODY."))
for internal use of clog.
The following default keys are set:
\"clog-body\" clog-body of this connection, see CONNECTION-BODY
\"clog-path\" html path used, see CONNECTION-PATH
\"clog-sync\" sempaphore used for syncing events, see CONNECTION-SYNC"))
(defmethod connection-data ((obj clog-obj))
(clog-connection:get-connection-data (connection-id obj)))
;;;;;;;;;;;;;;;;;;;;;
;; connection-body ;;
;;;;;;;;;;;;;;;;;;;;;
(defgeneric connection-body (clog-obj)
(:documentation "Get connection's clog-body."))
(defmethod connection-body (clog-obj)
(connection-data-item clog-obj "clog-body"))
;;;;;;;;;;;;;;;;;;;;;
;; connection-sync ;;
;;;;;;;;;;;;;;;;;;;;;
(defgeneric connection-sync (clog-obj)
(:documentation "Get connection's clog-sync for optional syncing events."))
(defmethod connection-sync (clog-obj)
(connection-data-item clog-obj "clog-sync"))
;;;;;;;;;;;;;;;;;;;;;
;; with-sync-event ;;
;;;;;;;;;;;;;;;;;;;;;
(defmacro with-sync-event ((clog-obj) &body body)
"Place at start of event to serialize access to the event. All events in
an application share per connection the same queue of serialized events."
`(bordeaux-threads:with-lock-held (,`(connection-sync ,clog-obj))
,@body))
;;;;;;;;;;;;;;;;;;;;;;;;;;
;; connection-data-item ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;
@ -527,6 +502,10 @@ an application share per connection the same queue of serialized events."
(setf (gethash item-name (connection-data obj)) value)))
value)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; remove-connection-data-item ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defgeneric remove-connection-data-item (clog-obj item-name)
(:documentation "Remove item-name from connection-data."))
@ -535,6 +514,46 @@ an application share per connection the same queue of serialized events."
(ignore-errors
(remhash item-name (connection-data obj)))))
;;;;;;;;;;;;;;;;;;;;;
;; connection-body ;;
;;;;;;;;;;;;;;;;;;;;;
(defgeneric connection-body (clog-obj)
(:documentation "Get connection's clog-body."))
(defmethod connection-body (clog-obj)
(connection-data-item clog-obj "clog-body"))
;;;;;;;;;;;;;;;;;;;;;
;; connection-path ;;
;;;;;;;;;;;;;;;;;;;;;
(defgeneric connection-path (clog-obj)
(:documentation "Get the HTML passed used to make the connection."))
(defmethod connection-path (clog-obj)
(connection-data-item clog-obj "clog-path"))
;;;;;;;;;;;;;;;;;;;;;
;; connection-sync ;;
;;;;;;;;;;;;;;;;;;;;;
(defgeneric connection-sync (clog-obj)
(:documentation "Get connection's clog-sync for optional syncing events."))
(defmethod connection-sync (clog-obj)
(connection-data-item clog-obj "clog-sync"))
;;;;;;;;;;;;;;;;;;;;;
;; with-sync-event ;;
;;;;;;;;;;;;;;;;;;;;;
(defmacro with-sync-event ((clog-obj) &body body)
"Place at start of event to serialize access to the event. All events in
an application share per connection the same queue of serialized events."
`(bordeaux-threads:with-lock-held (,`(connection-sync ,clog-obj))
,@body))
;;;;;;;;;;;;;;;;;;
;; set-on-event ;;
;;;;;;;;;;;;;;;;;;
@ -556,7 +575,6 @@ nil unbind all event handlers. (Internal)"))
:cancel-event cancel-event
:one-time one-time))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; set-on-event-with-data ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;

View file

@ -1,7 +1,6 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;; CLOG - The Common Lisp Omnificent GUI ;;;;
;;;; (c) 2020-2022 David Botton ;;;;
;;;; License BSD 3 Clause ;;;;
;;;; (c) David Botton ;;;;
;;;; ;;;;
;;;; clog-window.lisp ;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

View file

@ -1,13 +1,14 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;; CLOG - The Common Lisp Omnificent GUI ;;;;
;;;; (c) 2020-2021 David Botton ;;;;
;;;; License BSD 3 Clause ;;;;
;;;; (c) David Botton ;;;;
;;;; ;;;;
;;;; clog-canvas.lisp ;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(cl:in-package :clog)
;;; Canvas and 2d Context, for 3d WebGL2 context see clog-webgl.lisp
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Implementation - clog-canvas
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

View file

@ -1,11 +1,12 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;; CLOG - The Common Lisp Omnificent GUI ;;;;
;;;; (c) 2020-2024 David Botton ;;;;
;;;; License BSD 3 Clause ;;;;
;;;; (c) David Botton ;;;;
;;;; ;;;;
;;;; clog-connection-websockets.lisp ;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Specific implementation using websockets and long polling
(in-package :clog-connection)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

View file

@ -1,14 +1,14 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;; CLOG - The Common Lisp Omnificent GUI ;;;;
;;;; (c) 2020-2022 David Botton ;;;;
;;;; License BSD 3 Clause ;;;;
;;;; (c) David Botton ;;;;
;;;; ;;;;
;;;; clog-data.lisp ;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(cl:in-package :clog)
;;; Various functions for binding data
;;; Various functions for binding data between lisp objects and panels,
;;; particularly useful for database binding
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Implementation - data load and write from objects

View file

@ -1,7 +1,6 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;; CLOG - The Common Lisp Omnificent GUI ;;;;
;;;; (c) 2020-2022 David Botton ;;;;
;;;; License BSD 3 Clause ;;;;
;;;; (c) David Botton ;;;;
;;;; ;;;;
;;;; clog-dbi.lisp ;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

View file

@ -1,7 +1,6 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;; CLOG - The Common Lisp Omnificent GUI ;;;;
;;;; (c) 2020-2021 David Botton ;;;;
;;;; License BSD 3 Clause ;;;;
;;;; (c) David Botton ;;;;
;;;; ;;;;
;;;; clog-docs.lisp ;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

View file

@ -1,7 +1,6 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;; CLOG - The Common Lisp Omnificent GUI ;;;;
;;;; (c) 2020-2022 David Botton ;;;;
;;;; License BSD 3 Clause ;;;;
;;;; (c) David Botton ;;;;
;;;; ;;;;
;;;; clog-document.lisp ;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

View file

@ -1,13 +1,14 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;; CLOG - The Common Lisp Omnificent GUI ;;;;
;;;; (c) 2020-2022 David Botton ;;;;
;;;; License BSD 3 Clause ;;;;
;;;; (c) David Botton ;;;;
;;;; ;;;;
;;;; clog-element-commont.lisp ;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(cl:in-package :clog)
;; Common HTML Elements
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Implementation - clog-a
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

View file

@ -1,14 +1,13 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;; CLOG - The Common Lisp Omnificent GUI ;;;;
;;;; (c) 2020-2022 David Botton ;;;;
;;;; License BSD 3 Clause ;;;;
;;;; (c) David Botton ;;;;
;;;; ;;;;
;;;; clog-element.lisp ;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(cl:in-package :clog)
;;; clog-elements represent the base object for visual html elements.
;;; clog-elements represent the base object for html elements.
(defvar *store-new-objects* nil
"Dynamic variable that when true every create-* or attach-* will also
@ -40,11 +39,11 @@ element objects."))
(defun create-with-html (connection-id html
&key (clog-type 'clog-element) (html-id nil))
"Create a new clog-element and attach it to HTML on
"Low-level create a new CLOG-ELEMENT and attach it to HTML element on
CONNECTION-ID. There must be a single outer block that will be set to
an internal id. The returned CLOG-Element requires placement or will
an internal id. The returned CLOG-ELEMENT requires placement or will
not be visible, ie. place-after, etc. as it exists in the javascript
clog array but is not in the DOM. If HTML-ID is nil one is generated.
clog array but is not in the DOM. If HTML-ID is nil, one is generated.
(private)"
(let ((web-id (if html-id
html-id
@ -60,7 +59,7 @@ clog array but is not in the DOM. If HTML-ID is nil one is generated.
;;;;;;;;;;;;
(defun attach (connection-id html-id)
"Create a new clog-obj and attach an existing element with HTML-ID on
"Create a new CLOG-OBJ and attach an existing element with HTML-ID on
CONNECTION-ID to it and then return it. The HTML-ID must be unique. (private)"
(cached-execute connection-id
(format nil "clog['~A']=$('#~A').get(0)" html-id html-id))
@ -112,7 +111,7 @@ possible tag and keywords."))
;;;;;;;;;;;;;;;;;;
(defgeneric create-child (clog-obj html &key html-id auto-place clog-type)
(:documentation "Create a new CLOG-Element or sub-type of CLOG-TYPE from HTML
(:documentation "Create a new CLOG-ELEMENT or sub-type of CLOG-TYPE from HTML
as child of CLOG-OBJ and if :AUTO-PLACE (default t) place-inside-bottom-of
CLOG-OBJ. If HTML-ID is nil one will be generated."))
@ -298,7 +297,6 @@ after attachment is changed to one unique to this session."))
(jquery-execute obj (format nil "append(document.createTextNode('~A'))" (escape-string text)))
text)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Properties - clog-element
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

View file

@ -1,7 +1,6 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;; CLOG - The Common Lisp Omnificent GUI ;;;;
;;;; (c) 2020-2022 David Botton ;;;;
;;;; License BSD 3 Clause ;;;;
;;;; (c) David Botton ;;;;
;;;; ;;;;
;;;; clog-form.lisp ;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

View file

@ -1,7 +1,6 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;; CLOG - The Common Lisp Omnificent GUI ;;;;
;;;; (c) 2020-2022 David Botton ;;;;
;;;; License BSD 3 Clause ;;;;
;;;; (c) David Botton ;;;;
;;;; ;;;;
;;;; clog-gui.lisp ;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@ -11,7 +10,7 @@
;;; does not require additional components outside of the css file. In addition
;;; clog-gui uses jQueryUI and its default css file to provide client side
;;; movement when needed, if client side movement is not used it is possible
;;; to pass nil to the initilization function for both.
;;; to pass nil to the initilization function for both the js and css.
(mgl-pax:define-package :clog-gui
(:documentation "CLOG-GUI a desktop GUI abstraction for CLOG")

View file

@ -1,7 +1,6 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;; CLOG - The Common Lisp Omnificent GUI ;;;;
;;;; (c) 2020-2022 David Botton ;;;;
;;;; License BSD 3 Clause ;;;;
;;;; (c) David Botton ;;;;
;;;; ;;;;
;;;; clog-helpers.lisp ;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

View file

@ -1,7 +1,6 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;; CLOG - The Common Lisp Omnificent GUI ;;;;
;;;; (c) 2020-2022 David Botton ;;;;
;;;; License BSD 3 Clause ;;;;
;;;; (c) David Botton ;;;;
;;;; ;;;;
;;;; clog-jquery.lisp ;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@ -55,7 +54,7 @@ Some sample jquery selectors:
(defgeneric jquery-execute (clog-obj method)
(:documentation "Execute the jQuery METHOD on and CLOG-OBJ. Result is
dicarded, return CLOG-OBJ."))
dicarded, returns CLOG-OBJ."))
(defmethod jquery-execute ((obj clog-obj) method)
(js-execute obj (format nil "~A.~A" (jquery obj) method)))

View file

@ -1,7 +1,6 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;; CLOG - The Common Lisp Omnificent GUI ;;;;
;;;; (c) 2020-2022 David Botton ;;;;
;;;; License BSD 3 Clause ;;;;
;;;; (c) David Botton ;;;;
;;;; ;;;;
;;;; clog-location.lisp ;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

View file

@ -1,7 +1,6 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;; CLOG - The Common Lisp Omnificent GUI ;;;;
;;;; (c) 2020-2022 David Botton ;;;;
;;;; License BSD 3 Clause ;;;;
;;;; (c) David Botton ;;;;
;;;; ;;;;
;;;; clog-mulitmedia.lisp ;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

View file

@ -1,7 +1,6 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;; CLOG - The Common Lisp Omnificent GUI ;;;;
;;;; (c) 2020-2022 David Botton ;;;;
;;;; License BSD 3 Clause ;;;;
;;;; (c) David Botton ;;;;
;;;; ;;;;
;;;; clog-navigator.lisp ;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

View file

@ -1,15 +1,15 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;; CLOG - The Common Lisp Omnificent GUI ;;;;
;;;; (c) 2020-2022 David Botton ;;;;
;;;; License BSD 3 Clause ;;;;
;;;; (c) David Botton ;;;;
;;;; ;;;;
;;;; clog-panel.lisp ;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(cl:in-package :clog)
;;; clog-panels are for doing layouts, base class for pluggins and custom
;;; CLOG-PANELs are for doing layouts, base class for pluggins and custom
;;; widgets and is the base class for CLOG Builder's panels.
;;; CLOG-PANEL-BOXes are to layout a classic 5 panel layout in a panel
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Implementation - clog-panel

View file

@ -1,7 +1,6 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;; CLOG - The Common Lisp Omnificent GUI ;;;;
;;;; (c) 2020-2022 David Botton ;;;;
;;;; License BSD 3 Clause ;;;;
;;;; (c) David Botton ;;;;
;;;; ;;;;
;;;; clog-presentations.lisp ;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@ -9,9 +8,10 @@
(cl:in-package :clog)
;;; clog-presentations - link Lisp objects and CLOG objects
;;; see also clog-data.lisp
;;;
;;; set-event is the event to be fired, it must be a one parameter event time
;;; like on-focus, on-click, etc.
;;; set-event is the event to be fired, it must be a CLOG set-on-* event
;;; one parameter event with no data like on-focus, on-click, etc.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Implementation - clog-presentations

View file

@ -1,13 +1,14 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;; CLOG - The Common Lisp Omnificent GUI ;;;;
;;;; (c) 2020-2022 David Botton ;;;;
;;;; License BSD 3 Clause ;;;;
;;;; (c) David Botton ;;;;
;;;; ;;;;
;;;; clog-style.lisp ;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(cl:in-package :clog)
;;; CSS style blocks, see clog-document.lisp for load-css
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Implementation - clog-style-block
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

View file

@ -1,7 +1,6 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;; CLOG - The Common Lisp Omnificent GUI ;;;;
;;;; (c) 2020-2022 David Botton ;;;;
;;;; License BSD 3 Clause ;;;;
;;;; (c) David Botton ;;;;
;;;; ;;;;
;;;; clog-system.lisp ;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

View file

@ -1,11 +1,12 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;; CLOG - The Common Lisp Omnificent GUI ;;;;
;;;; (c) 2020-2022 David Botton ;;;;
;;;; License BSD 3 Clause ;;;;
;;;; (c) David Botton ;;;;
;;;; ;;;;
;;;; clog-utilities.lisp ;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Utilites for use with the CLOG framework
(cl:in-package :clog)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@ -53,36 +54,6 @@ package."
(declare (ignore ,@(set-difference (mapcar #'first let-bindings) used-bindings)))
,@body)))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Implementation - clog-group
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defclass clog-group ()
((controls
:accessor controls
:initform (make-hash-table* :test 'equalp))))
(defun create-group ()
"Return a new CLOG-GROUP object for storing CLOG-OBJs. They are indexed by
their HTML-ID or an arbitrary NAME."
(make-instance 'clog-group))
(defgeneric add (clog-group clog-obj &key name)
(:documentation "Add CLOG-OBJ to a CLOG-GROUP indexed by the html-id of
CLOG-OBJ unless :NAME is set and is used instead."))
(defmethod add ((group clog-group) clog-obj &key (name nil))
(let ((id (if name
name
(html-id clog-obj))))
(setf (gethash id (controls group)) clog-obj)))
(defgeneric obj (clog-group name)
(:documentation "Retrieve from CLOG-GROUP the CLOG-OBJ with name"))
(defmethod obj ((group clog-group) name)
(gethash name (controls group)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Implementation - JS Utilities
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

View file

@ -1,12 +1,11 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;; CLOG - The Common Lisp Omnificent GUI ;;;;
;;;; (c) 2020-2022 David Botton ;;;;
;;;; License BSD 3 Clause ;;;;
;;;; (c) David Botton ;;;;
;;;; ;;;;
;;;; clog-web-dbi.lisp ;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Database components for use with clog-web-website
;; Database components for use with clog-web websites
(mgl-pax:define-package :clog-web-dbi
(:documentation "CLOG-WEB-DBI - dbi based website helpers")

View file

@ -1,12 +1,11 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;; CLOG - The Common Lisp Omnificent GUI ;;;;
;;;; (c) 2020-2022 David Botton ;;;;
;;;; License BSD 3 Clause ;;;;
;;;; (c) David Botton ;;;;
;;;; ;;;;
;;;; clog-web-themes.lisp ;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Built in clog-web-site themese
;; Built in clog-web-site themes
(cl:in-package :clog-web)

View file

@ -1,7 +1,6 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;; CLOG - The Common Lisp Omnificent GUI ;;;;
;;;; (c) 2020-2022 David Botton ;;;;
;;;; License BSD 3 Clause ;;;;
;;;; (c) David Botton ;;;;
;;;; ;;;;
;;;; clog-web.lisp ;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

View file

@ -1,7 +1,6 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;; CLOG - The Common Lisp Omnificent GUI ;;;;
;;;; (c) 2020-2024 David Botton ;;;;
;;;; License BSD 3 Clause ;;;;
;;;; (c) David Botton ;;;;
;;;; ;;;;
;;;; clog-webgl.lisp ;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@ -15,7 +14,6 @@
;; Use clog-canvas to create the html element and then use
;; clog-webgl:create-webgl to obtain the WebGL2 context
(defsection @clog-webgl (:title "CLOG WebGL Objects")
"CLOG-WebGL - Class for CLOG WebGL objects"
(clog-webgl class)

View file

@ -1,65 +1,14 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;; CLOG - The Common Lisp Omnificent GUI ;;;;
;;;; (c) 2020-2022 David Botton ;;;;
;;;; License BSD 3 Clause ;;;;
;;;; (c) David Botton ;;;;
;;;; ;;;;
;;;; clog-window.lisp ;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(cl:in-package :clog)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Implementation - clog popup windows
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defparameter *clog-popup-sync-hash* (make-hash-table :test 'equalp)
"Used for syncing clog popup window creation with the thread creating
them.")
(defparameter *clog-popup-path* "/clogwin"
"Default URL for popup windows")
(defun clog-popup-handler (body)
"Handle the connection of a new popup clog window (internal)"
(let ((sync (form-data-item (form-get-data body) "sync")))
(cond (sync
(clog-popup-openned body sync))
(t
(create-div body :content "Invalid Access")))))
(defun enable-clog-popup (&key (path *clog-popup-path*))
"Enable handling of clog enabled popups"
(set-on-new-window 'clog-popup-handler :path path))
(defun open-clog-popup (obj &key (path *clog-popup-path*)
(add-sync-to-path t)
(sync-key (random-hex-string))
(name "_blank")
(specs "")
(wait-timeout 10))
"Open a new browser window/popup in most cases a tab. Since they are controlled
by clog you have full control of the new popups and are more flexible than using
open-windo. Returns the clog-body and the clog-window in the same connnection as
obj of the new window on the new connection or nil if failed within :WAIT-TIMEOUT"
(let* ((sem (bordeaux-threads:make-semaphore))
(mpath (if add-sync-to-path
(format nil "~A?sync=~A" path sync-key)
path))
(new-win (open-window (window (connection-body obj)) mpath :specs specs :name name)))
(setf (gethash sync-key *clog-popup-sync-hash*) sem)
(bordeaux-threads:wait-on-semaphore sem :timeout wait-timeout)
(setf sem (gethash sync-key *clog-popup-sync-hash*))
(if (typep sem 'clog-obj)
(values sem new-win)
nil)))
(defun clog-popup-openned (obj sync-key)
"Used to notify open-clog-popup the new popup window is ready for custom
clog-popup handlers."
(let ((sem (gethash sync-key *clog-popup-sync-hash*)))
(when sem
(setf (gethash sync-key *clog-popup-sync-hash*) (connection-body obj))
(bordeaux-threads:signal-semaphore sem))))
;; clog-window and clop-popup a clog based system to support child windows
;; even without browser support or premissions.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Implementation - clog-window
@ -661,3 +610,56 @@ STORAGE-TYPE. (local = persistant or session)"))
(escape-string key-name)
(escape-string value)))
value)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Implementation - clog popup windows
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defparameter *clog-popup-sync-hash* (make-hash-table :test 'equalp)
"Used for syncing clog popup window creation with the thread creating
them.")
(defparameter *clog-popup-path* "/clogwin"
"Default URL for popup windows")
(defun clog-popup-handler (body)
"Handle the connection of a new popup clog window (internal)"
(let ((sync (form-data-item (form-get-data body) "sync")))
(cond (sync
(clog-popup-openned body sync))
(t
(create-div body :content "Invalid Access")))))
(defun enable-clog-popup (&key (path *clog-popup-path*))
"Enable handling of clog enabled popups"
(set-on-new-window 'clog-popup-handler :path path))
(defun open-clog-popup (obj &key (path *clog-popup-path*)
(add-sync-to-path t)
(sync-key (random-hex-string))
(name "_blank")
(specs "")
(wait-timeout 10))
"Open a new browser window/popup in most cases a tab. Since they are controlled
by clog you have full control of the new popups and are more flexible than using
open-windo. Returns the clog-body and the clog-window in the same connnection as
obj of the new window on the new connection or nil if failed within :WAIT-TIMEOUT"
(let* ((sem (bordeaux-threads:make-semaphore))
(mpath (if add-sync-to-path
(format nil "~A?sync=~A" path sync-key)
path))
(new-win (open-window (window (connection-body obj)) mpath :specs specs :name name)))
(setf (gethash sync-key *clog-popup-sync-hash*) sem)
(bordeaux-threads:wait-on-semaphore sem :timeout wait-timeout)
(setf sem (gethash sync-key *clog-popup-sync-hash*))
(if (typep sem 'clog-obj)
(values sem new-win)
nil)))
(defun clog-popup-openned (obj sync-key)
"Used to notify open-clog-popup the new popup window is ready for custom
clog-popup handlers."
(let ((sem (gethash sync-key *clog-popup-sync-hash*)))
(when sem
(setf (gethash sync-key *clog-popup-sync-hash*) (connection-body obj))
(bordeaux-threads:signal-semaphore sem))))

View file

@ -1,6 +1,6 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;; CLOG - The Common Lisp Omnificent GUI ;;;;
;;;; (c) 2020-2022 David Botton ;;;;
;;;; (c) 2020-2024 David Botton ;;;;
;;;; License BSD 3 Clause ;;;;
;;;; ;;;;
;;;; clog.lisp ;;;;
@ -15,7 +15,7 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(mgl-pax:define-package :clog
(:documentation "The Common List Omnificent GUI - CLOG")
(:documentation "CLOG - The Common List Omnificent GUI")
(:import-from :clog-connection
#:make-hash-table*
#:escape-string
@ -28,6 +28,7 @@
(defmethod exportable-reference-p ((package (eql (find-package :clog)))
symbol (locative-type (eql 'section))
locative-args)
"Extend mgl-pax extension for exporting CLOG"
t)
(defsection @clog-manual (:title "The CLOG manual")
@ -137,10 +138,11 @@ embedded in a native template application.)"
(*store-new-objects* variable)
(connection-data generic-function)
(connection-data-item generic-function)
(remove-connection-data-item generic-function)
(connection-body generic-function)
(connection-path generic-function)
(connection-sync generic-function)
(with-sync-event macro)
(remove-connection-data-item generic-function)
(validp generic-function)
(with-connection-cache macro)
(flush-connection-cache function)