• 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: Douglas Davidson <email@hidden>
  • Date: Thu, 19 Jan 2006 09:25:56 -0800


On Jan 18, 2006, at 5:36 PM, Rachel Blackman wrote:

I find myself with a situation where I need NSTextView to behave a bit differently than usual.

Specifically, I need it to work that the document is -- in effect, bottom-aligned ('valign=bottom' in HTML terms). So that if you have only one line, instead of a single line of text at the top, you have a single line of text at the bottom of the view. Adding lines will still appear at the bottom, scrolling up the lines before them, but the entire thing remains bottom-aligned.

I've been looking at NSLayoutManager and NSTextContainer as what I need to subclass and tweak to do this, and at first it seemed promising, but the documentation is a little unclear in places; I'm no longer actually certain I /can/ do this properly with them, as opposed to having to actually modify NSTextView itself.


This is really a view-level modification rather than a layout-level modification. You are not changing the positioning of glyphs with respect to each other, or the manner in which glyphs are drawn. Instead, you are changing the origin of the container relative to the view (in one implementation) or the origin of the view with respect to its superview (in another).


Douglas Davidson

_______________________________________________
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: NSLayoutManager subclassing
      • From: Rachel Blackman <email@hidden>
References: 
 >NSLayoutManager subclassing (From: Rachel Blackman <email@hidden>)

  • Prev by Date: Re: Returning an executable in a framework
  • Next by Date: Re: NSAttributedString - determine document type without loading?
  • Previous by thread: Re: NSLayoutManager subclassing
  • Next by thread: Re: NSLayoutManager subclassing
  • Index(es):
    • Date
    • Thread