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

This is NSActionCell.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.

s6 li100 fi0 ri1007 ql f0 b fs36 fs100 
fs36 NSActionCell
pard s15 li2872 fi-2771 ri1007 ql tx2872 f1 b0 fs28 fs48 
fs28 f0 b fs24 Inherits From:tab b0 fs28 f1 NSCell : NSObject
fs20 
fs28 s8 f0 b fs24 Conforms To:tab b0 fs28 f1 NSCoding, NSCopying (NSCell)
fi0 NSObject (NSObject)
fs20 
fs28 s9 fi-2771 f0 b fs24 Declared In:tab b0 fs28 f1 AppKit/NSActionCell.h 
fs20 
fs28 pard s20 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 An NSActionCell defines an active area inside a control (an instance of NSControl or one of its subclasses). As an NSControl'27s active area, an NSActionCell does three things: it usually performs display of text or an icon (the subclass NSSliderCell is an exception); it provides the NSControl with a target and an action; and it handles mouse (cursor) tracking by properly highlighting its area and sending action messages to its target based on cursor movement. The only way to specify the NSControl for a particular NSActionCell is to send the NSActionCell a b drawWithFrame:inView:b0  message, passing the NSControl as the argument for the b inView:b0  keyword of the method.
fs16 
fs28 NSActionCell implements the target object and action method as defined by its superclass, NSCell. As a user manipulates an NSControl, NSActionCell'27s b trackMouse:inRect:ofView:untilMouseUp:b0  method (inherited from NSCell) updates its appearance and sends the action message to the target object with the NSControl object as the only argument.
fs16 
fs28 Usually, the responsibility for an NSControl'27s appearance and behavior is completely given over to a corresponding NSActionCell. (NSMatrix, and its subclass NSForm, are NSControls that don'27t follow this rule.)
fs16 
fs28 A single NSControl may have more than one NSActionCell. To help identify it in this case, every NSActionCell has an integer tag. Note, however, that no checking is done by the NSActionCell object itself to ensure that the tag is unique. See the NSMatrix class for an example of a subclass of NSControl that contains multiple NSActionCells.
fs16 
fs28 Many of the methods that define the contents and look of an NSActionCell, such as b setFont:b0  and b setBordered:b0 , are reimplementations of methods inherited from NSCell. They'27re subclassed to ensure that the NSActionCell is redisplayed if it'27s currently in an NSControl.
fs16 
fs28 pard s20 li100 fi0 ri1007 ql f0 b fs24 
fs28 Configuring an NSActionCell 
fs14 
fs28 pard s10 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 
fs28 fi-6552 {f3 -} (void)b setAlignment:b0 (NSTextAlignment)i modei0 tab Sets the NSActionCell'27s text alignment to i modei0 . 
fi-6552 fs16 
fs28 fi-6552 {f3 -} (void)b setBezeled:b0 (BOOL)i flagi0 tab Adds or removes the NSActionCell'27s bezel. 
fi-6552 fs16 
fs28 fi-6552 {f3 -} (void)b setBordered:b0 (BOOL)i flagi0 tab Adds or removes the NSActionCell'27s border. 
fi-6552 fs16 
fs28 fi-6552 {f3 -} (void)b setEnabled:b0 (BOOL)i flagi0 tab Sets whether the NSActionCell reacts to mouse and keyboard events. 
fi-6552 fs16 
fs28 fi-6552 {f3 -} (void)b setFloatingPointFormat:b0 (BOOL)i autoRangei0 tab  
s11 li7030 fi-6553 fi-5796 b left:b0 (unsigned int)i leftDigitsi0 tab Sets the NSActionCell'27s floating point format. 
b right:b0 (unsigned int)i rightDigits
s10 li7029 fi-5794 fi-6552 i0 fs16 
fs28 fi-6552 {f3 -} (void)b setFont:b0 (NSFont *)i fontObjecti0 tab Sets the NSActionCell'27s font to i fontObjecti0 . 
fi-6552 fs16 
fs28 fi-6552 {f3 -} (void)b setImage:b0 (NSImage *)i imagei0 tab Sets the NSActionCell'27s icon to i image.
pard s20 li100 fi0 ri1007 ql f0 b i0 fs48 
fs28 Manipulating NSActionCell Values 
fs14 
fs28 pard s10 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 
fs28 fi-6552 {f3 -} (double)b doubleValueb0 tab Returns the NSActionCell'27s contents as a b doubleb0 . 
fi-6552 fs16 
fs28 fi-6552 {f3 -} (float)b floatValueb0 tab Returns the NSActionCell'27s contents as a b floatb0 . 
fi-6552 fs16 
fs28 fi-6552 {f3 -} (int)b intValueb0 tab Returns the NSActionCell'27s contents as an b intb0 . 
fi-6552 fs16 
fs28 fi-6552 {f3 -} (void)b setStringValue:b0 (NSString *)i aStringi0 tab Sets the NSActionCell'27s contents to a copy of i aStringi0 . 
fi-6552 fs16 
fs28 fi-6552 {f3 -} (NSString *)b stringValueb0 tab Returns the NSActionCell'27s contents as a string.
pard s20 li100 fi0 ri1007 ql f0 b fs48 
fs28 Displaying 
fs14 
fs28 pard s10 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 
fs28 fi-6552 {f3 -} (void)b drawWithFrame:b0 (NSRect)i cellFramei0 tab Draws the NSActionCell in the rectangle i cellFramei0  of 
s11 li7030 fi-6553 fi-5796 b inView:b0 (NSView *)i controlViewi0 tab tab i controlViewi0  (which should normally be an NSControl). 
s10 li7029 fi-5794 fi-6552 fs16 
fs28 fi-6552 {f3 -} (NSView *)b controlViewb0 tab Returns the view (normally an NSControl) in which the NSActionCell was last drawn. 
pard s20 li100 fi0 ri1007 ql f0 b fs48 
fs28 Target and Action 
fs14 
fs28 pard s10 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 
fs28 fi-6552 {f3 -} (SEL)b actionb0 tab Returns the NSActionCell'27s action method. 
fi-6552 fs16 
fs28 fi-6552 {f3 -} (void)b setAction:b0 (SEL)i aSelectori0 tab Sets the NSActionCell'27s action method to i aSelectori0 . 
fi-6552 fs16 
fs28 fi-6552 {f3 -} (void)b setTarget:b0 (id)i anObjecti0 tab Sets the NSActionCell'27s target object to i anObjecti0 . 
fi-6552 fs16 
fs28 fi-6552 {f3 -} (id)b targetb0 tab Returns the NSActionCell'27s target object. 
pard s20 li100 fi0 ri1007 ql f0 b fs48 
fs28 Assigning a Tag 
fs14 
fs28 pard s10 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 
fs28 fi-6552 {f3 -} (void)b setTag:b0 (int)i anInti0 tab Sets the NSActionCell'27s tag to i anInti0 . 
fi-6552 fs16 
fs28 fi-6552 {f3 -} (int)b tagb0 tab Returns the NSActionCell'27s tag. 
pard s1 li477 fi0 ri1007 ql tx2494 tx2872 tx3250 fs16 
fs28 
fs16 
fs28 }

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