anchor.diff:    "Return the currently selected item of the given menu."
     (nth (.current-item-number menu) (.items menu)))
   
  -;; test submenus, test this in t19c
  +;; TODO: test submenus, test this in t19c
  +;; TODO: rename select-item to select
  +;; TODO: use with-accessors above event-case instead of using individual accessors all over the place.
   (defun select-item (menu)
     "Display a menu, let the user select an item, return the selected item.
   
  
positive.code:      ;; if the menu type is a checklist
       (if (eq (.type menu) :checklist)
           ;; return all checked items in a list.
           (with-accessors ((items .items) (checklist .checklist)) menu
             (return-from select-item (loop for i from 0 below (length items) if (nth i checklist) collect (nth i items))))
  
           ;; else, if the menu type is selection, act on the current item.
           (let ((item (current-item menu)))
             (typecase item
               ;; if we have just a normal string or a symbol, just return it.
               (symbol
  
negative.code:       (flet ((make-title-string (len)
                 (concatenate 'string "|~" (write-to-string (+ len 2)) ":@<~A~>|")))
          (add menu (format nil (make-title-string (length title)) title) :y 0 :x 2)))
      ;; todo: when we refresh a window with a subwin, we shouldnt have to refresh the subwin separately.
      ;; make refresh specialize on menu and decorated window in a way to do both.
      (refresh menu)
      (refresh sub-win)))
  
  ;; TODO: rename to draw. draw-menu is wrong, since it is a dialog, not really a menu.
  (defmethod draw-menu ((menu dialog-window))
    ;; first draw a menu
    ;; TODO: describe what exactly is drawn here and what in the parent method.
    (call-next-method)
  
    ;; then draw the message in the reserved space above the menu.
  