anchor.diff:  ;;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
   ;;; Boston, MA  02111-1307  USA.
   
  -;;; $Id: panes.lisp,v 1.163 2005-11-29 14:46:53 gbaumann Exp $
  +;;; $Id: panes.lisp,v 1.164 2005-11-30 10:30:50 gbaumann Exp $
   
   (in-package :clim-internals)
   
  
positive.code:    align-x, align-y name the desired child alignment.
     If the child does not have enough strechability to cover all of the
     given area, it is aligned within that area according to the given
     options."
    (let* ((sr           (compose-space child))
           ;; The child's dimension is clamped within its min/max space requirement
           (child-width  (clamp width
                                (space-requirement-min-width sr)
                                (space-requirement-max-width sr)))
           (child-height (clamp height
                                (space-requirement-min-height sr)
                                (space-requirement-max-height sr)))
           ;; Align the child within the available area
           (child-x      (ecase align-x
                           ((:left)   x)
                           ((:center) (+ x (/ (- width child-width) 2)))
                           ((:right)  (+ x (- width child-width)))))
           (child-y      (ecase align-y
                           ((:top)    y)
                           ((:center) (+ y (/ (- height child-height) 2)))
                           ((:bottom) (+ y (- height child-height))))))
      ;; Actually layout the child
      (move-sheet child child-x child-y)
      (resize-sheet child child-width child-height)
  
negative.code:                              ((lambda (major minor) height width) x 0)
                               ((lambda (major minor) width height) x 0)
                               ((lambda (major minor) height width) width real-width)
                               ((lambda (major minor) height width) real-height height) ))
               (incf x major)
               (incf x major-spacing))))))
  
   (defmethod box-layout-mixin/xically-allocate-space ((pane rack-layout-mixin) real-width real-height)
     (with-slots (major-spacing) pane
       (multiple-value-bind (majors minors)
           (box-layout-mixin/xically-allocate-space-aux* pane real-width real-height)
         (let ((x 0))
           (loop
               for child in (box-layout-mixin-clients pane)
               for major in majors
               for minor in minors
               do
               (when (box-client-pane child)
                 #+NIL
                 (format *trace-output* "~&;;   child ~S at 0, ~D ~D x ~D(~D)~%;;       ~S~%"
                         (box-client-pane child)
                         x width height real-height
                         (compose-space (box-client-pane child)))
                 (layout-child (box-client-pane child)
                               :expand
                               :expand
                               ((lambda (major minor) height width) x 0)
                               ((lambda (major minor) width height) x 0)
                               ((lambda (major minor) height width) width real-width)
                               ((lambda (major minor) height width) real-height height) ))
               (incf x major)
               (incf x major-spacing)))))))
  
  ;; #+nil
  (defmethod note-sheet-enabled :before ((pane pane))
  