ftp.nice.ch/pub/next/developer/resources/classes/misckit/MiscKit.1.10.0.s.gnutar.gz#/MiscKit/Palettes/MiscColorWells/ReadOnlyColorWellInspector.m

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

//
//	ReadOnlyColorWellInspector.m -- inspector for MiscReadOnlyColorWell class
//		Written by Morgan D. Wise Copyright (c) 1994 by Morgan D. Wise.
//		Adapted for MiscKit inclusion by Don Yacktman.
//				Version 0.1.  All rights reserved.
//
//		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.
//

#import "ReadOnlyColorWellInspector.h"

@implementation ReadOnlyColorWellInspector

- init
{
    char buf[MAXPATHLEN + 1];
    id bundle;
    
    [super init];
    
    bundle = [NXBundle bundleForClass:[MiscReadOnlyColorWell class]];
    [bundle getPath:buf 
            forResource:"ReadOnlyColorWellInspector" 
            ofType:"nib"];
    [NXApp loadNibFile:buf 
           owner:self 
           withNames:NO 
           fromZone:[self zone]];
    return self;
}

- ok:sender
{
	[object setColor:[colorWell color] ]; 
	[object setEnabled:![disabledSwitch state] ];
	[object setContinuous:[continuousSwitch state] ];
	[object setBordered:[borderedSwitch state] ];
	[object setReadOnly:[readOnlySwitch state] ];
	[borderedSwitch setState: [object isBordered] ];
	[object setTag:[tagForm intValue] ];
	[object display];
	[window display];
	return [super ok:sender];
}

- revert:sender;
{
	[colorWell setColor: [object color]];
	[disabledSwitch setState: ![object isEnabled] ];
	[continuousSwitch setState: [object isContinuous] ];
	[borderedSwitch setState: [object isBordered] ];
	[readOnlySwitch setState: [object isReadOnly] ];
	[tagForm setIntValue: [object tag] ];
	[window display];
	return [super revert:sender];
}

@end

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