anchor.diff:  			 standard-extended-input-stream)
     () )
   
  -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  +;;;
  +;;; Utilities 
  +;;;
  +
   ;; Since, I hate to duplicate code for HBOX and VBOX, I define this
   ;; evil macro:
   
  
positive.code: (defun spacing-p (pane)
    (typep pane 'spacing-pane))
  
  (defmethod parse-contents ((pane spacing-pane) contents)
    (cond ((and (consp contents)
                (null (cdr contents))
                (panep (car contents)))
           (list (make-instance 'plain-content :pane (car contents))))
          (t
           (error "Bogus ~S option: ~S. A ~S needs exactly one child not more, not less."
                  :contents
                  'spacing-pane))))
  
  (defmethod initialize-instance :after ((spacing spacing-pane) &key thickness &allow-other-keys)
    (with-slots (user-width user-min-width user-max-width
                 user-height user-min-height user-max-height)
        spacing
      (setf user-width  (max (or thickness 0) (or user-width 0)))
      (setf user-height (max (or thickness 0) (or user-height 0)))
      ;; hmm
      ))
  
  (defmethod compose-space ((spacing spacing-pane))
    (with-slots (contents) spacing
      (compose-space (content-pane (first contents)))))
  
  (defmethod compose-space ((spacing spacing-pane))
    (with-slots (contents
                 user-width user-min-width user-max-width
                 user-height user-min-height user-max-height) spacing
      (let ((sr (compose-space (content-pane (first contents)))))
        (make-space-requirement
         :width           (+ (or user-width 0) (space-requirement-width sr))
         :height          (+ (or user-height 0) (space-requirement-height sr))
         :min-width       (min (+ (or user-width 0) (space-requirement-width sr))
                               (+ (space-requirement-min-width sr) (or user-min-width 0)))
         :min-height      (min (+ (or user-height 0) (space-requirement-height sr))
                               (+ (space-requirement-min-height sr) (or user-min-height 0)))
         :max-width       (max (+ (or user-width 0) (space-requirement-width sr))
                               (+ (space-requirement-max-width sr) (or user-max-width 0)))
         :max-height      (max (+ (or user-height 0) (space-requirement-height sr))
                               (+ (space-requirement-max-height sr) (or user-max-height 0))) ))))
  
  (defmethod allocate-space ((spacing spacing-pane) width height)
    (with-slots (contents user-width user-height) spacing
      (allocate-space (content-pane (first contents))
                      (- width user-width)
                      (- height user-height))
      (move-and-resize-sheet (content-pane (first contents))
                             (/ user-width 2) (/ user-height 2)
                             (- width user-width)
                             (- height user-height))))
  
  ;;; OUTLINED-PANE
  
  
negative.code:                  for x = 0 then (+ x w)
                   for w in cols
                   for j from 0
                   do (layout-child (aref array i j) (pane-align-x pane) (pane-align-y pane)
                                    x y w h))))))
  
  
  (defun table-pane-p (pane)
    (typep pane 'table-pane))
  
  (defmacro tabling ((&rest options &key (grid nil) &allow-other-keys) &body contents)
    (if grid
        `(make-pane 'grid-pane  ,@options :contents (list ,@contents))
        `(make-pane 'table-pane ,@options :contents (list ,@contents))))
  
  
  