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

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

//
//	MiscProgressViewInspector.m -- a simple view class for displaying progress
//		Written originally by Don Yacktman Copyright (c) 1993 by James Heiser.
//				This file is maintained 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 "MiscProgressViewInspector.h"
#define MISC_TOP_LEVEL
#import "MiscProgressView.subproj/MiscProgressView.h"

@implementation MiscProgressViewInspector

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

- ok:sender
{
    if (sender == stepSlider) {
        [object setStepSize:[stepSlider intValue]];
        [stepText setIntValue:[stepSlider intValue]];
    } 
    else if (sender == stepText) {
        [object setStepSize:[stepText intValue]];
        [stepSlider setIntValue:[stepText intValue]];
    }
	[object setBackgroundColor:[backgroundColorWell color]];
	[object setForegroundColor:[foregroundColorWell color]];
	[object setBorderColor:[borderColorWell color]];
	return [super ok:sender];
}

- revert:sender
{
	int step = [object stepSize];
	[stepSlider setIntValue:step];
	[stepText setIntValue:step];
	[backgroundColorWell setColor:[object backgroundColor]];
	[foregroundColorWell setColor:[object foregroundColor]];
	[borderColorWell setColor:[object borderColor]];
	return [super revert:sender];
}

- (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.