forked from jerrykrinock/ClassesObjC
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAMCollectionView.h
98 lines (67 loc) · 2.32 KB
/
AMCollectionView.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
//
// AMCollectionView.h
// AMCollectionViewTest
//
// Created by Andreas on 19.11.07.
// Copyright 2007 Andreas Mayer. All rights reserved.
//
// functionality is similar to NSCollectionView
// - handles rows only for now
// - no constraints for number of rows or view sizes
#import <Cocoa/Cocoa.h>
@class AMCollectionViewItem;
@interface AMCollectionView : NSControl {
IBOutlet AMCollectionViewItem *itemPrototype;
NSArray *backgroundColors;
NSArray *content;
BOOL selectable;
BOOL allowsMultipleSelection;
NSDictionary *am_itemsForObjects;
BOOL am_needsLayout;
NSData *am_archivedItemPrototype;
BOOL am_itemRespondsToSizeForViewWithProposedSize;
BOOL am_drawsBackground;
BOOL usesAlternatingRowBackgroundColors;
NSColor *selectedRowColor;
NSColor *secondarySelectedRowColor;
BOOL am_initializing;
CGFloat rowHeight;
BOOL am_isFirstResponder;
}
- (AMCollectionViewItem *)itemPrototype;
- (void)setItemPrototype:(AMCollectionViewItem *)value;
- (NSArray *)backgroundColors;
- (void)setBackgroundColors:(NSArray *)value;
- (CGFloat)rowHeight;
- (void)setRowHeight:(CGFloat)value;
- (NSArray *)content;
- (void)setContent:(NSArray *)value
itemClass:(Class)itemClass;
- (NSIndexSet *)selectionIndexes;
- (void)setSelectionIndexes:(NSIndexSet *)value;
- (BOOL)isSelectable;
- (void)setSelectable:(BOOL)value;
- (BOOL)allowsMultipleSelection;
- (void)setAllowsMultipleSelection:(BOOL)value;
- (BOOL)drawsBackground;
- (void)setDrawsBackground:(BOOL)value;
- (BOOL)usesAlternatingRowBackgroundColors;
- (void)setUsesAlternatingRowBackgroundColors:(BOOL)value;
- (NSColor *)selectedRowColor;
- (void)setSelectedRowColor:(NSColor *)value;
- (NSColor *)secondarySelectedRowColor;
- (void)setSecondarySelectedRowColor:(NSColor *)value;
- (BOOL)isFirstResponder;
- (AMCollectionViewItem *)newItemForRepresentedObject:(id)object;
- (AMCollectionViewItem *)itemForObject:(id)object;
- (id)objectForView:(NSView*)view ;
- (NSArray *)selectedObjects;
- (void)selectItemsForObjects:(NSArray *)objects;
- (void)deselectAll:(id)sender;
- (void)noteSizeForItemsChanged:(NSArray *)items;
- (void)scrollObjectToVisible:(id)object;
@end
APPKIT_EXTERN NSString *const AMCollectionViewSelectionDidChangeNotification;
@interface NSObject (AMCollectionViewDelegate)
- (void)collectionViewSelectionDidChange:(NSNotification *)aNotification;
@end