ftp.nice.ch/Attic/openStep/developer/resources/MiscKit.2.0.5.s.gnutar.gz#/MiscKit2/Temp/TabbedViews/MiscTabMatrixPalette2/MiscTabMatrixPalette.m

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

/*
 *	MiscTabMatrixPalette.m --
 *		Written by Sean Hill Copyright 1995-1997 by Sean Hill (?).
 *				Version 1.1.  All rights reserved.
 *
 *		Version 1.1, Apr 1st, 1997 (S. Corthesy):
 *			Modified releasing of objects; uses MiscTabButtonCell
 *
 *		Version 1.11, Apr 8th, 1997 (S. Corthesy):
 *			Removed setTabKeyTraversesCells:YES
 *
 *		This notice may not be removed from this source code.
 *
 *	This object is included in the MiscKit by permission from the author
 *	and its use is governed by the MiscKit license, found in the file
 *	"License.rtf" in the MiscKit distribution.  Please refer to that file
 *	for a list of all applicable permissions and restrictions.
 */	


#ifdef MISCKIT
#import <misckit/MiscTabMatrixPalette.h>
#import <misckit/MiscTabButtonCell.subproj/MiscTabButtonCell.h>
#else
#import "MiscTabMatrixPalette.h"
#import "MiscTabButtonCell.subproj/MiscTabButtonCell.h"
#endif

@implementation MiscTabMatrixPalette

- (void) finishInstantiate
{
	NSMatrix	*newMatrix = [[NSMatrix allocWithZone:[self zone]] initWithFrame:[matrix frame] mode:NSRadioModeMatrix prototype:[[MiscTabButtonCell allocWithZone:[self zone]] initTextCell:@"Folder Tab"] numberOfRows:1 numberOfColumns:2];

	[[matrix superview] replaceSubview:matrix with:newMatrix];
#ifdef IB_BUG
	//In InterfaceBuilder for Intel-Mach, matrix still has two retains on itself!
	[matrix release];
	[matrix release];
#endif
	[newMatrix release];
	matrix = newMatrix;

	[matrix setBackgroundColor:[NSColor darkGrayColor]];

// Set the autosizing and autoscrolling attributes of the matrix 
	[matrix setAutoresizingMask:NSViewWidthSizable];
	[matrix setAutoscroll:YES];

// Size tabMatrix to its cells and display it
	[matrix sizeToFit];
	[matrix setAutosizesCells:YES];
	[matrix setNeedsDisplay:YES];
}

@end

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