gnustep-dev
[Top][All Lists]
Advanced

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

Re: Position of I-beam cursor


From: Germán Arias
Subject: Re: Position of I-beam cursor
Date: Mon, 27 May 2013 01:42:52 -0600
User-agent: GNUMail (Version 1.2.0)

On 2013-05-26 12:02:03 -0600 Eric Wasylishen <address@hidden> wrote:

Sounds like a cool project! The I beam is called the "insertion point" in NSTextView. You can get the character index of it using

[self selectedRange]

inside NSTextView. The I-beam is only present if length == 0 and location != NSNotFound.


To get the (x,y) coordinates for positioning the popup window, you can use -firstRectForCharacterRange:. (NSTextInput protocol). Note that apple's docs say this returns a result in screen coordinates, but our NSTextView's implementation doesn't seem to do that.

Thanks. I will check this.


Eric





reply via email to

[Prev in Thread] Current Thread [Next in Thread]