• 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
NSRulerView Subclass and drawHashMarksAndLabelsInRect:(NSRect)rect;
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSRulerView Subclass and drawHashMarksAndLabelsInRect:(NSRect)rect;


  • Subject: NSRulerView Subclass and drawHashMarksAndLabelsInRect:(NSRect)rect;
  • From: "jorge castellanos" <email@hidden>
  • Date: Wed, 06 Dec 2006 00:39:12 -0600


I need a ruler that displays the units in logarithmic or exponential increments.
NSRulerView does allow to specify custom units, but they still increment linearly.
So, I decided to subclass NSRulerView and override


drawHashMarksAndLabelsInRect:(NSRect)rect;

drawing my own hash marks and lables showing the desired "curve"

what I can't seem to find is how do I acces the registered units.
NSRulerView has an NSString that holds the unit name, and an NSDictionary (* _cachedHashDict) which appears to hold precalculated data to draw the marks. What data and in what order? If I wanted to calculate my own "increments" how can I get the registered unit?


Thanks for the help in advance,

j.c.

_________________________________________________________________
Don't just search. Find. Check out the new MSN Search! http://search.msn.click-url.com/go/onm00200636ave/direct/01/


_______________________________________________

Cocoa-dev mailing list (email@hidden)

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: Re: Framework for displaying Trees graphically?
  • Next by Date: Contextual menus : better idea?
  • Previous by thread: Re: thread spinning ...
  • Next by thread: Contextual menus : better idea?
  • Index(es):
    • Date
    • Thread