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

NSMatrix — Mac OS X 10.0

Synopsis

This NSView subclass specializes in organizing groups of cells in a grid, and endowing them with various collective behaviors such as that exhibited by radio buttons. Radio button groups are an example of an interface component implemented with an NSMatrix and NSButtonCells.

image with no caption

@interface NSMatrix : NSControl
                                  // Initializers
   - (id)initWithFrame:(NSRect)frameRect;
   - (id)initWithFrame:(NSRect)frameRect 
                                 mode:(int)aMode 
                                 cellClass:(Class)factoryId 
                                 numberOfRows:(int)rowsHigh
                                 numberOfColumns:(int)colsWide;
   - (id)initWithFrame:(NSRect)frameRect 
                                 mode:(int)aMode 
                                 prototype:(NSCell *)aCell 
                                 numberOfRows:(int)rowsHigh
                                 numberOfColumns:(int)colsWide;
                                  // Accessor Methods
   - (void)setAllowsEmptySelection:(BOOL)flag;
   - (BOOL)allowsEmptySelection;
   - (void)setToolTip:(NSString *)toolTipString 
                                 forCell:(NSCell *)cell;
   - (void)setCellClass:(Class)factoryId;
   - (Class)cellClass;
   - (void)setDelegate:(id)anObject;
   - (id)delegate;
   - (void)setAutoscroll:(BOOL)flag;
   - (void)setIntercellSpacing:(NSSize)aSize;
   - (NSSize)intercellSpacing;
   - (void)setValidateSize:(BOOL)flag;
   - (void)setCellBackgroundColor:(NSColor *)color;
   - (NSColor *)cellBackgroundColor;
   - (void)setMode:(NSMatrixMode)aMode;
   - (NSMatrixMode)mode;
   - (void)setSelectionByRect:(BOOL)flag;
   - (void)setSelectionFrom:(int)startPos 
                                 to:(int)endPos 
                                 anchor:(int)anchorPos 
                                 highlight ...

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