ftp.nice.ch/Attic/openStep/developer/resources/MiscKit.2.0.5.s.gnutar.gz#/MiscKit2/Temp/MiscProgressPalette2/MiscProgressBarInspector.m

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

//
//	MiscProgressBarInspector.m -- a simple view class for displaying progress
//		Written and Copyright (c) 1993 by James Heiser.  (jheiser@adobe.com)
//				Version 1.0.  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 "MiscProgressBarInspector.h"
#import "MiscProgressView.subproj/MiscProgressBar.h"

@implementation MiscProgressBarInspector

- init
{
	NSString	*buf;
	id	bundle;
    
	[super init];
    
	bundle = [NSBundle bundleForClass:[MiscProgressBar class]];
	buf = [bundle pathForResource:@"MiscProgressBarInspector" ofType:@"nib"];
	[NSBundle loadNibFile:[NSString stringWithCString:[buf cString]] externalNameTable:[NSDictionary dictionaryWithObjectsAndKeys:self, @"NSOwner", nil] withZone:[self zone]];

	return ( self );
}


- (void) ok:(id)sender
{
	[[self object] setTicsVisible:[theSwitch intValue]];
	[[self object] setTicsOverBar:[theSwitch2 intValue]];
	[[self object] setTickColor:[tickColorWell color]];
	[[self object] setNumTicks:[tickText intValue]];
	[[self object] setEmphasis:[emphasisText intValue]];

	[super ok:sender];

	return;
}


- (void) revert:(id)sender
{
	[theSwitch setState:[[self object] isTicsVisible]];
	[theSwitch2 setState:[[self object] isTicsOverBar]];
	[tickColorWell setColor:[[self object] tickColor]];
	[tickText setIntValue:[[self object] numTicks]];
	[emphasisText setIntValue:[[self object] emphasis]];

	[super revert:sender];

	return;
}


- (BOOL) wantsButtons
{
	return ( NO );
}

@end

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