• 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: NSRulerView and inches
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSRulerView and inches


  • Subject: Re: NSRulerView and inches
  • From: Graham Cox <email@hidden>
  • Date: Fri, 22 Jan 2010 14:42:09 +1100

On 22/01/2010, at 2:13 PM, Kyle Sluder wrote:

> But that's different from blithely drawing the
> resize handles at whatever scale AppKit has calculated for you.

I didn't say I was. AppKit doesn't decide on the scale, the user does. Appkit merely sets up a transform to suit. The resize handles are carefully drawn in accordance with the scale according to the rules I want to apply - in my case at 33% of the zoom scale, within certain limits. It would also be possible to draw them always at the same scale (1:1) or at one of several fixed sizes if I wanted. At no point is anything not under the control of the programmer.

> My preferred solution: ditch NSRulerView. :)


That does seem to me to be throwing the baby out with the bathwater. I guess if I wanted to heavily customise NSRulerView it might be easier to start from scratch, but the built-in class is not bad as far as it goes, and does do a great deal of really tedious work for you.

So, what it boils down to is:

a) roll your own view scaling/zooming and you have to implement your own rulers, or:

b) use the built-in view scaling/zooming and you have to implement your own resize handles or other "scale-proof" UI widget drawing.

Seems as broad as it's long to me, though I still favour (b)!

--Graham


_______________________________________________

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

References: 
 >NSRulerView and inches (From: Milen Dzhumerov <email@hidden>)
 >Re: NSRulerView and inches (From: Quincey Morris <email@hidden>)
 >Re: NSRulerView and inches (From: Graham Cox <email@hidden>)
 >Re: NSRulerView and inches (From: Kyle Sluder <email@hidden>)
 >Re: NSRulerView and inches (From: Graham Cox <email@hidden>)
 >Re: NSRulerView and inches (From: Kyle Sluder <email@hidden>)
 >Re: NSRulerView and inches (From: Graham Cox <email@hidden>)
 >Re: NSRulerView and inches (From: Kyle Sluder <email@hidden>)

  • Prev by Date: Re: NSTabViewDelegate
  • Next by Date: Re: NSTabViewDelegate
  • Previous by thread: Re: NSRulerView and inches
  • Next by thread: Re: NSRulerView and inches
  • Index(es):
    • Date
    • Thread