ftp.nice.ch/pub/next/science/chemistry/BeakerBoy.0.31.s.tar.gz#/BeakerBoy.0.31.s/Inspector.subproj/AtomInspector.subproj/BBAtomGraphicsController.m

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

/* BBAtomGraphicsController.h				 
 *
 * This subclass of MiscInspector is in charge of the atom graphics
 * settings.
 *
 * For more interface-info see the header file. In depth information
 * can be found here in the source-code.
 *
 * Written by: 		Thomas Engel
 * Created:    		11.01.1994 (Copyleft)
 * Last modified: 	12.05.1994
 */

#import "BBAtomGraphicsController.h"
#import "../../BBAtom.h"

@implementation BBAtomGraphicsController

- colorDidChange:sender
{
	[self touch:self];
	return self;
}

- resetColor:sender
{
	// Here we set the color to the motherAtoms color!
	
	[colorWell setColor:[[[self selection] motherAtom] color]];
	[self colorDidChange:self];
	return self;
}

- ok:sender
{
	[[self selection] setColor:[colorWell color]];
	return [super ok:sender];
}

- revert:sender
{
	[super revert:sender];

	[colorWell setColor:[[self selection] color]];
	return self;
}

@end

/*
 * History: 12.05.94 Converted to fit BB... naming
 *
 *			11.01.94 First implementation.
 *
 *
 * Bugs: - There is a bug! Resetting the color does not remove the color 
 *		   inside the atom but only set its color to the motherAtoms color.
 *		   This is not nice! I have to include a check to the okRoutine.
 *
 *		 - Not really wrong. I know I could have cached the selection but it
 *		   is not necessary...so I saved the memory.
 */

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