// // PSTableView.m // Perforce // // Created by Adam Czubernat on 17/12/2013. // Copyright (c) 2013 Perforce Software, Inc. All rights reserved. // #import "PSTableView.h" @implementation PSTableView - (void)draggingSession:(NSDraggingSession *)session endedAtPoint:(NSPoint)screenPoint operation:(NSDragOperation)operation { CGRect rect = [[self superview] convertRect:self.frame toView:nil]; rect = [self.window convertRectToScreen:rect]; if (!CGRectContainsPoint(rect, screenPoint)) NSShowAnimationEffect(NSAnimationEffectPoof, screenPoint, CGSizeZero, nil, nil, NULL); [super draggingSession:session endedAtPoint:screenPoint operation:operation]; } - (void)draggingSession:(NSDraggingSession *)session movedToPoint:(NSPoint)screenPoint { CGRect rect = [[self superview] convertRect:self.frame toView:nil]; rect = [self.window convertRectToScreen:rect]; BOOL inside = CGRectContainsPoint(rect, screenPoint); [inside ? [NSCursor arrowCursor] : [NSCursor disappearingItemCursor] set]; [session setAnimatesToStartingPositionsOnCancelOrFail:inside]; } @end
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 15071 | alan_petersen |
Populate -o //guest/perforce_software/piper/... //guest/alan_petersen/piper/.... |
||
//guest/perforce_software/piper/mac/main/Perforce/Classes/Views/PSTableView.m | |||||
#1 | 11252 | alan_petersen | Rename/move file(s) | ||
//guest/perforce_software/piper/mac/Perforce/Classes/Views/PSTableView.m | |||||
#1 | 10744 | alan_petersen | Rename/move file(s) | ||
//guest/perforce_software/piper/Perforce/Classes/Views/PSTableView.m | |||||
#1 | 8919 | Matt Attaway | Initial add of Piper, a lightweight Perforce client for artists and designers. |