Re: NSTextView's MarkedText
Re: NSTextView's MarkedText
- Subject: Re: NSTextView's MarkedText
- From: Gordon Apple <email@hidden>
- Date: Tue, 23 Jul 2013 11:32:59 -0500
- Thread-topic: NSTextView's MarkedText
I’ll make a rash assumption that this is a homogeneous attribute range. The
method apparently then calls
fillBackgroundRectArray:count:forCharacterRange:color to fill in the
(possibly) disjoint rects covering that range. If so, then it looks like
that is where I need to test the applicable attributes to see if my custom
attribute background is applicable, or else call inherited.
On 7/23/13 10:05 AM, "Fritz Anderson" <email@hidden> wrote:
> If I understand your need, -[NSLayoutManager
> drawBackgroundForGlyphRange:atPoint:]?
>
> ― F
>
> On 23 Jul 2013, at 9:55 AM, Gordon Apple <email@hidden> wrote:
>
>> > Ok, so that¹s out. I could create a custom attribute which would work as I
>> > described, but I¹m not clear on what NSLayoutManager background method(s) I
>> > would need to override to implement this.
>> >
>> >
>> > On 7/22/13 7:30 PM, "Ken Thomases" <email@hidden> wrote:
>> >
>>> >> I don't think you should attempt to use marked text for this purpose.
>>> >>
>>> >> Your code would not normally control which text is marked. This is
>>> normally
>>> >> controlled by Cocoa and/or the input method. The text view implements
>>> the
>>> >> methods of the NSTextInputClient protocol and through those methods, the
>>> >> framework tells it which text should be marked and when the marking
>>> should be
>>> >> cleared.
>
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden