]> git.sesse.net Git - vlc/blob - modules/gui/macosx/PXSourceListDataSource.h
macosx: do not allow playlist item deletion for sd modules
[vlc] / modules / gui / macosx / PXSourceListDataSource.h
1 //
2 //  PXSourceListDataSource.h
3 //  PXViewKit
4 //
5 //  Created by Alex Rozanski on 17/10/2009.
6 //  Copyright 2009-10 Alex Rozanski http://perspx.com
7 //
8
9 #import <Cocoa/Cocoa.h>
10
11 @class PXSourceList;
12
13 @protocol PXSourceListDataSource <NSObject>
14
15 @required
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;
20
21 @optional
22 - (void)sourceList:(PXSourceList*)aSourceList setObjectValue:(id)object forItem:(id)item;
23
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;
28
29 - (BOOL)sourceList:(PXSourceList*)aSourceList itemHasIcon:(id)item;
30 - (NSImage*)sourceList:(PXSourceList*)aSourceList iconForItem:(id)item;
31
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;
35
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;
40
41 @end