5 // Created by Alex Rozanski on 05/09/2009.
6 // Copyright 2009-10 Alex Rozanski http://perspx.com
9 #import <Cocoa/Cocoa.h>
10 #import "CompatibilityFixes.h"
12 #import "PXSourceListDelegate.h"
13 #import "PXSourceListDataSource.h"
15 @interface PXSourceList
: NSOutlineView
<NSOutlineViewDelegate
, NSOutlineViewDataSource
>
17 id
<PXSourceListDelegate
> _secondaryDelegate
; //Used to store the publicly visible delegate
18 id
<PXSourceListDataSource
> _secondaryDataSource
; //Used to store the publicly visible data source
20 NSSize _iconSize
; //The size of icons in the Source List. Defaults to 16x16
23 @
property (nonatomic
) NSSize iconSize
;
25 @
property (assign
) id
<PXSourceListDataSource
> dataSource
;
26 @
property (assign
) id
<PXSourceListDelegate
> delegate
;
28 - (NSUInteger
)numberOfGroups
; //Returns the number of groups in the Source List
29 - (BOOL
)isGroupItem
:(id
)item
; //Returns whether `item` is a group
30 - (BOOL
)isGroupAlwaysExpanded
:(id
)group
; //Returns whether `group` is displayed as always expanded
32 - (BOOL
)itemHasBadge
:(id
)item
; //Returns whether `item` has a badge
33 - (NSInteger
)badgeValueForItem
:(id
)item
; //Returns the badge value for `item`