Re: NSTextView and Line Numbering
Re: NSTextView and Line Numbering
- Subject: Re: NSTextView and Line Numbering
- From: Jérôme Laurens <email@hidden>
- Date: Thu, 20 Feb 2003 11:23:01 +0100
Le jeudi, 20 fiv 2003, ` 01:53 Europe/Zurich, James Derry a icrit :
>
Hi again all,
>
>
Here I am once again soliciting some help. Specifically I'm trying to
>
implement a scheme whereby I can override NSTextView (or something) to
>
display line numbers along side the NSTextView contents. Problem is,
>
there
>
aren't not a whole lot of comments out there (well, here and Google
>
groups)
>
and I'm getting all lost.
>
Once the layout is complete, use the layout manager of the text view
- (NSRect)lineFragmentRectForGlyphAtIndex:(unsigned)glyphIndex
effectiveRange:(NSRangePointer)lineFragmentRange
You can scan the whole text to create an array of rects for each line:
You'll have your dimens,
all the rest is details.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.