Commit d21b35bf authored by Dave Cooper's avatar Dave Cooper

updating tutorial manual

parent 4e5ed329
......@@ -29,6 +29,7 @@
(defparameter *index-hash* nil)
(defparameter *debug-index* nil)
(define-lens (html-format assembly) ()
:output-functions
......@@ -53,15 +54,21 @@
(:html (:head (:title (str (the title)))
((:link :href (the style-url) :rel "stylesheet" :type "text/css")))
(let ((*index-hash* (make-hash-table :test #'equalp)))
(:body (:div (write-the cl-who-contents-out))
(:div (write-the cl-who-base))
(:div (write-the cl-who-index)))))))
(htm
(:body (:div (write-the cl-who-contents-out))
(:div (write-the cl-who-base))
(:div (write-the cl-who-index))))))))
(cl-who-index
()
;; FLAG -- fill in! If you access *index-hash* from here, it will
;; be the dynamically bound one.
)
(with-cl-who ()
(:p (:h2 "Index"))
(let* ((index-plist (list-hash *index-hash*))
(keys (sort (plist-keys index-plist) #'string-lessp)))
(htm (:ul
(dolist (key keys)
(dolist (target (gethash key *index-hash*))
(htm (:li ((:a :href (format nil "#~a" target)) (str key)))))))))))
(cl-who-base
()
......@@ -180,10 +187,18 @@
(write-the-object element cl-who-base)))))
(:quote (print-variables (the markup-tag) (the elements))
(htm (:blockquote (dolist (element (list-elements (the elements)))
(:quote (htm (:blockquote (dolist (element (list-elements (the elements)))
(write-the-object element cl-who-base)))))
(:index (dolist (element (list-elements (the elements)))
(let* ((data (the-object element data))
(anchor-tag (string (gensym)))
(current (gethash data *index-hash*)))
(if current (pushnew anchor-tag current)
(setf (gethash data *index-hash*) (list anchor-tag)))
(htm ((:a :name anchor-tag))
(write-the-object element cl-who-base)))))
(otherwise (when *warn-on-unrecognized-tags?*
(warn "Markup tag ~s was not recognized~%" (the markup-tag))))
......
......@@ -315,28 +315,7 @@ loaderImg: '/static/gwl/tasty-unpix/loader.gif',loaderText: 'Narrowing Down...'}
()
(mapcar #'(lambda(child)
(the-object child dom-subsections))
(the children))
#+nil
(html (:html
(:head
(the default-header-content)
(:title "The " (:princ (the strings-for-display-verbose)) " Package"))
(:body
(when *developing?* (html (:p (the (write-development-links)))))
(:p (the (:write-back-link :display-string "Documentation Home")))
(:p
(:center (:h2 (:princ (the :title)))
(when (package-nicknames (the :package-key))
(html (:i
(format *html-stream* "a.k.a. ~{~:(~a~)~^, ~}"
(package-nicknames (the :package-key)))))))
(mapc #'(lambda (child)
(the-object child (:write-documentation-links)))
(the :children)))
(:p (the (:write-back-link :display-string "Documentation Home")))
(:p (the :write-footer))))))
(the children)))
("Void. Prints to *html-stream* a bulleted list for each of the three categories of docs in the package."
......
......@@ -281,7 +281,7 @@ If you specify :part-symbol-supplied, do not specify :instance-supplied."))
(with-input-from-string (ss (the example-code))
(let ((*package* (find-package (second (read ss)))))
(intern (symbol-name (second (read ss))) *package*)))
'null-part))
'null-part))
(vrml-view :type (if (the show-vrml?) 'web-drawing 'null-part)
;;:view-default (getf (the instance %renderer-info%) :view-default :trimetric)
......
......@@ -66,7 +66,11 @@
:computed-slots
((strings-for-display (format nil "~a" (the symbol)))
(doc-string (glisp:function-documentation (the symbol)))
(macro? (macro-function (the symbol))))
(macro? (macro-function (the symbol)))
(dom-body (progn (print-variables (the root-path)) `((:p ,(format nil "~a" (the section-plist))))))
)
:functions
((write-html-sheet
......
......@@ -111,9 +111,9 @@
))))
(defun check-functions (name form &optional (methods t))
":functions|:methods grammar:
"Void. Checks :functions or :methods grammar according to following BNF:
<form> = :functions|:methods (<token>*)
<form> = :functions | :methods (<token>*)
<token> = (<string>* <symbol> <behavior>+ <list> <body>)
<behavior> = :cached | :cached-eql | :cached-= | :cached-eq | :cached-equal | :cached-equalp"
......@@ -130,14 +130,11 @@
(and (symbolp (first token))
(or (listp (second token))
(and (member (second token) behavior)
(listp (third token))))
)))))
(check-form name form #'valid-token grammar)
))))
(listp (third token)))))))))
(check-form name form #'valid-token grammar)))))
(defun check-trickle-down-slots (name form)
":functions|:methods grammar:
":functions | :methods grammar:
<form> = :trickle-down-slots (<symbol>*)
"
......
......@@ -4542,46 +4542,6 @@ sequence.
\section{crypt }
\label{sec:crypt}
\section{ent Nicknames: Ent}
\label{sec:entnicknames:ent}
\subsection{Function and Macro Definitions}
\label{subsec:functionandmacrodefinitions}
\begin{itemize}
\item \index{code-str}
\label{prim:code-str}
\textbf{code-str}
\end{itemize}
\section{enterprise }
\label{sec:enterprise}
......@@ -5106,6 +5066,16 @@ toplevel of the define-object form.
\item [Safe-children]
\index{Safe-children
[vanilla-mixin*]}\emph{List of GDL Instances}
All objects from the :objects specification, including elements of sequences
as flat lists. Any children which throw errors come back as a plist with error information
\item [Strings-for-display]
\index{Strings-for-display
[vanilla-mixin*]}\emph{String or List of Strings}
......@@ -5302,16 +5272,6 @@ the \texttt{follow-root-path} GDL function to return the actual instance.
\item [Safe-children]
\index{Safe-children
[vanilla-mixin*]}\emph{List of GDL Instances}
All objects from the :objects specification, including elements of sequences
as flat lists. Any children which throw errors come back as a plist with error information
\item [Safe-hidden-children]
\index{Safe-hidden-children
[vanilla-mixin*]}\emph{List of GDL Instances}
......@@ -7833,7 +7793,7 @@ makes sense for viewing it.
:objects
((drawing :type 'two-viewed-drawing
:objects (list (the box) (the length-dim)))
:objects-to-draw (list (the box) (the length-dim)))
(length-dim :type 'horizontal-dimension
:hidden? t
......@@ -7846,7 +7806,7 @@ makes sense for viewing it.
(define-object two-viewed-drawing (base-drawing)
:input-slots (objects)
:input-slots (objects-to-draw)
:objects
......@@ -7855,12 +7815,12 @@ makes sense for viewing it.
:length (half (the length))
:center (translate (the center)
:rear (half (the-child length)))
:objects (the objects))
:objects (the objects-to-draw))
(top-view :type 'base-view
:projection-vector (getf *standard-views* :top)
:length (* 0.30 (the length))
:objects (the objects))))
:objects (the objects-to-draw))))
(generate-sample-drawing :objects
(the-object (make-object 'box-with-two-viewed-drawing) drawing top-view))
......
......@@ -123,7 +123,7 @@ makes sense for viewing it."
:objects
((drawing :type 'two-viewed-drawing
:objects (list (the box) (the length-dim)))
:objects-to-draw (list (the box) (the length-dim)))
(length-dim :type 'horizontal-dimension
:hidden? t
......@@ -136,7 +136,7 @@ makes sense for viewing it."
(define-object two-viewed-drawing (base-drawing)
:input-slots (objects)
:input-slots (objects-to-draw)
:objects
......@@ -145,12 +145,12 @@ makes sense for viewing it."
:length (half (the length))
:center (translate (the center)
:rear (half (the-child length)))
:objects (the objects))
:objects (the objects-to-draw))
(top-view :type 'base-view
:projection-vector (getf *standard-views* :top)
:length (* 0.30 (the length))
:objects (the objects))))
:objects (the objects-to-draw))))
(generate-sample-drawing :objects
(the-object (make-object 'box-with-two-viewed-drawing) drawing top-view))
......
......@@ -548,7 +548,7 @@ if given, must be orthogonal to the first two.
(defun unitize-vector (vector &key (epsilon *zero-epsilon*))
"Unit Vector. Returns the normalized unit-length vector corresponding to <b>vector</b>.
:arguments (vector \"3D Vector\"
:arguments (vector \"3D Vector\")
:&key ((espsilon *zero-epsilon*) \"Number. How close vector should be to 1.0 to be considered unit-length.\")"
(when (and *zero-vector-checking?* (zero-vector? vector))
......
......@@ -68,8 +68,6 @@
(coerce (lookup-color (or color (format-slot foreground-color))) 'list)))
(fill-color-decimal (coerce (lookup-color (getf (the display-controls) :fill-color)) 'list)))
(print-variables color color-decimal)
(apply #'pdf:set-rgb-stroke color-decimal)
(apply #'pdf:set-rgb-fill (or fill-color-decimal color-decimal))))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment