ftp.nice.ch/peanuts/GeneralData/Documents/openstep/OpenStepSpec_rtf.tar.gz#/OpenStepSpec_rtf/ApplicationKit/Classes/NSSlider.rtf

This is NSSlider.rtf in view mode; [Download] [Up]

paperh18648 margl-907 margr0 margt0 margb0 fi0 ri0 ql sb0 f1 fs24 Copyright f3 'e3f1 1994 by NeXT Computer, Inc.  All Rights Reserved.

s4 li100 fi0 ri1007 ql f0 b fs36 fs100 
fs36 NSSlider 
pard s11 li2872 fi-2771 ri1007 ql tx2872 f1 b0 fs28 fs48 
fs28 f0 b fs24 Inherits From:tab b0 fs28 f1 NSControl : NSView : NSResponder : NSObject
fs20 
fs28 s6 f0 b fs24 Conforms To:tab b0 fs28 f1 NSCoding (NSResponder)
fi0 NSObject (NSObject)
fs20 
fs28 s7 fi-2771 f0 b fs24 Declared In:tab b0 fs28 f1 AppKit/NSSlider.h 
fs20 
fs28 pard s16 li100 fi0 ri1007 ql f0 b fs28 fs20 
fs28 Class Description
fs14 
fs28 pard s1 li477 fi0 ri1007 ql tx2494 tx2872 tx3250 f1 b0 fs2 
fs28 NSSlider is a type of NSControl with a sliding knob that can be moved to represent a value between a minimum and a maximum setting. A slider may be either horizontal or vertical, but its minimum value is always at the left or bottom end of the bar, and the maximum at the right or top. By default, an NSSlider is a continuous NSControl: It sends its action message to its target continuously while the user drags its knob. To configure an NSSlider to send its action only when the mouse is released, send b setContinuous:b0  (an NSControl method) with an argument of NO.
fs16 
fs28 An NSSlider can be configured to display an image, a title, or both, in the area behind its knob. An NSSlider's title can be drawn in any gray level or color, and in any font available. An NSSlider's value can be set programmatically with any of the standard NSControl value-setting methods, such as b setFloatValue:b0 . 
fs16 
fs28 For more information, see the method descriptions in the NSSliderCell class specification.
fs16 
fs28 pard s16 li100 fi0 ri1007 ql f0 b fs24 
fs28 Setting the Cell Class
fs14 
fs28 pard s8 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 
fs28 fi-6552 + (Class)b cellClasstab b0 Returns the class last set in a b setCellClass:b0  message, or the NSSliderCell class if b setCellClass:b0  has never been called.
fi-6552 fs16 
fs28 fi-6552 + (void)b setCellClass:b0 (Class)i classIdi0 tab Sets the class of NSCell used in the NSSlider.
pard s16 li100 fi0 ri1007 ql f0 b fs48 
fs28 Modifying an NSSlider'27s Appearance 
fs14 
fs28 pard s8 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 
fs28 fi-6552 {f3 -} (NSImage *)b imageb0 tab Returns the image within the NSSlider. 
fi-6552 fs16 
fs28 fi-6552 {f3 -} (int)b isVerticalb0 tab Returns 1 if the NSSlider is vertical, 0 if horizontal, -1 if unknown. 
fi-6552 fs16 
fs28 fi-6552 {f3 -} (float)b knobThicknessb0 tab Returns the knob'27s thickness as a float value (width if horizontal slider, height if vertical slider). 
fi-6552 fs16 
fs28 fi-6552 {f3 -} (void)b setImage:b0 (NSImage *)i backgroundImagei0 tab Sets the image within the NSSlider to i backgroundImagei0 . 
fi-6552 fs16 
fs28 fi-6552 {f3 -} (void)b setKnobThickness:b0 (float)i aFloati0 tab Sets the knob'27s thickness (its width if the slider is horizontal, height if vertical) to i aFloati0 , expressed in units of the NSSlider'27s coordinate system.
fi-6552 fs16 
fs28 fi-6552 {f3 -} (void)b setTitle:b0 (NSString *)i aStringi0 tab Sets the title within the NSSlider to a copy of i aStringi0 .
fi-6552 fs16 
fs28 fi-6552 {f3 -} (void)b setTitleCell:b0 (NSCell *)i aCelli0 tab Sets the NSCell (or subclass thereof) object used to draw the title within the NSSlider. The cell object should ideally be an instance of NSTextFieldCell or one of its subclasses.
fi-6552 fs16 
fs28 fi-6552 {f3 -} (void)b setTitleColor:b0 (NSColor *)i aColori0 tab Sets the color of text in the title to i aColori0 . 
fi-6552 fs16 
fs28 fi-6552 {f3 -} (void)b setTitleFont:b0 (NSFont *)i fontObjecti0 tab Sets the NSFont object used for the title within the NSSlider. 
fi-6552 fs16 
fs28 fi-6552 {f3 -} (NSString *)b titleb0 tab Returns the title within the NSSlider.
fi-6552 fs16 
fs28 fi-6552 {f3 -} (id)b titleCellb0 tab Returns the NSCell (or subclass thereof) object used to draw the title within the NSSlider. 
fi-6552 fs16 
fs28 fi-6552 {f3 -} (NSColor *)b titleColorb0 tab Returns the color of text in the title. 
fi-6552 fs16 
fs28 fi-6552 {f3 -} (NSFont *)b titleFontb0 tab Returns the NSFont object used in drawing the title within the NSSlider. 
pard s16 li100 fi0 ri1007 ql f0 b fs48 
fs28 Setting and Getting Value Limits 
fs14 
fs28 pard s8 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 
fs28 fi-6552 {f3 -} (double)b maxValueb0 tab Returns theNSSlider'27s maximum value.
fi-6552 fs16 
fs28 fi-6552 {f3 -} (double)b minValueb0 tab Returns the NSSlider'27s minimum value.
fi-6552 fs16 
fs28 fi-6552 {f3 -} (void)b setMaxValue:b0 (double)i aDoublei0 tab Sets the NSSlider'27s maximum value to i aDoublei0 .
fi-6552 fs16 
fs28 fi-6552 {f3 -} (void)b setMinValue:b0 (double)i aDoublei0 tab Sets the NSSlider'27s minimum value to i aDoublei0 .
pard s16 li100 fi0 ri1007 ql f0 b fs48 
fs28 Handling Events 
fs14 
fs28 pard s8 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 
fs28 fi-6552 {f3 -} (BOOL)b acceptsFirstMouse:b0 (NSEvent *)i theEventi0 tab Returns YES by default, since NSSliders always accept a mouse-down event that activates a window, whether or not the NSSlider is enabled. Override this if you want different behavior.
fi-6552 fs16 
fs28 fi-6552 
}

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.