anchor.diff:                                             (- x2 bright) (+ y1 btop))
                                             :closed t)
                             (make-rectangle* (- tx m0) (- ty a) (+ tx tw m0) (+ ty d)))) ))))))
  +
  +(defmethod initialize-instance :after ((pane label-pane) &key contents &allow-other-keys)
  +  (when contents
  +    (sheet-adopt-child pane (first contents))))
   
   ;;; GENERIC FUNCTIONS
   
  
positive.code:                          ((:bottom) (+ y (- height child-height))))))
      ;; Actually layout the child
      (move-sheet child child-x child-y)
      (allocate-space child child-width child-height)))
  
  
  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  
  
  ;; All panes allow for user specified space requirement options, so we
  ;; define a mixin class to hold the corresponding slots:
  
  (defclass space-requirement-options-mixin ()
    (;; These slots correspond to the options given by the user.
     (user-width       :reader pane-user-width
                       :type   spacing-value)
     (user-min-width   :reader pane-user-min-width
                       :type   spacing-value)
     (user-max-width   :reader pane-user-max-width
                       :type   spacing-value)
     (user-height      :reader pane-user-height
                       :type   spacing-value)
     (user-min-height  :reader pane-user-min-height
                       :type   spacing-value)
     (user-max-height  :reader pane-user-max-height
                       :type   spacing-value)
     (x-spacing        :reader pane-x-spacing
                       :initarg :x-spacing
                       :type spacing-value)
     (y-spacing        :reader pane-y-spacing
                       :initarg :y-spacing
                       :type spacing-value)))
  
  ;; The exact behaviour though is different:
  
  (defclass standard-space-requirement-options-mixin (space-requirement-options-mixin) ())
  (defclass border-space-requirement-options-mixin   (space-requirement-options-mixin) ())
  
  ;;
  
  (defmethod grok-user-space-requirement-options ((pane space-requirement-options-mixin)
                                                  &key width max-width min-width
                                                       height max-height min-height
                                                       x-spacing y-spacing spacing
                                                  &allow-other-keys)
    (setf (slot-value pane 'x-spacing)       (spacing-value-to-device-units
                                              pane (or x-spacing spacing 
                                                       (and (slot-boundp pane 'x-spacing)
                                                            (slot-value pane 'x-spacing))
                                                       0))
          (slot-value pane 'y-spacing)       (spacing-value-to-device-units
                                              pane (or y-spacing spacing
                                                       (and (slot-boundp pane 'y-spacing)
                                                            (slot-value pane 'y-spacing))
                                                       0))
          (slot-value pane 'user-width)      width
          (slot-value pane 'user-min-width)  min-width
          (slot-value pane 'user-max-width)  max-width
          (slot-value pane 'user-height)     height
          (slot-value pane 'user-min-height) min-height
          (slot-value pane 'user-max-height) max-height))
  
  (defmethod initialize-instance :after ((pane space-requirement-options-mixin)
                                         &rest space-req-keys)
    (apply #'grok-user-space-requirement-options pane space-req-keys))
  
  #+nil ; old
  (defmethod merge-user-specified-options ((pane space-requirement-options-mixin)
                                           sr)
    (multiple-value-bind (width min-width max-width height min-height max-height)
        (space-requirement-components sr)
      (with-slots (user-width user-min-width user-max-width
                   user-height user-min-height user-max-height) pane
  
        (dada ((foo width height))
              ;; the user wins on the "primary" dimensions
              (when user-foo
                (setf foo (spacing-value-to-device-units pane user-foo)))
              ;;
              (setf min-foo
                (clamp
                 (cond ((and (consp user-min-foo) (eq (cadr user-min-foo) :relative))
                        (- foo (car user-min-foo)))
                       ((not (null user-min-foo))
                        (spacing-value-to-device-units pane user-min-foo))
                       (t
                        min-foo))
                 0 foo))
              ;;
              (setf max-foo
                (max foo
                     (cond ((and (consp user-max-foo) (eq (cadr user-max-foo) :relative))
                            (+ foo (car user-max-foo)))
                           ((not (null user-max-foo))
                            (spacing-value-to-device-units pane user-max-foo))
                           (t
                            max-foo))))))
      (make-space-requirement
        :width      width
        :min-width  min-width
        :max-width  max-width
        :height     height
        :min-height min-height
        :max-height max-height)))
  
  ; new version
  (defmethod merge-user-specified-options ((pane space-requirement-options-mixin)
                                           sr)
    (multiple-value-bind (width min-width max-width height min-height max-height)
        (space-requirement-components sr)
      (with-slots (user-width user-min-width user-max-width
                   user-height user-min-height user-max-height) pane
        (dada ((foo width height))
              ;; the user wins on the "primary" dimensions
              ;; ^- this can't be true...
              ;;    the user should only be able to win within the pane's min-max
              (when user-foo
                (setf foo
                  (clamp (spacing-value-to-device-units pane user-foo)
                         min-foo max-foo)))
              ;;
              (setf min-foo
                (clamp
                 (cond ((and (consp user-min-foo) (eq (cadr user-min-foo) :relative))
                        (- foo (car user-min-foo)))
                       ((not (null user-min-foo))
                        (spacing-value-to-device-units pane user-min-foo))
                       (t
                        min-foo))
                 min-foo foo))
              ;;
              (setf max-foo
                (max
                  foo
                  (cond ((and (consp user-max-foo) (eq (cadr user-max-foo) :relative))
                         (+ foo (car user-max-foo)))
                        ((not (null user-max-foo))
                         (spacing-value-to-device-units pane user-max-foo))
                        (t
                         max-foo))))))
      (make-space-requirement
        :width      width
        :min-width  min-width
        :max-width  max-width
        :height     height
        :min-height min-height
        :max-height max-height)))
  
  (defmethod merge-user-specified-options ((pane border-space-requirement-options-mixin) sr)
    (with-slots (user-width user-min-width user-max-width
                 user-height user-min-height user-max-height) pane
      (let* ((min-width  (or user-min-width  2))
             (max-width  (or user-max-width  +fill+))
             (min-height (or user-min-height 2))
             (max-height (or user-max-height +fill+)))
        (space-requirement+* sr
                             :width      (clamp (or user-width 2) min-width max-width)
                             :min-width  min-width
                             :max-width  max-width
                             :height     (clamp (or user-height 2) min-height max-height)
                             :min-height min-height
                             :max-height max-height))))
  
  (defmethod compose-space :around ((pane space-requirement-options-mixin)
                                    &key width height)
  
negative.code: 
  (defmacro bordering ((&rest options) &body contents)
    `(make-pane 'border-pane ,@options :contents (list ,@contents)))
  
  ;;; RAISED PANE
  
  