macosx: fixed playlist/video toggling and some memory leaks
[vlc.git] / modules / gui / macosx / PXSourceListDelegate.h
1 //
2 //  PXSourceListDelegate.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 PXSourceListDelegate <NSObject>
14
15 @optional
16 //Extra methods
17 - (BOOL)sourceList:(PXSourceList*)aSourceList isGroupAlwaysExpanded:(id)group;
18 - (NSMenu*)sourceList:(PXSourceList*)aSourceList menuForEvent:(NSEvent*)theEvent item:(id)item;
19
20 //Basically NSOutlineViewDelegate wrapper methods
21 - (BOOL)sourceList:(PXSourceList*)aSourceList shouldSelectItem:(id)item;
22 - (NSIndexSet*)sourceList:(PXSourceList*)aSourceList selectionIndexesForProposedSelection:(NSIndexSet *)proposedSelectionIndexes;
23
24 - (BOOL)sourceList:(PXSourceList*)aSourceList shouldEditItem:(id)item;
25
26 - (BOOL)sourceList:(PXSourceList*)aSourceList shouldTrackCell:(NSCell *)cell forItem:(id)item;
27
28 - (BOOL)sourceList:(PXSourceList*)aSourceList shouldExpandItem:(id)item;
29 - (BOOL)sourceList:(PXSourceList*)aSourceList shouldCollapseItem:(id)item;
30
31 - (CGFloat)sourceList:(PXSourceList*)aSourceList heightOfRowByItem:(id)item;
32
33 - (NSCell*)sourceList:(PXSourceList*)aSourceList willDisplayCell:(id)cell forItem:(id)item;
34 - (NSCell*)sourceList:(PXSourceList*)aSourceList dataCellForItem:(id)item;
35
36 @end
37
38 @interface NSObject (PXSourceListNotifications)
39
40 //Selection
41 - (void)sourceListSelectionIsChanging:(NSNotification *)notification;
42 - (void)sourceListSelectionDidChange:(NSNotification *)notification;
43
44 //Item expanding/collapsing
45 - (void)sourceListItemWillExpand:(NSNotification *)notification;
46 - (void)sourceListItemDidExpand:(NSNotification *)notification;
47 - (void)sourceListItemWillCollapse:(NSNotification *)notification;
48 - (void)sourceListItemDidCollapse:(NSNotification *)notification;
49
50 - (void)sourceListDeleteKeyPressedOnRows:(NSNotification *)notification;
51
52
53 @end
54
55 //PXSourceList delegate notifications
56 extern NSString * const PXSLSelectionIsChangingNotification;
57 extern NSString * const PXSLSelectionDidChangeNotification;
58 extern NSString * const PXSLItemWillExpandNotification;
59 extern NSString * const PXSLItemDidExpandNotification;
60 extern NSString * const PXSLItemWillCollapseNotification;
61 extern NSString * const PXSLItemDidCollapseNotification;
62 extern NSString * const PXSLDeleteKeyPressedOnRowsNotification;
63