anchor.diff:  ;;;
   ;;;
   (defclass panel (basic-panel)
  -  ((content :initarg :content :initform (error ":content missing"))))
  -
  -
  -(defmethod calc-bounds ((this panel))
  -  (with-slots (content) this
  -    (calc-bounds content)))
  +  ())
  +
  +
  +(defgeneric compose-panel (element))
   
   
   (defmethod compose ((this panel))
  -  (with-slots (content) this
  -    (let ((begin-result (%nk:group-begin-titled *handle*
  -                                                (%panel-id-of this)
  -                                                ""
  -                                                (nk:panel-mask :no-scrollbar))))
  -      (unless (= begin-result 0)
  -        (unwind-protect
  -             (let ((*layout* nil))
  -               (compose content))
  -          (%nk:group-end *handle*))))))
  +  (let ((begin-result (%nk:group-begin-titled *handle*
  +                                              (%panel-id-of this)
  +                                              ""
  +                                              (nk:panel-mask :no-scrollbar))))
  +    (unless (= begin-result 0)
  +      (unwind-protect
  +           (compose-panel this)
  +        (%nk:group-end *handle*)))))
  +
   ;;;
   ;;;
   ;;;
  
positive.code: (cl:in-package :cl-bodge.ui)
  
  
  (declaim (special *window*
                    *layout*))
  
  
  (defgeneric compose (element))
  
negative.code: 
  
  (defun compose-window (win)
    (with-slots (x y width height title option-mask layout bounds) win
      (c-val ((bounds (:struct (%nk:rect))))
        (setf (bounds :x) (f x)
              (bounds :y) (f (- (height-of *context*) y height))
              (bounds :w) (f width)
              (bounds :h) (f height))
        (let ((val (%nk:begin-titled *handle* (%panel-id-of win) title bounds option-mask)))
          (unwind-protect
               (unless (= 0 val)
                 (with-styles ((:window :spacing) *zero-vec2*
                               (:window :padding) *zero-vec2*
                               (:window :group-padding) *zero-vec2*)
                   (multiple-value-bind (width height) (calc-bounds layout)
                     (declare (ignore width))
                     (%nk:layout-row-dynamic *handle* (f height) 1)
                     (compose layout))))
            (%nk:end *handle*))))))
  
  
  