Name
NSCell — Mac OS X 10.0
Synopsis
This class is the base superclass for the hierarchy of lightweight
objects that know how to draw into a view. Most
NSControl classes in the Application Kit defer the
implementation of drawing to an associated NSCell.
For example, NSButton uses a concrete subclass of
NSCell, NSButtonCell, to handle
all of the drawing and event handling of a button interface
component. Cells provide a leaner alternative to using views in
situations when a control appears repeatedly in a view. The interface
of NSCell is closely mirrored in
NSControl; indeed, many concrete subclasses of
NSControl forward most messages to their
associated NSCell object.
|
![]()
|
@interface NSCell : NSObject <NSCoding, NSCopying>
|
// Initializers
|
- (id)initImageCell:(NSImage *)image; |
- (id)initTextCell:(NSString *)aString; |
// Accessor Methods
|
- (void)setBezeled:(BOOL)flag; |
- (void)setType:(NSCellType)aType; |
- (NSCellType)type;
|
- (void)setCellAttribute:(NSCellAttribute)aParameter to:(int)value; |
- (void)setAllowsMixedState:(BOOL)flag; |
- (BOOL)allowsMixedState;
|
- (void)setTarget:(id)anObject; |
- (id)target;
|
- (void)setAction:(SEL)aSelector; |
- (SEL)action;
|
- (void)setImportsGraphics:(BOOL)flag; |
- (BOOL)importsGraphics;
|
- (void)setTag:(int)anInt; |
- (int)tag;
|
- (void)setTitle:(NSString*)aString; |
- (NSString*)title;
|
- (void)setAllowsEditingTextAttributes |
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access
