Return to the Alphabetic Index
Return to the Class Browser
Return to the Picture Browser
Copyright (c) 1994 by NeXT Computer, Inc.  All Rights
Reserved.
NSSliderCell 
Inherits From: NSActionCell : NSCell : NSObject
Conforms To:	NSCoding, NSCopying (NSCell)
NSObject (NSObject)
Declared In:	AppKit/NSSliderCell.h 
Class Description
NSSliderCell is a type of NSCell used to assist the NSSlider class, and to
build matrices of sliders. The NSSliderCell encompasses all the visible
portions of the NSSliderthe knob, the area along which the knob slides,
and the optional title within this area. See the NSSlider class specification
for an overview of how NSSliderCells work.
Determining Component Sizes 
-  - (NSSize)cellSizeForBounds:(NSRect)aRect	Returns the minimum
width and height needed to draw the NSSliderCell in aRect. If
aRect too small to fit the knob and bezel, the width and height of
theSize are set to 0.0.
-  -  (NSRect)knobRectFlipped:(BOOL)flipped	Gets the rectangle the
knob will be drawn in. flipped indicates whether the NSSliderCell's view
has a flipped coordinate system.
Setting Value Limits
-  - (double)maxValue	Returns the NSSliderCell's maximum value. 
-  -  (double)minValue	Returns the NSSliderCell's minimum value. 
-  -  (void)setMaxValue:(double)aDouble	Sets the maximum value of the
NSSliderCell to aDouble. 
-  -  (void)setMinValue:(double)aDouble	Sets the NSSliderCell's
minimum value to aDouble. 
Modifying Graphic Attributes
-  - (int)isVertical	Returns 1 if the NSSliderCell is vertical, 0 if
horizontal, -1 if unknown. 
-  -  (float)knobThickness	Returns the knob's thickness as a float value.
-  -  (void)setKnobThickness:(float)aFloat	Sets the knob's thickness
to aFloat (width if a horizontal slider, height if vertical).
-  -  (void)setTitle:(NSString *)aString	Sets the title within the
NSSliderCell to a copy of aString. 
-  -  (void)setTitleCell:(NSCell *)aCell	Sets the NSCell (or subclass
thereof) object used to draw the title within the NSSliderCell. The cell object
should ideally be an instance of NSTextFieldCell or one of its subclasses.
-  -  (void)setTitleColor:(NSColor *)aColor	Sets the color of text in
the title to aColor. 
-  -  (void)setTitleFont:(NSFont *)fontObject	Sets the NSFont object
used to draw the title within the NSSliderCell. 
-  -  (NSString *)title	Returns the title within the NSSliderCell.
-  -  (id)titleCell	Returns the NSCell (or subclass thereof) object used to
draw the title within the NSSliderCell. 
-  -  (NSFont *)titleFont	Returns the NSFont object used in drawing the
title within the NSSliderCell. 
-  -  (NSColor *)titleColor	Returns the color of text in the title. 
Displaying the NSSliderCell
-  - (void)drawBarInside:(NSRect)aRect	Draws the NSSliderCell's
background bar (but not the
flipped:(BOOL)flipped	 	bezel around it or the knob) in
aRect. flipped indicates whether the NSView's coordinate system
is flipped.
-  -  (void)drawKnob	Draws the NSSliderCell's knob after calculating the
drawing rectangle. 
-  -  (void)drawKnob:(NSRect)knobRect	Draws the NSSliderCell's knob
in knobRect. 
Modifying Behavior
-  - (double)altIncrementValue	Returns the increment by which the
NSSliderCell modifies its value when its knob is Alternate-dragged one pixel.
-  -  (void)setAltIncrementValue:(double)incValue	Sets the amount by
which the NSSliderCell modifies its value when the knob is dragged one pixel
with the Alternate key held down. 
Tracking the Mouse
-  + (BOOL)prefersTrackingUntilMouseUp	Returns YES to allow NSSliderCell
objects to track even when the mouse leaves their bounds. Override this method
to return NO if you want the NSSliderCell to stop tracking once the mouse
leaves its bounds. 
-  -  (NSRect)trackRect	Returns the rectangle used in tracking the mouse
(only valid while tracking).