• 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 - email@hidden
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

TextViews, LayoutManagers, TextContainers - email@hidden


  • Subject: TextViews, LayoutManagers, TextContainers - email@hidden
  • From: Peter Hudson <email@hidden>
  • Date: Fri, 29 Jun 2007 07:46:31 +0100

This may be a starting point :-

In Xcode Help > Documentation  find this :-

ADC > Reference Library > Guides > Cocoa > Text and Fonts > Text Layout Programming Guide

And then you recover the attributed string from the text storage with attributedSubstringWithRange:





Date: Thu, 28 Jun 2007 16:14:35 -0400 (EDT)
From: David Harper <email@hidden>
Subject: TextViews, LayoutManagers, TextContainers
To: email@hidden
Message-ID: <email@hidden>
Content-Type: text/plain; charset=iso-8859-1

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

  • Prev by Date: NSSegmentedControl subclass and bindings
  • Next by Date: Re: NSURLRequest check
  • Previous by thread: Re: NSSegmentedControl subclass and bindings
  • Next by thread: mouse move events for non-frontmost window/app
  • Index(es):
    • Date
    • Thread