NSRulerView Subclass and drawHashMarksAndLabelsInRect:(NSRect)rect;

  • 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/
previous month december 2006 next month
MTWTFSS
        1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31
Go to today