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