• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Custom Objects in an NSTextView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Custom Objects in an NSTextView


  • Subject: Re: Custom Objects in an NSTextView
  • From: Aki Inoue <email@hidden>
  • Date: Wed, 4 Jan 2006 11:08:27 -0800

I've always wondered though how it would be possible to use an NSTextAttachmentCell to define a non-rectangular area. As far as I can tell, only NSTextContainer allows this.
Hmm, I think Manfred was asking for inline objects embedded in text, it's different from layout objects surrounded by text.

As for using a custom NSTextContainer to handle more than one custom layout object, that would also be difficult, no? The text container would need to grab the attributed string, look for custom attachments, determine their position in the text view taking into account the view's size, and then handle the containsPoint: method.
Usually this kind of layout objects are defined by a protocol above attributed text. You have to create your own data model describing how layout objects are placed in the page and interact each other. The model in turn can use the Text System object such as NSTextContainer to achieve the desired rendering.

Hmm, good to know that the layout manager can coordinate multiple containers and view. The TextSizing example in the Developer folder demonstrates this, right?
Yes.

Aki

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Custom Objects in an NSTextView
      • From: Philip Dow <email@hidden>
References: 
 >Custom Objects in an NSTextView (From: Manfred Schubert <email@hidden>)
 >Re: Custom Objects in an NSTextView (From: Philip Dow <email@hidden>)
 >Re: Custom Objects in an NSTextView (From: Aki Inoue <email@hidden>)
 >Re: Custom Objects in an NSTextView (From: Philip Dow <email@hidden>)

  • Prev by Date: Re: Custom Objects in an NSTextView
  • Next by Date: Re: perform ... afterDelay?
  • Previous by thread: Re: Custom Objects in an NSTextView
  • Next by thread: Re: Custom Objects in an NSTextView
  • Index(es):
    • Date
    • Thread