Re: NSLayoutManager question
Re: NSLayoutManager question
- Subject: Re: NSLayoutManager question
- From: Douglas Davidson <email@hidden>
- Date: Wed, 20 Feb 2002 13:22:07 -0800
On Wednesday, February 20, 2002, at 12:24 PM, Paul Bayley wrote:
Nobody on this list has tried this.
Or if they have, they haven't informed you of it.
I'm not clear what the selection process is then. I know NSTextView
knows where the mouseDown occurs, but I thought it passed that
information to NSLayoutManager so it could make the selection. For
example if one document spans two views (like page 1+2) how would
NSTextView know what to select? I thought that each view would report
each end of the selection to NSLayoutManager which would perform the
selection (not only visually but also creating a text range).
Certain things are shared between multiple text views attached to a
given layout manager. Among them is the selectedRange. The text view
that receives the mouseDown: handles the resulting modal loop, and
determines the selection, based on information gathered from the shared
layout manager as I described. All that must be done here is to set the
selectedRange as desired; the text machinery will take care of
displaying it.
Douglas Davidson
_______________________________________________
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.