forked from arbales/SDListView
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSDListView.h
58 lines (40 loc) · 1.36 KB
/
SDListView.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
//
// SDListView.h
// SingleListExample
//
// Created by Steven Degutis on 10/26/09.
//
/* Notes:
* (1) I am starting to love this new style of commenting
* (2) "Multiple Selection" is not yet implemented
*/
#import <Cocoa/Cocoa.h>
@class SDListViewItem;
@interface SDListView : NSView {
NSArray *content;
SDListViewItem *prototypeItem;
NSArray *sortDescriptors;
NSMutableArray *observers;
NSMutableArray *listViewItems;
NSMutableArray *viewsThatShouldOnlyFadeIn;
CGFloat topPadding;
CGFloat bottomPadding;
BOOL selectable;
BOOL allowsMultipleSelection;
NSUInteger initialDraggingIndex;
int selectionFellOfSide;
}
@property (readwrite, copy) NSArray *sortDescriptors;
@property (readwrite, copy) NSArray *content;
@property (readwrite, retain) IBOutlet SDListViewItem *prototypeItem;
@property (readwrite) CGFloat topPadding;
@property (readwrite) CGFloat bottomPadding;
@property (readwrite, getter=isSelectable, setter=setSelectable:) BOOL selectable;
@property (readwrite) BOOL allowsMultipleSelection;
@property (readwrite, retain) NSIndexSet *selectionIndexes;
// default impl. just copies self.prototypeItem and sets its repObject
- (SDListViewItem*) newItemForRepresentedObject:(id)object;
- (NSUInteger) indexOfItem:(SDListViewItem*)item;
- (SDListViewItem*) itemAtIndex:(NSUInteger)index;
- (NSRect) frameForItemAtIndex:(NSUInteger)index;
@end