Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions ThirdParty/PSMTabBarControl/source/PSMTabBarCell.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,17 @@
@property(nonatomic) PSMProgress progress;
@property(nonatomic) BOOL isProcessing;
@property(nonatomic, assign) BOOL isPinned;
@property(nonatomic, assign) BOOL isGroupHeader;
@property(nonatomic, assign) BOOL isGroupMember;
@property(nonatomic, assign) BOOL isGroupCollapsed;
@property(nonatomic, assign) BOOL isGroupActive;
@property(nonatomic, assign) BOOL isMultiSelected;
@property(nonatomic, assign) CGFloat cellAlpha;
@property(nonatomic, assign) CGFloat cellSlideOffset;
@property(nonatomic, assign) BOOL isAnimatingCollapse;
@property(nonatomic, copy, nullable) NSString *groupName;
@property(nonatomic, retain, nullable) NSColor *groupColor;
@property(nonatomic, assign) NSInteger groupMemberCount;

// creation/destruction
- (id)initWithControlView:(PSMTabBarControl *)controlView;
Expand Down
32 changes: 31 additions & 1 deletion ThirdParty/PSMTabBarControl/source/PSMTabBarCell.m
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,28 @@ @implementation PSMTabBarCell {
NSMutableArray<PSMCachedTitle *> *_subtitleCache;
NSTrackingArea *_cellTrackingArea;
NSTrackingArea *_closeButtonTrackingArea;
}
BOOL _isGroupHeader;
BOOL _isGroupMember;
BOOL _isGroupCollapsed;
BOOL _isGroupActive;
BOOL _isMultiSelected;
CGFloat _cellAlpha;
CGFloat _cellSlideOffset;
NSString *_groupName;
NSColor *_groupColor;
NSInteger _groupMemberCount;
}

@synthesize isGroupHeader = _isGroupHeader;
@synthesize isGroupMember = _isGroupMember;
@synthesize isGroupCollapsed = _isGroupCollapsed;
@synthesize isGroupActive = _isGroupActive;
@synthesize isMultiSelected = _isMultiSelected;
@synthesize cellAlpha = _cellAlpha;
@synthesize cellSlideOffset = _cellSlideOffset;
@synthesize groupName = _groupName;
@synthesize groupColor = _groupColor;
@synthesize groupMemberCount = _groupMemberCount;

#pragma mark - Creation/Destruction

Expand All @@ -203,6 +224,15 @@ - (id)initWithControlView:(PSMTabBarControl *)controlView {
_hasCloseButton = YES;
_modifierString = [@"" copy];
_truncationStyle = NSLineBreakByTruncatingTail;
_isGroupHeader = NO;
_isGroupMember = NO;
_isGroupCollapsed = NO;
_isGroupActive = NO;
_isMultiSelected = NO;
_cellAlpha = 1.0;
_groupName = nil;
_groupColor = nil;
_groupMemberCount = 0;
[self setUpAccessibilityElement];
}
return self;
Expand Down
11 changes: 11 additions & 0 deletions ThirdParty/PSMTabBarControl/source/PSMTabBarControl.h
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,11 @@ extern PSMTabBarControlOptionKey PSMTabBarControlOptionPUAFontProvider; // id<P
- (BOOL)tabViewShouldDragWindow:(NSTabView *)tabView event:(NSEvent *)event;
- (BOOL)tabViewShouldAllowDragOnAddTabButton:(NSTabView *)tabView;
- (CGFloat)tabViewDesiredTabBarHeight:(NSTabView *)tabView;
- (void)tabView:(NSTabView *)tabView didClickGroupHeaderTabViewItem:(NSTabViewItem *)tabViewItem;
- (void)tabView:(NSTabView *)tabView doubleClickGroupHeaderTabViewItem:(NSTabViewItem *)tabViewItem;
- (void)tabView:(NSTabView *)tabView willBeginDraggingGroupHeaderTabViewItem:(NSTabViewItem *)tabViewItem;
- (NSMenu *)tabView:(NSTabView *)tabView menuForGroupHeaderTabViewItem:(NSTabViewItem *)tabViewItem;
- (void)tabView:(NSTabView *)tabView groupTabViewItems:(NSArray<NSTabViewItem *> *)tabViewItems;

@end

Expand Down Expand Up @@ -225,10 +230,15 @@ typedef NS_ENUM(int, PSMTabPosition) {

// tab information
- (NSMutableArray *)representedTabViewItems;
- (NSMutableArray<PSMTabBarCell *> *)cells;
- (int)numberOfVisibleTabs;

// special effects
- (void)hideTabBar:(BOOL)hide animate:(BOOL)animate;
- (void)updateAnimated;
- (void)markNextInsertionsAsAnimated:(NSInteger)count;
- (void)beginCollapseAnimationForTabViewItems:(NSArray<NSTabViewItem *> *)items completion:(void (^)(void))completion;
- (void)cancelCollapseAnimation;
- (BOOL)isTabBarHidden;

// internal bindings methods also used by the tab drag assistant
Expand All @@ -240,6 +250,7 @@ typedef NS_ENUM(int, PSMTabPosition) {
// Internal inset. Ensures nothing but background is drawn in this are.
@property(nonatomic, assign) NSEdgeInsets insets;
@property(nonatomic) CGFloat height;
@property(nonatomic, assign) BOOL lastDragWasGroupHeader;

- (void)setTabColor:(NSColor *)aColor forTabViewItem:(NSTabViewItem *) tabViewItem;
- (NSColor*)tabColorForTabViewItem:(NSTabViewItem*)tabViewItem;
Expand Down
Loading
Loading