Changeset 2039 for trunk/AICustomTabsView.m
- Timestamp:
- 10/21/04 14:14:19 (4 years ago)
- Files:
-
- trunk/AICustomTabsView.m (modified) (14 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/AICustomTabsView.m
r1823 r2039 154 154 allowsTabRearranging = inValue; 155 155 } 156 157 156 - (BOOL)allowsTabRearranging 158 157 { … … 229 228 //Account for shifting 230 229 if(currentIndex < newIndex) newIndex--; 231 230 232 231 //Move via a remove and add :( 233 232 [tabCell retain]; … … 235 234 [tabCellArray insertObject:tabCell atIndex:newIndex]; 236 235 [tabCell release]; 237 236 238 237 //Move the tab 239 238 ignoreTabNumberChange = YES; … … 356 355 357 356 //Create a new tab cell 358 tabCell = [AICustomTabCell customTabForTabViewItem:tabViewItem ];357 tabCell = [AICustomTabCell customTabForTabViewItem:tabViewItem customTabsView:self]; 359 358 [tabCell setSelected:(tabViewItem == [tabView selectedTabViewItem])]; 360 359 [tabCell setAllowsInactiveTabClosing:allowsInactiveTabClosing]; … … 434 433 int totalTabWidth; 435 434 int reducedWidth = 0; 436 floatreduceThreshold = 1000000;435 int reduceThreshold = 1000000; 437 436 438 437 //Get the total tab width … … 535 534 tabDivider = [[NSImage imageNamed:@"aquaTabDivider"] retain]; 536 535 tabBackground = [[NSImage imageNamed:@"aquaTabBackground"] retain]; 537 538 536 haveLoadedImages = YES; 539 537 } … … 625 623 AICustomTabCell *tabCell = [self tabAtPoint:clickLocation]; 626 624 627 [tabView selectTabViewItem:[tabCell tabViewItem]];628 629 625 //Pass this on to our delegate 630 626 if(tabCell && [delegate respondsToSelector:@selector(customTabView:menuForTabViewItem:)]){ … … 633 629 return(nil); 634 630 } 631 635 632 636 633 //Tooltip ------------------------------------------------------------------------------------------------------ … … 640 637 NSPoint location = [self convertPoint:point fromView:nil]; 641 638 AICustomTabCell *tabCell = [self tabAtPoint:location]; 642 643 //Pass this on to our delegate639 640 //Pass this on to our delegate 644 641 if(tabCell && [delegate respondsToSelector:@selector(customTabView:toolTipForTabViewItem:)]){ 645 642 return([delegate customTabView:self toolTipForTabViewItem:[tabCell tabViewItem]]); … … 661 658 if(tabCell = [self tabAtPoint:lastClickLocation]){ 662 659 if(![tabCell willTrackMouse:theEvent inRect:[tabCell frame] ofView:self]){ 663 // if(! ( [[[NSApplication sharedApplication] currentEvent] modifierFlags] & NSCommandKeyMask )){ //Allow background dragging660 // if(!( [[[NSApplication sharedApplication] currentEvent] modifierFlags] & NSCommandKeyMask )){ //Allow background dragging 664 661 [tabView selectTabViewItem:[tabCell tabViewItem]]; 665 662 // } … … 704 701 } 705 702 706 //Dragging -------------------------------------------------------------------------------------------------------------707 #pragma mark Dragging708 703 //Return the drag types we accept 709 704 - (NSArray *)acceptableDragTypes … … 824 819 [[AICustomTabDragging sharedInstance] setDestinationTabView:nil]; 825 820 [self smoothlyArrangeTabs]; 826 [self resetCursorTracking];827 821 828 822 //Pass event along to the windowController … … 907 901 while((tabCell = [enumerator nextObject])){ 908 902 NSRect trackRect = [tabCell frame]; 909 [tabCell addTrackingRects InView:self withFrame:trackRect cursorLocation:localPoint];903 [tabCell addTrackingRectsWithFrame:trackRect cursorLocation:localPoint]; 910 904 } 911 905 … … 923 917 enumerator = [tabCellArray objectEnumerator]; 924 918 while((tabCell = [enumerator nextObject])){ 925 [tabCell removeTrackingRects FromView:self];919 [tabCell removeTrackingRects]; 926 920 } 927 921
