ftp.nice.ch/pub/next/tools/frontends/MPEGHelper.0.8.s.tar.gz#/MPEGHelper.0.8.s/Source/MHFilterTool.m

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

/* --------------------------------------------------------------------------

Class:			MHFilterTool
Version:		0.1
File:			MHFilterTool.m				 

Written by:		Thomas Engel
Created:		17.05.1995	(Copyleft)
Last modified:	17.05.1995


Note:	For a detailed description please read the class documentation.

 ------------------------------------------------------------------------- */

#import <MHFilterTool.h>

@implementation MHFilterTool

- image
{
	return [NXImage findImageNamed:"ConsoleScreen"];
}

- (BOOL)canProcess:aFile for:aController
{
	// Remember the controller. By default we handle no filetype.

	processController = aController;
	return NO;
}

- revert:sender
{
	return self;
}

- processInput:aPath forOutput:outPath
{
	return self;
}

- startProcessing:sender
{
	if( processController )
	{
		if( !activeShell )
			activeShell = [processController sharedShell];
	
		if( [processController toolWillStartProcessing:self] == nil )
		{
			NXBeep();
			return nil;
		}
		isProcessing = YES;
		[self processInput:[processController filename]
				forOutput:[processController outputFilename]];
	}
	return self;
}

- stopProcessing:sender
{
	// Only if we really are active..otherwise we might terminate another
	// tools shell !

	if( activeShell &&
		isProcessing )
	{
		[activeShell terminate:self];
		isProcessing = NO;
		[processController toolDidStopProcessing:self];
	}
	return self;
}

- (BOOL)isProcessing
{
	// We really should take care if the shell is still running. No reason
	// to maintain that internal state.

	return isProcessing;
}

- willSwapIn
{
	[self revert:self];
	return self;
}

@end

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