• 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
TextViews, LayoutManagers, TextContainers
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

TextViews, LayoutManagers, TextContainers


  • Subject: TextViews, LayoutManagers, TextContainers
  • From: David Harper <email@hidden>
  • Date: Thu, 28 Jun 2007 16:14:35 -0400 (EDT)

Hi,

I want explicit control over placement of line fragments.  I've been considering subclassing LayoutManager to do this.  I'm exploring the methods
setLayoutRect:forTextBlock:glyphRange:and

setLineFragmentRect:forGlyphRange:usedRect:

The NSLayoutManager class reference says that these methods are used by the layout mechanism and should not be invoked directly.  I'm planning on exploring further the layout mechanism to determine how to manually position line fragments; I was just thinking that if anyone on this list has experience working with the layout manager they might be able to point me in the right direction.

I don't want to manipulate text storage - I'd like for the contents of the text view to be a single attributed string.  I'd like to be able to specify what ranges within that string are located where, so that, for example, pressing the right arrow key would move to the next expected line fragment, and selecting text in the view would produce expected results.

I will figure this out eventually but any assistance is very much appreciated.
_______________________________________________

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

  • Follow-Ups:
    • Re: TextViews, LayoutManagers, TextContainers
      • From: Martin Wierschin <email@hidden>
  • Prev by Date: Re: Use UI or data for logic? (hijacked from Two NSRects adjacent/touching?)
  • Next by Date: Re: Binding to NSTreeController
  • Previous by thread: Full-time Cocoa Developer Needed
  • Next by thread: Re: TextViews, LayoutManagers, TextContainers
  • Index(es):
    • Date
    • Thread