ftp.nice.ch/pub/next/developer/resources/palettes/TabMatrixPalette.0920.NIH.bs.tar.gz#/TabMatrixPalette/TabMatrixPalette.m

This is TabMatrixPalette.m in view mode; [Download] [Up]


#import "TabMatrixPalette.h"
#import "../UITabActionCell.subproj/UITabActionCell.h"

@implementation  TabMatrixPalette

- finishInstantiate
{
    NXRect              frameRect;
    Matrix             *newMatrix;

    [matrix getFrame:&frameRect];

    newMatrix =
    	[[Matrix allocFromZone:[self zone]]
	    initFrame:&frameRect
	    mode:NX_RADIOMODE
	    prototype:[[UITabActionCell allocFromZone:[self zone]] initTextCell:"Folder Tab"]
	    numRows:1
	    numCols:2];

    [[matrix superview] replaceSubview:matrix with:newMatrix];

    [matrix free];

    matrix = newMatrix;

 // set the background gray of tabMatrix to NX_DKGRAY 
    [matrix setBackgroundGray:NX_DKGRAY];

 // set the autosizing and autoscrolling attributes of the matrix 
    [matrix setAutosizing:NX_WIDTHSIZABLE | NX_HEIGHTSIZABLE];
    [matrix setAutoscroll:YES];

 // size tabMatrix to its cells and display it 
    //[matrix sizeTo:NX_WIDTH(&frameRect):NX_HEIGHT(&frameRect)];
	[matrix sizeToFit];
    [matrix display];    
	
    return self;
}
@end

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