/
PSTGridLayoutRow.h
43 lines (31 loc) · 1.16 KB
/
PSTGridLayoutRow.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
//
// PSTGridLayoutRow.h
// PSPDFKit
//
// Copyright (c) 2012-2013 Peter Steinberger. All rights reserved.
//
#import <Foundation/Foundation.h>
@class PSTGridLayoutSection, PSTGridLayoutItem;
@interface PSTGridLayoutRow : NSObject
@property (nonatomic, unsafe_unretained) PSTGridLayoutSection *section;
@property (nonatomic, strong, readonly) NSArray *items;
@property (nonatomic, assign) CGSize rowSize;
@property (nonatomic, assign) CGRect rowFrame;
@property (nonatomic, assign) NSInteger index;
@property (nonatomic, assign) BOOL complete;
@property (nonatomic, assign) BOOL fixedItemSize;
// @steipete addition for row-fastPath
@property (nonatomic, assign) NSInteger itemCount;
//- (PSTGridLayoutRow *)copyFromSection:(PSTGridLayoutSection *)section; // ???
// Add new item to items array.
- (void)addItem:(PSTGridLayoutItem *)item;
// Layout current row (if invalid)
- (void)layoutRow;
// @steipete: Helper to save code in PSTCollectionViewFlowLayout.
// Returns the item rects when fixedItemSize is enabled.
- (NSArray *)itemRects;
// Set current row frame invalid.
- (void)invalidate;
// Copy a snapshot of the current row data
- (PSTGridLayoutRow *)snapshot;
@end