| 1 |
|
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 |
|
|---|
| 9 |
|
|---|
| 10 |
|
|---|
| 11 |
|
|---|
| 12 |
|
|---|
| 13 |
|
|---|
| 14 |
|
|---|
| 15 |
|
|---|
| 16 |
#import "ESFloater.h" |
|---|
| 17 |
#define TAB_CELL_IDENTIFIER @"Tab Cell Identifier" |
|---|
| 18 |
|
|---|
| 19 |
@class AICustomTabCell, AICustomTabsView; |
|---|
| 20 |
|
|---|
| 21 |
@interface NSObject (AICustomTabsViewDelegate) |
|---|
| 22 |
- (void)customTabView:(AICustomTabsView *)tabView didSelectTabViewItem:(NSTabViewItem *)tabViewItem; |
|---|
| 23 |
- (void)customTabView:(AICustomTabsView *)tabView closeTabViewItem:(NSTabViewItem *)tabViewItem; |
|---|
| 24 |
- (void)customTabViewDidChangeNumberOfTabViewItems:(AICustomTabsView *)tabView; |
|---|
| 25 |
- (void)customTabViewDidChangeOrderOfTabViewItems:(AICustomTabsView *)tabView; |
|---|
| 26 |
- (void)customTabView:(AICustomTabsView *)tabView didMoveTabViewItem:(NSTabViewItem *)tabViewItem toCustomTabView:(AICustomTabsView *)destTabView index:(int)index screenPoint:(NSPoint)point; |
|---|
| 27 |
- (NSMenu *)customTabView:(AICustomTabsView *)tabView menuForTabViewItem:(NSTabViewItem *)tabViewItem; |
|---|
| 28 |
- (NSString *)customTabView:(AICustomTabsView *)tabView toolTipForTabViewItem:(NSTabViewItem *)tabViewItem; |
|---|
| 29 |
- (BOOL)customTabView:(AICustomTabsView *)tabView didAcceptDragPasteboard:(NSPasteboard *)pasteboard onTabViewItem:(NSTabViewItem *)tabViewItem; |
|---|
| 30 |
- (NSArray *)customTabViewAcceptableDragTypes:(AICustomTabsView *)tabView; |
|---|
| 31 |
- (int)customTabView:(AICustomTabsView *)tabView indexForInsertingTabViewItem:(NSTabViewItem *)tabViewItem; |
|---|
| 32 |
@end |
|---|
| 33 |
|
|---|
| 34 |
@interface AICustomTabsView : NSView { |
|---|
| 35 |
IBOutlet NSTabView *tabView; |
|---|
| 36 |
|
|---|
| 37 |
id delegate; |
|---|
| 38 |
BOOL allowsInactiveTabClosing; |
|---|
| 39 |
BOOL allowsTabRearranging; |
|---|
| 40 |
BOOL trackingCursor; |
|---|
| 41 |
BOOL ignoreTabNumberChange; |
|---|
| 42 |
|
|---|
| 43 |
|
|---|
| 44 |
BOOL removingLastTabHidesWindow; |
|---|
| 45 |
int tabGapWidth; |
|---|
| 46 |
int tabGapIndex; |
|---|
| 47 |
NSPoint lastClickLocation; |
|---|
| 48 |
NSTimer *arrangeCellTimer; |
|---|
| 49 |
|
|---|
| 50 |
|
|---|
| 51 |
NSMutableArray *tabCellArray; |
|---|
| 52 |
AICustomTabCell *selectedCustomTabCell; |
|---|
| 53 |
|
|---|
| 54 |
|
|---|
| 55 |
AICustomTabCell *dragCell; |
|---|
| 56 |
} |
|---|
| 57 |
|
|---|
| 58 |
|
|---|
| 59 |
- (void)setDelegate:(id)inDelegate; |
|---|
| 60 |
- (id)delegate; |
|---|
| 61 |
|
|---|
| 62 |
|
|---|
| 63 |
- (void)setRemovingLastTabHidesWindow:(BOOL)inValue; |
|---|
| 64 |
- (BOOL)removingLastTabHidesWindow; |
|---|
| 65 |
|
|---|
| 66 |
|
|---|
| 67 |
- (void)setAllowsInactiveTabClosing:(BOOL)inValue; |
|---|
| 68 |
- (BOOL)allowsInactiveTabClosing; |
|---|
| 69 |
|
|---|
| 70 |
|
|---|
| 71 |
- (void)setAllowsTabRearranging:(BOOL)inValue; |
|---|
| 72 |
- (BOOL)allowsTabRearranging; |
|---|
| 73 |
|
|---|
| 74 |
|
|---|
| 75 |
- (void)redisplayTabForTabViewItem:(NSTabViewItem *)inTabViewItem; |
|---|
| 76 |
- (void)resizeTabForTabViewItem:(NSTabViewItem *)inTabViewItem; |
|---|
| 77 |
- (void)moveTab:(NSTabViewItem *)tabViewItem toIndex:(int)index; |
|---|
| 78 |
- (int)numberOfTabViewItems; |
|---|
| 79 |
|
|---|
| 80 |
|
|---|
| 81 |
- (void)rebuildTabCells; |
|---|
| 82 |
- (AICustomTabCell *)tabAtPoint:(NSPoint)clickLocation; |
|---|
| 83 |
- (int)totalWidthOfTabs; |
|---|
| 84 |
- (void)moveTab:(NSTabViewItem *)tabViewItem toIndex:(int)index selectTab:(BOOL)shouldSelect animate:(BOOL)animate; |
|---|
| 85 |
- (int)numberOfTabViewItems; |
|---|
| 86 |
- (void)closeTab:(AICustomTabCell *)tabCell; |
|---|
| 87 |
- (void)closeAllTabsExceptFor:(AICustomTabCell *)targetCell; |
|---|
| 88 |
- (void)drawBackgroundInRect:(NSRect)rect withFrame:(NSRect)viewFrame selectedTabRect:(NSRect)tabFrame; |
|---|
| 89 |
- (void)resetCursorTracking; |
|---|
| 90 |
- (AICustomTabCell *)tabCellForTabViewItem:(NSTabViewItem *)tabViewItem; |
|---|
| 91 |
|
|---|
| 92 |
@end |
|---|
| 93 |
|
|---|