O'Reilly logo

Cocoa in a Nutshell by James Duncan Davidson, Michael Beam

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

NSScroller — Mac OS X 10.0

Synopsis

This class represents the scrollbar control of a scroll view, and is used to control the scrolling of a document within a scroll view’s clip view. There is usually no need to work with NSScroller objects in code, as they are completely configured within a scroll view by Interface Builder.

image with no caption

@interface NSScroller : NSControl
                                  // Convenience Constructors
   + (float)scrollerWidth;
   + (float)scrollerWidthForControlSize:(NSControlSize)controlSize;
                                  // Accessor Methods
   - (void)setFloatValue:(float)aFloat 
                                 knobProportion:(float)percent;
   - (void)setControlTint:(NSControlTint)controlTint;
   - (NSControlTint)controlTint;
   - (void)setArrowsPosition:(NSScrollArrowPosition)where;
   - (NSScrollArrowPosition)arrowsPosition;
   - (void)setControlSize:(NSControlSize)controlSize;
   - (NSControlSize)controlSize;
                                  // Instance Methods
   - (void)checkSpaceForParts;
   - (void)drawArrow:(NSScrollerArrow)whichArrow 
                                 highlight:(BOOL)flag;
   - (void)drawKnob;
   - (void)drawParts;
   - (void)highlight:(BOOL)flag;
   - (NSScrollerPart)hitPart;
   - (float)knobProportion;
   - (NSRect)rectForPart:(NSScrollerPart)partCode;
   - (NSScrollerPart)testPart:(NSPoint)thePoint;
   - (void)trackKnob:(NSEvent *)theEvent;
   - (void)trackScrollButtons:(NSEvent *)theEvent;
   - (NSUsableScrollerParts)usableParts;

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required