anchor.diff:    ;; TODO: how to better avoid refresh-stack when we have no submenus?
     (when *window-stack* (refresh-stack))
     (draw-menu menu)
  +
  +  ;; TODO: use the run-event-loop and a keymap instead of event-case.
  +  ;; event-case doesnt allow the user to add his own key bindings.
     (event-case (menu event)
  -    ((:up :down :left :right) (update-menu menu event) (draw-menu menu))
  +    ;; TODO: how to add one handler to several keys when using the run-event-loop?
  +    ;; with event-case it is easy because the case macro already provides this functionality.
  +    ((:up :down :left :right)
  +     (update-menu menu event)
  +     (draw-menu menu))
   
       ;; x toggles whether the item is checked or unchecked (if menu type is a checklist)
  +    ;; TODO: dont have a type :checklist, make :checked a slot of every item.
       ((#\x #\space)
        (when (eq (.type menu) :checklist)
          (let ((i (.current-item-number menu)))
  
positive.code:                 (string item)
                  (menu-item (.name item)))))))
  
  (defgeneric draw-menu (s)
    (:documentation "Draw a menu."))
  
  (defmethod draw-menu ((menu menu-window))
    (with-accessors ((current-item-number .current-item-number) (mark .current-item-mark) (items .items) (layout .layout)
                     (scrolled-layout .scrolled-layout) (scrolled-region-start .scrolled-region-start)
                     (title .title) (border .border) (color-pair .color-pair) (len .max-item-length) (sub-win .sub-window)) menu
      (clear sub-win)
      (let ((m  (car  layout))
            (n  (cadr layout))
  
negative.code:       (setf item (sub2rmi layout (list i j))))))
  
  (defun format-menu-item (menu item-number)
    "Take a menu and return item item-number as a properly formatted string.
  
  If the menu is a checklist, return [ ] or [X] at the first position.
  
  If a mark is set for the current item, display the mark at the second position.
  Display the same number of spaces for other items.
  
  At the third position, display the item given by item-number."
    (with-accessors ((items .items)
                     ;; TODO: remove this and incorporate the checkboxes into the items.
                     (checklist .checklist)
                     (type .type)
                     (current-item-number .current-item-number)
                     (mark .current-item-mark)
                     (sub-window .sub-window)) menu
      ;; return as string
      (format nil "~A~A~A"
              ;; two types of menus: :selection or :checklist
              ;; show the checkbox before the item in checklists
              (if (eq type :checklist)
                  (if (nth item-number checklist) "[X] " "[ ] ")
                  "")
  