2005-06-29 15:53:00 +00:00
|
|
|
#import "TrackingCell.h"
|
|
|
|
|
|
|
|
@implementation TrackingCell
|
|
|
|
|
|
|
|
- (BOOL)startTrackingAt:(NSPoint)startPoint inView:(NSView *)controlView
|
|
|
|
{
|
|
|
|
tracking = YES;
|
|
|
|
return [super startTrackingAt:startPoint inView:controlView];
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2009-02-22 22:28:09 +00:00
|
|
|
|
|
|
|
- (BOOL)continueTracking:(NSPoint)lastPoint at:(NSPoint)currentPoint inView:(NSView *)controlView
|
|
|
|
{
|
2018-06-28 10:59:59 +00:00
|
|
|
NSEvent *event = [NSEvent mouseEventWithType:NSEventTypeLeftMouseDragged location:currentPoint modifierFlags:0 timestamp:0 windowNumber:[[controlView window] windowNumber] context:nil eventNumber:0 clickCount:0 pressure:0];
|
2009-02-22 22:28:09 +00:00
|
|
|
|
|
|
|
[controlView mouseDragged:event];
|
|
|
|
|
|
|
|
return [super continueTracking:lastPoint at:currentPoint inView:controlView];
|
|
|
|
}
|
|
|
|
|
2005-06-29 15:53:00 +00:00
|
|
|
- (void)stopTracking:(NSPoint)lastPoint at:(NSPoint)stopPoint inView:(NSView *)controlView mouseIsUp:(BOOL)flag
|
|
|
|
{
|
|
|
|
tracking = NO;
|
|
|
|
|
|
|
|
[super stopTracking:lastPoint at:stopPoint inView:controlView mouseIsUp:flag];
|
|
|
|
}
|
|
|
|
|
2009-02-22 22:28:09 +00:00
|
|
|
- (BOOL)isTracking
|
2005-06-29 15:53:00 +00:00
|
|
|
{
|
|
|
|
return tracking;
|
|
|
|
}
|
|
|
|
|
|
|
|
@end
|