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

Re: window sizes

>Does anyone know how to determine the total external dimensions of a
>view, including the title bar? (view-size ..) doesn't include the title bar.

For rectangular windows you can use the bounding box of the structRgn:

(defun total-window-size (w)
  (let ((rgn (pref (wptr w) :windowRecord.strucrgn)))
    (subtract-points (href rgn :region.rgnbbox.botright)
                     (href rgn :region.rgnbbox.topleft))))

(defun total-window-position (w)
  (let ((rgn (pref (wptr w) :windowRecord.strucrgn)))
    (href rgn :region.rgnbbox.topleft)))

>While I'm at it.. Is there a way to add cursor types to MCL I'm
>specifically looking for a crosshair "+" but a general method would be useful.

Other folks answered this one.