//
//  MyTrackingButton.m
//  CellTracking
//
//  Created by H. Nikolaus Schaller on 20.04.07.
//  Copyright 2007 __MyCompanyName__. All rights reserved.
//

#import "MyTrackingButton.h"


@implementation MyTrackingButton

- (BOOL)startTrackingAt:(NSPoint)startPoint inView:(NSView *)controlView
{
	NSLog(@"startTrackingAt:%@", NSStringFromPoint(startPoint));
	BOOL b=[super startTrackingAt:startPoint inView:controlView];
	NSLog(@"  -> %@", b?@"YES":@"NO");
	return b;
}

- (BOOL)continueTracking:(NSPoint)lastPoint at:(NSPoint)currentPoint inView:(NSView *)controlView
{
	NSLog(@"continueTracking:%@ at:%@", NSStringFromPoint(lastPoint), NSStringFromPoint(currentPoint));
	BOOL b=[super continueTracking:lastPoint at:currentPoint inView:controlView];
	NSLog(@"  -> %@", b?@"YES":@"NO");
	return b;
}

- (void)stopTracking:(NSPoint)lastPoint at:(NSPoint)stopPoint inView:(NSView *)controlView mouseIsUp:(BOOL)flag
{
	NSLog(@"stopTracking:%@ at:%@ mouseIsUp:%@", NSStringFromPoint(lastPoint), NSStringFromPoint(stopPoint), flag?@"YES":@"NO");
	[super stopTracking:lastPoint at:stopPoint inView:controlView mouseIsUp:flag];
	NSLog(@"  -> done");
}

- (BOOL)trackMouse:(NSEvent *)theEvent inRect:(NSRect)cellFrame ofView:(NSView *)controlView untilMouseUp:(BOOL)untilMouseUp
{
	NSLog(@"trackMouse: inRect:%@ untiMouseUp:%@", NSStringFromRect(cellFrame), untilMouseUp?@"YES":@"NO");
	BOOL b=[super trackMouse:theEvent inRect:cellFrame ofView:controlView untilMouseUp:untilMouseUp];
	NSLog(@"  -> %@", b?@"YES":@"NO");
	return b;
}

@end
