18 lines
595 B
Common Lisp
18 lines
595 B
Common Lisp
;;;; cl-scopes/frontend - generic (browser-oriented) frontend definitions.
|
|
|
|
(defpackage :scopes/frontend
|
|
(:use :common-lisp)
|
|
(:export #:form
|
|
#:field #:attrs #:field-type #:label #:name
|
|
#:control))
|
|
|
|
(in-package :scopes/frontend)
|
|
|
|
(defclass field ()
|
|
((name :reader name :initarg :name)
|
|
(label :reader label :initarg :label)
|
|
(field-type :reader field-type :initarg :type :initform :text)
|
|
(attrs :reader attrs :initarg :attrs :initform nil)))
|
|
|
|
(defun field (name label &key type attrs)
|
|
(make-instance 'field :name name :label label :type type :attrs attrs))
|