blob: 826ebbccd794a346a067c5062b8a396d6eba5b50 (
plain)
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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
|
{ Parsed from Appkit.framework NSCollectionView.h }
{$ifdef TYPES}
{$ifndef NSCOLLECTIONVIEW_PAS_T}
{$define NSCOLLECTIONVIEW_PAS_T}
{ Types }
type
NSCollectionViewDropOperation = NSInteger;
NSCollectionViewDropOperationPtr = ^NSCollectionViewDropOperation;
{ Constants }
const
NSCollectionViewDropOn = 0;
NSCollectionViewDropBefore = 1;
{$endif}
{$endif}
{$ifdef RECORDS}
{$ifndef NSCOLLECTIONVIEW_PAS_R}
{$define NSCOLLECTIONVIEW_PAS_R}
{$endif}
{$endif}
{$ifdef FUNCTIONS}
{$ifndef NSCOLLECTIONVIEW_PAS_F}
{$define NSCOLLECTIONVIEW_PAS_F}
{$endif}
{$endif}
{$ifdef EXTERNAL_SYMBOLS}
{$ifndef NSCOLLECTIONVIEW_PAS_S}
{$define NSCOLLECTIONVIEW_PAS_S}
{$endif}
{$endif}
{$ifdef FORWARD}
NSCollectionViewDelegateProtocol = objcprotocol;
NSCollectionViewItem = objcclass;
NSCollectionViewItemPointer = ^NSCollectionViewItem;
NSCollectionViewItemPtr = NSCollectionViewItemPointer;
NSCollectionView = objcclass;
NSCollectionViewPointer = ^NSCollectionView;
NSCollectionViewPtr = NSCollectionViewPointer;
{$endif}
{$ifdef CLASSES}
{$ifndef NSCOLLECTIONVIEW_PAS_C}
{$define NSCOLLECTIONVIEW_PAS_C}
{ NSCollectionViewItem }
NSCollectionViewItem = objcclass external (NSViewController, NSCopyingProtocol)
private
_collectionView: NSCollectionView;
__cviFlags: record
case byte of
0: (_anonbitfield_NSCollectionView0: cuint);
1: (data: bitpacked record
_isSelected: 0..1;
suppressSelectionChangedNotification: 0..1;
connectionsCopied: 0..1;
reserved: 0..((1 shl 29)-1);
end;
);
end;
_cachedArchive: NSData;
_reserved2: Pointer;
public
function collectionView: NSCollectionView; message 'collectionView';
procedure setSelected(flag: Boolean); message 'setSelected:';
function isSelected: Boolean; message 'isSelected';
{ Adopted Protocols }
function copyWithZone(zone_: NSZonePtr): id;
end;
{ NSCollectionView }
NSCollectionView = objcclass external (NSView)
private
_content: NSArray;
_selectionIndexes: NSMutableIndexSet;
_itemPrototype: NSCollectionViewItem;
_minItemSize: NSSize;
_maxItemSize: NSSize;
_maxGridRows: NSUInteger;
_maxGridColumns: NSUInteger;
_backgroundColors: NSArray;
_displayedItems: NSMutableArray;
_animationDuration: NSTimeInterval;
__cvFlags: record
case byte of
0: (_anonbitfield_NSCollectionView1: cuint);
1: (data: bitpacked record
_isFirstResponder: 0..1;
invalidateItemViews: 0..1;
selectable: 0..1;
_allowsMultipleSelection: 0..1;
avoidsEmptySelection: 0..1;
superviewIsClipView: 0..1;
needsUpdateGrid: 0..1;
needsUpdateBackground: 0..1;
gridSettingsNeedUpdate: 0..1;
guardSetFrameSize: 0..1;
canDisplayItems: 0..1;
animateForDrag: 0..1;
unarchiving: 0..1;
reserved: 0..((1 shl 19)-1);
end;
);
end;
_delegate: id;
_backgroundLayers: NSMutableArray;
_storedFrameSize: NSSize;
_cachedNib: NSNib;
_animTimer: NSTimer;
_removedItems: NSArray;
_resizeTimer: NSTimer;
_draggedIndexes: NSIndexSet;
_draggingSourceOperationMaskForLocal: NSDragOperation;
_draggingSourceOperationMaskForNonLocal: NSDragOperation;
_currentDropIndex: NSInteger;
_currentDropSpaceIndex: NSInteger;
_shiftRow: NSInteger;
_currentDragOperation: NSDragOperation;
_currentDropOperation: NSCollectionViewDropOperation;
_dragTimer: NSTimer;
_private: id;
_reserved: array[0..(16)-1] of Pointer;
public
procedure setDelegate(aDelegate: NSCollectionViewDelegateProtocol); message 'setDelegate:';
function delegate: NSCollectionViewDelegateProtocol; message 'delegate';
function isFirstResponder: Boolean; message 'isFirstResponder';
procedure setContent(content_: NSArray); message 'setContent:';
function content: NSArray; message 'content';
procedure setSelectable(flag: Boolean); message 'setSelectable:';
function isSelectable: Boolean; message 'isSelectable';
procedure setAllowsMultipleSelection(flag: Boolean); message 'setAllowsMultipleSelection:';
function allowsMultipleSelection: Boolean; message 'allowsMultipleSelection';
procedure setSelectionIndexes(indexes: NSIndexSet); message 'setSelectionIndexes:';
function selectionIndexes: NSIndexSet; message 'selectionIndexes';
function newItemForRepresentedObject(object_: id): NSCollectionViewItem; message 'newItemForRepresentedObject:';
procedure setItemPrototype(prototype: NSCollectionViewItem); message 'setItemPrototype:';
function itemPrototype: NSCollectionViewItem; message 'itemPrototype';
procedure setMaxNumberOfRows(number: NSUInteger); message 'setMaxNumberOfRows:';
function maxNumberOfRows: NSUInteger; message 'maxNumberOfRows';
procedure setMaxNumberOfColumns(number: NSUInteger); message 'setMaxNumberOfColumns:';
function maxNumberOfColumns: NSUInteger; message 'maxNumberOfColumns';
procedure setMinItemSize(size: NSSize); message 'setMinItemSize:';
function minItemSize: NSSize; message 'minItemSize';
procedure setMaxItemSize(size: NSSize); message 'setMaxItemSize:';
function maxItemSize: NSSize; message 'maxItemSize';
procedure setBackgroundColors(colors: NSArray); message 'setBackgroundColors:';
function backgroundColors: NSArray; message 'backgroundColors';
function itemAtIndex(index: NSUInteger): NSCollectionViewItem; message 'itemAtIndex:';
function frameForItemAtIndex(index: NSUInteger): NSRect; message 'frameForItemAtIndex:';
procedure setDraggingSourceOperationMask_forLocal(dragOperationMask: NSDragOperation; localDestination: Boolean); message 'setDraggingSourceOperationMask:forLocal:';
function draggingImageForItemsAtIndexes_withEvent_offset(indexes: NSIndexSet; event: NSEvent; dragImageOffset: NSPointPointer): NSImage; message 'draggingImageForItemsAtIndexes:withEvent:offset:';
end;
{$endif}
{$endif}
{$ifdef PROTOCOLS}
{$ifndef NSCOLLECTIONVIEW_PAS_P}
{$define NSCOLLECTIONVIEW_PAS_P}
{ NSCollectionViewDelegate Protocol }
NSCollectionViewDelegateProtocol = objcprotocol external name 'NSCollectionViewDelegate'
optional
function collectionView_canDragItemsAtIndexes_withEvent(collectionView: NSCollectionView; indexes: NSIndexSet; event: NSEvent): Boolean; message 'collectionView:canDragItemsAtIndexes:withEvent:';
function collectionView_writeItemsAtIndexes_toPasteboard(collectionView: NSCollectionView; indexes: NSIndexSet; pasteboard: NSPasteboard): Boolean; message 'collectionView:writeItemsAtIndexes:toPasteboard:';
function collectionView_namesOfPromisedFilesDroppedAtDestination_forDraggedItemsAtIndexes(collectionView: NSCollectionView; dropURL: NSURL; indexes: NSIndexSet): NSArray; message 'collectionView:namesOfPromisedFilesDroppedAtDestination:forDraggedItemsAtIndexes:';
function collectionView_draggingImageForItemsAtIndexes_withEvent_offset(collectionView: NSCollectionView; indexes: NSIndexSet; event: NSEvent; dragImageOffset: NSPointPointer): NSImage; message 'collectionView:draggingImageForItemsAtIndexes:withEvent:offset:';
function collectionView_validateDrop_proposedIndex_dropOperation(collectionView: NSCollectionView; draggingInfo: NSDraggingInfoProtocol; proposedDropIndex: NSIntegerPtr; proposedDropOperation: NSCollectionViewDropOperationPtr): NSDragOperation; message 'collectionView:validateDrop:proposedIndex:dropOperation:';
function collectionView_acceptDrop_index_dropOperation(collectionView: NSCollectionView; draggingInfo: NSDraggingInfoProtocol; index: NSInteger; dropOperation: NSCollectionViewDropOperation): Boolean; message 'collectionView:acceptDrop:index:dropOperation:';
end;
{$endif}
{$endif}
|