#import "STBrowserDelegate.h"

@implementation STNormalBrowserDelegate

- (BOOL)browser:sender columnIsValid:(int)column 
{
	return YES;
}

- browserWillScroll:sender
{
	if (stObject)
	{
		OOP selector, arg1;
		selector = symbolToOOP(sel_getName(_cmd));
		arg1 = cObjectToOOP(sender);
		msgSend(stObject, selector, arg1, nil);
	}
	return self;
}

- browserDidScroll:sender
{
	if (stObject)
	{
		OOP selector, arg1;
		selector = symbolToOOP(sel_getName(_cmd));
		arg1 = cObjectToOOP(sender);
		msgSend(stObject, selector, arg1, nil);
	}
	return self;
}

- (const char *)browser:sender titleOfColumn:(int)column 
{
	if (stObject)
	{
		OOP result, selector, arg1, arg2;
		selector = symbolToOOP(sel_getName(_cmd));
		arg1 = cObjectToOOP(sender);
		arg2 = intToOOP(column);
		result = msgSend(stObject, selector, arg1, arg2, nil);
		return (const char *)OOPToString(result);
	}
	return "";
}

- (BOOL)browser:sender selectCell:(const char *)title inColumn:(int)column 
{
	if (stObject)
	{
	
	}
	return NO;
}

- (int)browser:sender fillMatrix:matrix inColumn:(int)column 
{
	if (stObject)
	{
		OOP result, selector, arg1, arg2, arg3;
		
		selector = symbolToOOP(sel_getName(_cmd));
		arg1 = cObjectToOOP(sender);
		arg2 = cObjectToOOP(matrix);
		arg3 = intToOOP(column);
		result = msgSend(stObject, selector, arg1, arg2, arg3, nil);
		return OOPToInt(result);
	}
	return 0;
}

@end

@implementation STLazyBrowserDelegate

- (BOOL)browser:sender columnIsValid:(int)column
{
	if (stObject)
	{
	
	}
	return YES;
}

- browserWillScroll:sender 
{
	if (stObject)
	{
	
	}
	return self;
}

- browserDidScroll:sender 
{
	if (stObject)
	{
	
	}
	return self;
}

- (const char *)browser:sender titleOfColumn:(int)column
{
	if (stObject)
	{
	
	}
	return "Broken";
}

- (BOOL)browser:sender selectCell:(const char *)title inColumn:(int)column 
{
	if (stObject)
	{
	
	}
	return NO;
}

- browser:sender loadCell:cell atRow:(int)row inColumn:(int)column 
{
	if (stObject)
	{
	
	}
	return self;
}

- (int)browser:sender fillMatrix:matrix inColumn:(int)column 
{
	if (stObject)
	{
	
	}
	return 0;
}

@end

@implementation STVeryLazyBrowserDelegate

- (BOOL)browser:sender columnIsValid:(int)column 
{
	if (stObject)
	{
	
	}
	return YES;
}

- browserWillScroll:sender 
{
	if (stObject)
	{
	
	}
	return self;
}

- browserDidScroll:sender 
{
	if (stObject)
	{
	
	}
	return self;
}

- (const char *)browser:sender titleOfColumn:(int)column 
{
	if (stObject)
	{
	
	}
	return "Browser";
}

- (BOOL)browser:sender selectCell:(const char *)title inColumn:(int)column
{
	if (stObject)
	{
	
	}
	return NO;
}

- browser:sender loadCell:cell atRow:(int)row inColumn:(int)column 
{
	if (stObject)
	{
	
	}
	return self;
}

- (int)browser:sender getNumRowsInColumn:(int)column 
{
	if (stObject)
	{
	
	}
	return 0;
}

@end

