anchor.diff:          (make-space-requirement))))
   
   (defmethod allocate-space ((pane scroller-pane) width height)
  -  (resize-sheet pane width height)
     (with-slots (viewport vscrollbar hscrollbar) pane
       (when viewport
         (setf (sheet-transformation viewport)
  
positive.code: 
  (defmethod allocate-space ((pane single-child-composite-pane) width height)
    (when (first (sheet-children pane))
      (resize-sheet pane width height)
      (allocate-space (first (sheet-children pane)) width height)))
  
  ;;; TOP-LEVEL-SHEET
  
negative.code:                                      :frame-manager fm)))
      (with-look-and-feel-realization (fm fr))
      fr))
  
  (defun foofoo ()
    (open-window-stream))
  
  
  
  (defmethod text-size ((sheet sheet) string &rest more)
    (apply #'text-size (sheet-medium sheet) string more))
  (defmethod text-style-ascent (ts (sheet sheet))
    (text-style-ascent ts (sheet-medium sheet)))
  (defmethod text-style-descent (ts (sheet sheet))
    (text-style-descent ts (sheet-medium sheet)))
  
  ;;;;;;
  
  #||
  (defclass list-pane (value-gadget)
    ((mode        :initarg :mode
                  :initform :some-of
                  :reader list-pane-mode
                  :type (member :one-of :some-of))
     (items       :initarg :items
                  :initform nil
                  :reader list-pane-items
                  :type sequence)
     (name-key    :initarg :name-key
                  :initform #'princ-to-string
                  :reader list-pane-name-key
                  :documentation "A function to be applied to items to gain a printable representation")
     (value-key   :initarg :value-key
                  :initform #'identity
                  :reader list-pane-value-key
                  :documentation "A function to be applied to items to gain its value 
                                  for the purpose of GADGET-VALUE.")
     (test        :initarg :test
                  :initform #'eql
                  :reader list-pane-test
                  :documentation "A function to compare two items for equality.") ))
  
  (defclass generic-list-pane (basic-pane list-pane permanent-medium-sheet-output-mixin)
    ((item-strings :initform nil
                   :documentation "Vector of item strings.")
     (selected-items :initform nil
                     :documentation "List of indexes of selected items.")
     ))
  
  (defmethod generic-list-pane-item-strings ((pane generic-list-pane))
    (with-slots (item-strings) pane
      (or item-strings
          (setf item-strings
            (map 'vector (lambda (item)
                           (let ((s (funcall (list-pane-name-key pane) item)))
                             (if (stringp s)
                                 s
                               (princ-to-string s)))) ;defensive programming!
                 (list-pane-items pane))))))
  
  (defmethod compose-space ((pane generic-list-pane))
    (let* ((n (length (generic-list-pane-item-strings pane)))
           (w (reduce #'max (map 'vector (lambda (item-string)
                                           (text-size pane item-string))
                                 (generic-list-pane-item-strings pane))
                      :initial-value 0))
           (h (* n (+ (text-style-ascent (pane-text-style pane) pane)
                      (text-style-descent (pane-text-style pane) pane)))))
      (make-space-requirement :width w :height h
                              :min-width w :min-height h
                              :max-width w :max-height h)))
  
  #+NIL
  (defmethod allocate-space ((pane generic-list-pane) width height)
    )
  
  (defmethod handle-repaint ((pane generic-list-pane) region)
    (with-slots (selected-items) pane
      (let* ((a (text-style-ascent (pane-text-style pane) pane))
             (d (text-style-descent (pane-text-style pane) pane)))
        (multiple-value-bind (x1 y1 x2 y2) (bounding-rectangle* (sheet-region pane))
          (loop
              for i from 0
              for x across (generic-list-pane-item-strings pane) do
                (let ((y (+ a (* i (+ a d)))))
                  (cond ((member i selected-items)
                         (draw-rectangle* pane x1 (- y a) x2 (+ y d))
                         (draw-text* pane x 0 y :ink +background-ink+))
                        (t
                         (draw-rectangle* pane x1 (- y a) x2 (+ y d) :ink +background-ink+)
                         (draw-text* pane x 0 y)))))))))
  
  (defmethod handle-event ((pane generic-list-pane) (event pointer-button-press-event))
    (multiple-value-bind (mx my) (values (pointer-event-x event) (pointer-event-y event))
      (let ((k (floor my (+ (text-style-ascent (pane-text-style pane) pane)
                            (text-style-descent (pane-text-style pane) pane))))
            (n (length (generic-list-pane-item-strings pane))))
        (if (member k (slot-value pane 'selected-items))
            (setf (slot-value pane 'selected-items) (delete k (slot-value pane 'selected-items)))
          (pushnew k (slot-value pane 'selected-items)))
        (dispatch-repaint pane +everywhere+)
        )))
  
  (defmethod handle-event ((sheet immediate-repainting-mixin) (event window-repaint-event))
    (dispatch-repaint sheet (window-event-region event)))
  ||#