anchor.diff:      :type          (or null cons)
       :documentation "A 2-element list tracking the starting row/y and column/x of the displayed menu region."))
   
  -  (:documentation  "A menu is a window providing a list of items to be selected by the user."))
  +  (:documentation  "A menu is a list of items that can be selected by the user."))
   
   (defmethod initialize-instance :after ((win menu-window) &key)
     (with-slots (winptr items type checklist height width position sub-window border layout scrolled-layout max-item-length
  
positive.code:     :initform      nil
      :type          (or null cons)
      :accessor      .fields
      :documentation "List of fields.")
  
     (current-field-number
      :initform      0
  
negative.code:     (when (eq type :checklist)
        (setf checklist (make-list (length items) :initial-element nil)))
  
      ;; Initialize the current item as the first field from the items list.
      ;; If the items list ist not provided upon initialization.
      (setf (slot-value win 'current-item) (car (slot-value win 'items)))
      
      ;; only for menu windows
      (when (eq (type-of win) 'menu-window)
  
        (let ((padding (if border 1 0)))
          ;; if no layout was given, use a vertical list (n 1)
          (unless layout (setf layout (list (length items) 1)))
          ;; if height and width are not given as initargs, they will be calculated,
          ;; according to no of rows +/- border, and _not_ maximized like normal windows.
          (unless height (setf height (+ (* 2 padding) (car (or scrolled-layout layout)))))
          (unless width  (setf width  (+ (* 2 padding) (* (cadr (or scrolled-layout layout))
                                                          (+ (length current-item-mark) max-item-length)))))
          (setf winptr (%newwin height width (car position) (cadr position)))
          (setf sub-window
                (make-instance 'sub-window
  