2 // PXSourceListDataSource.h
5 // Created by Alex Rozanski on 17/10/2009.
6 // Copyright 2009-10 Alex Rozanski http://perspx.com
9 #import <Cocoa/Cocoa.h>
13 @protocol PXSourceListDataSource
<NSObject
>
16 - (NSUInteger
)sourceList
:(PXSourceList
*)sourceList numberOfChildrenOfItem
:(id
)item
;
17 - (id
)sourceList
:(PXSourceList
*)aSourceList child
:(NSUInteger
)index ofItem
:(id
)item
;
18 - (id
)sourceList
:(PXSourceList
*)aSourceList objectValueForItem
:(id
)item
;
19 - (BOOL
)sourceList
:(PXSourceList
*)aSourceList isItemExpandable
:(id
)item
;
22 - (void)sourceList
:(PXSourceList
*)aSourceList setObjectValue
:(id
)object forItem
:(id
)item
;
24 - (BOOL
)sourceList
:(PXSourceList
*)aSourceList itemHasBadge
:(id
)item
;
25 - (NSInteger
)sourceList
:(PXSourceList
*)aSourceList badgeValueForItem
:(id
)item
;
26 - (NSColor
*)sourceList
:(PXSourceList
*)aSourceList badgeTextColorForItem
:(id
)item
;
27 - (NSColor
*)sourceList
:(PXSourceList
*)aSourceList badgeBackgroundColorForItem
:(id
)item
;
29 - (BOOL
)sourceList
:(PXSourceList
*)aSourceList itemHasIcon
:(id
)item
;
30 - (NSImage
*)sourceList
:(PXSourceList
*)aSourceList iconForItem
:(id
)item
;
32 //The rest of these methods are basically "wrappers" for the NSOutlineViewDataSource methods
33 - (id
)sourceList
:(PXSourceList
*)aSourceList itemForPersistentObject
:(id
)object
;
34 - (id
)sourceList
:(PXSourceList
*)aSourceList persistentObjectForItem
:(id
)item
;
36 - (BOOL
)sourceList
:(PXSourceList
*)aSourceList writeItems
:(NSArray
*)items toPasteboard
:(NSPasteboard
*)pboard
;
37 - (NSDragOperation
)sourceList
:(PXSourceList
*)sourceList validateDrop
:(id
< NSDraggingInfo
>)info proposedItem
:(id
)item proposedChildIndex
:(NSInteger
)index
;
38 - (BOOL
)sourceList
:(PXSourceList
*)aSourceList acceptDrop
:(id
< NSDraggingInfo
>)info item
:(id
)item childIndex
:(NSInteger
)index
;
39 - (NSArray
*)sourceList
:(PXSourceList
*)aSourceList namesOfPromisedFilesDroppedAtDestination
:(NSURL
*)dropDestination forDraggedItems
:(NSArray
*)items
;