
#import "STSplitViewDelegate.h"

@implementation STSplitViewDelegate

+ (int)forwardToSmalltalk:(SEL)aSelector
{
	if (aSelector == _cmd || sel_getUid("splitView:getMinY:maxY:ofSubviewAt:") == aSelector) 
		return 0;
	return 1;
}

/*
- splitView:sender resizeSubviews:(const NXSize *)oldSize 
{
	if (stObject)
		msgSend(stObject, symbolToOOP(sel_getName(_cmd)), cObjectToOOP(sender), nil);
	return self;
}
*/

- splitView:sender getMinY:(NXCoord *)minY maxY:(NXCoord *)maxY ofSubviewAt:(int)offset 
{
	*minY = [self splitView:sender minYOfSubviewAt:offset];
	*maxY = [self splitView:sender maxYOfSubviewAt:offset];
	return self;
}

- (float)splitView:sender minYOfSubviewAt:(int)offset 
{
	if (stObject)
	{
		OOP	result;
		result = msgSend(stObject, symbolToOOP(sel_getName(_cmd)), cObjectToOOP(sender), intToOOP(offset), nil);
		return OOPToFloat(result);
	}
	return 1000.0;
}

- (float)splitView:sender maxYOfSubviewAt:(int)offset 
{
	if (stObject)
	{
		OOP	result;
		result = msgSend(stObject, symbolToOOP(sel_getName(_cmd)), cObjectToOOP(sender), intToOOP(offset), nil);
		return OOPToFloat(result);
	}
	return 1000.0;
}

- splitViewDidResizeSubviews:sender
{
	if (stObject)
		msgSend(stObject, symbolToOOP(sel_getName(_cmd)), cObjectToOOP(sender), nil);
	return self;
}

@end

