• 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: NSLayoutManager subclassing
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSLayoutManager subclassing


  • Subject: Re: NSLayoutManager subclassing
  • From: glenn andreas <email@hidden>
  • Date: Thu, 19 Jan 2006 12:18:17 -0600


On Jan 19, 2006, at 12:07 PM, Rachel Blackman wrote:

What you *could* try (I have not tired this myself) is enclosing the text view inside another plain view without a flipped coordinate system, then put *that* in the scroll view. You'll have to make your enclosing view listen for frame changes in the NSTextView (so it can grow or shrink to fit the text view). You'll also probably have to adjust a few other things (the views' autoresizing masks for sure, perhaps some other things), but it shouldn't take too much effort to try it.

Interesting thought. I'd need to subclass NSTypesetter and flip the text too, I think. Because, basically, it needs to be, when only one line of text is in there:

NSTextViews are automatically flipped, so it lays out correctly. The idea is that the NSScrollView knows what is inside itself (it's contentView), and if the view is flipped, it is put at the top left, if it isn't, it is put at the bottom right. You could always subclass NSScrollView to handle this (though I don't remember if it is the NSScrollView or the NSClipView inside it that handles the actual "layout vs isFlipped").



Glenn Andreas email@hidden <http://www.gandreas.com/> wicked fun! quadrium | build, mutate, evolve | images, textures, backgrounds, art

_______________________________________________
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


References: 
 >NSLayoutManager subclassing (From: Rachel Blackman <email@hidden>)
 >Re: NSLayoutManager subclassing (From: "I. Savant" <email@hidden>)
 >Re: NSLayoutManager subclassing (From: Rachel Blackman <email@hidden>)

  • Prev by Date: Re: NSLayoutManager subclassing
  • Next by Date: Re: "Open dialogue"-like file system browser
  • Previous by thread: Re: NSLayoutManager subclassing
  • Next by thread: Re: NSLayoutManager subclassing
  • Index(es):
    • Date
    • Thread