Lisp HUG Maillist Archive

Coordinates of point in editor panes

I have a vague recollection this has been asked before but I cannot
find it in the archives: Is there a way to get at the X/Y coordinates
of the position of point in an editor pane (EDITOR-PANE being a
subclass of OUTPUT-PANE)?

Thanks,
Edi.


Re: Coordinates of point in editor panes

On Thu, 14 Jul 2005 08:31:59 -0500 (EST), "Jason Kantz" <jason@kantz.com> wrote:

> Maybe ...
>
> (with-slots ((x CAPI::CURSOR-X) (y CAPI::CURSOR-y)
>              (cursor-width capi::%font-width%)
>              (cursor-height capi::%font-height%)) editor-pane
>    (values (* x cursor-width) (* y cursor-height)))

Yup, that seems to work.

Thanks,
Edi.


Updated at: 2020-12-10 08:51 UTC