• 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
Text System Architecture is really confusing me.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Text System Architecture is really confusing me.


  • Subject: Text System Architecture is really confusing me.
  • From: David Harper <email@hidden>
  • Date: Fri, 29 Jun 2007 11:11:18 -0400 (EDT)

Hello,

Here is my current understanding of the architecture of the NSTextView text system, and its related classes:

1. A Text Storage object, which contains an attributed string, has references to 1 or more LayoutManager objects.

2. A Layout Manager object, which controls text layout, has references to 1 or more TextContainer objects.

3. TextContainer objects define the region within a textView where text will be displayed.

4. TextViews have a reference to EXACTLY 1 text container.

My problem is with #4.  I'd like to be able to customize layout within a textview in order to be able to display equations.  I'm visualizing this being done by placing multiple text containers in a single view.  That is, if an equation is (1 + 2) / (3 + 4) (where parentheses are unnecessary to display because visually 1 + 2 will simply be displayed over 3 + 4), there will be 1 text container containing the text for the glyphrange (?) [1, 5] and 1 text containers containing the text for the glyphrange (?) [12,16].  Other parts of the equation will not be displayed in the textview.  Basically I want to implement the equation entering functionality in Apple's "Grapher" as a part of my application.

So, why must TextViews only reference 1 text container??
_______________________________________________

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: Text System Architecture is really confusing me.
      • From: Alastair Houghton <email@hidden>
  • Prev by Date: Window Doesn't Show Save Panel. How to Debug?
  • Next by Date: Re: Text System Architecture is really confusing me.
  • Previous by thread: Window Doesn't Show Save Panel. How to Debug?
  • Next by thread: Re: Text System Architecture is really confusing me.
  • Index(es):
    • Date
    • Thread