1 #import "ROTableView.h"
4 @implementation ROTableView
7 [[self window] setAcceptsMouseMovedEvents:YES];
8 trackingTag = [self addTrackingRect:[self frame] owner:self userData:nil assumeInside:NO];
16 [self removeTrackingRect:trackingTag];
20 - (void)mouseEntered:(NSEvent*)theEvent
25 - (void)mouseMoved:(NSEvent*)theEvent
27 id myDelegate = [self delegate];
30 return; // No delegate, no need to track the mouse.
31 if (![myDelegate respondsToSelector:@selector(tableView:willDisplayCell:forTableColumn:row:)])
32 return; // If the delegate doesn't modify the drawing, don't track.
35 mouseOverRow = [self rowAtPoint:[self convertPoint:[theEvent locationInWindow] fromView:nil]];
37 if (lastOverRow == mouseOverRow)
40 [self setNeedsDisplayInRect:[self rectOfRow:lastOverRow]];
41 lastOverRow = mouseOverRow;
44 [self setNeedsDisplayInRect:[self rectOfRow:mouseOverRow]];
48 - (void)mouseExited:(NSEvent *)theEvent
51 [self setNeedsDisplayInRect:[self rectOfRow:mouseOverRow]];
61 - (void)viewDidEndLiveResize
63 [super viewDidEndLiveResize];
65 [self removeTrackingRect:trackingTag];
66 trackingTag = [self addTrackingRect:[self frame] owner:self userData:nil assumeInside:NO];