[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: pb with displaying balloon help message



>Hi,
>
>The display of balloon help message under MCL truncate descending character
>(for example a "p" has no leg any more). Applied to other elements of the
>mac interface (not MCL), the messages are displayed normaly.
>
>Is it a know bug? What should be done?

This is a known bug. It is fixed by the new version of the file
"ccl:library;help-manager.lisp" in the "2.0->2.0.1.sea.hqx"
archive available for anonymous FTP from cambrige.apple.com
in the directory "/pub/mcl2/patches/". In case you don't want
to or can't download that patch, here's the function that changed:

---------------------------------------------------------------------------

(defun help-tehandle (string &aux (length (length string)))
   "returns a texthandle with string as it's string contents. There is one terec *help-tehandle*"
   (let ((terec *help-tehandle*)
         font size)
     (if terec
       ; Necessary because bug in system neglects to initialize these.
       (setf (href terec :terec.destrect.topleft) #@(5 5)
             (href terec :terec.destrect.botRight) #@(100 100)
             (href terec :terec.viewrect.topleft) #@(5 5)
             (href terec :terec.viewrect.botRight) #@(100 100))
       (rlet ((r :rect
                 :topleft #@(5 5)
                 :bottomright #@(100 100)))
         (setq *help-tehandle* (setq terec (#_tenew r r)))))
     (rlet ((font-info :integer))
       (#_HMGetFont font-info)
       (setf (href terec :terec.txfont)
             (setq font (%get-word font-info)))
       (#_HMGetFontSize font-info)
       (setf (href terec :terec.txsize)
             (setq size (%get-word font-info)))
       (setf (href terec :terec.txmode) 0)
       (setf (href terec :terec.txface) 0))
     (multiple-value-bind (ascent descent maxwid leading)
                          (font-codes-info (make-point 0 font) (make-point size 0))
       (declare (ignore maxwid))
       (setf (href terec :terec.fontascent) ascent
             ; maybe this should be just (+ ascent descent)
             (href terec :terec.lineheight) (+ ascent descent leading)))
     (with-cstr (cs string 0 length)
       (#_tesettext cs length terec))
     terec))