mirror of
https://github.com/rabbibotton/clog.git
synced 2025-12-06 02:30:42 -08:00
Flesh out the DOM structure
This commit is contained in:
parent
d2e8e78e47
commit
5589cde897
11 changed files with 267 additions and 9 deletions
53
clog-window.lisp
Normal file
53
clog-window.lisp
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;;;; CLOG - The Common Lisp Omnificent GUI ;;;;
|
||||
;;;; (c) 2020-2021 David Botton ;;;;
|
||||
;;;; License BSD 3 Clause ;;;;
|
||||
;;;; ;;;;
|
||||
;;;; clog-window.lisp ;;;;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(cl:in-package :clog)
|
||||
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; Implementation - clog-window
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(defclass clog-window (clog-obj)()
|
||||
(:documentation "CLOG Window Objects encapsulate the window."))
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; make-clog-window ;;
|
||||
;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(defun make-clog-window (connection-id)
|
||||
"Construct a new clog-window. (Private)"
|
||||
(make-instance 'clog-window :connection-id connection-id :html-id "window"))
|
||||
|
||||
;;;;;;;;;;;;;;;;;
|
||||
;; window-name ;;
|
||||
;;;;;;;;;;;;;;;;;
|
||||
|
||||
(defgeneric window-name (clog-window)
|
||||
(:documentation "Get/Setf name for use by hyperlink \"target\" for this
|
||||
window."))
|
||||
|
||||
(defmethod window-name ((obj clog-window))
|
||||
(property obj "name"))
|
||||
|
||||
(defgeneric set-window-name (clog-window value))
|
||||
|
||||
(defmethod set-window-name ((obj clog-window) value)
|
||||
(setf (property obj "name") value))
|
||||
(defsetf window-name set-window-name)
|
||||
|
||||
;;;;;;;;;;;
|
||||
;; alert ;;
|
||||
;;;;;;;;;;;
|
||||
|
||||
(defgeneric alert (clog-window message)
|
||||
(:documentation "Launch an alert box. Note that as long as not dismissed
|
||||
events and messages may not be trasmitted on most browsers."))
|
||||
|
||||
(defmethod alert ((obj clog-window) message)
|
||||
(cc:alert-box (connection-id obj) message))
|
||||
Loading…
Add table
Add a link
Reference in a new issue