1 //
2 //  PSTGridLayoutInfo.h
3 //  PSPDFKit
4 //
5 //  Copyright (c) 2012-2013 Peter Steinberger. All rights reserved.
6 //
7 
8 #import <UIKit/UIKit.h>
9 
10 @class PSTGridLayoutSection;
11 
12 /*
13  Every PSTCollectionViewLayout has a PSTGridLayoutInfo attached.
14  Is used extensively in PSTCollectionViewFlowLayout.
15  */
16 @interface PSTGridLayoutInfo : NSObject
17 
18 @property (nonatomic, strong, readonly) NSArray *sections;
19 @property (nonatomic, strong) NSDictionary *rowAlignmentOptions;
20 @property (nonatomic, assign) BOOL usesFloatingHeaderFooter;
21 
22 // Vertical/horizontal dimension (depending on horizontal)
23 // Used to create row objects
24 @property (nonatomic, assign) CGFloat dimension;
25 
26 @property (nonatomic, assign) BOOL horizontal;
27 @property (nonatomic, assign) BOOL leftToRight;
28 @property (nonatomic, assign) CGSize contentSize;
29 
30 // Frame for specific PSTGridLayoutItem.
31 - (CGRect)frameForItemAtIndexPath:(NSIndexPath *)indexPath;
32 
33 // Add new section. Invalidates layout.
34 - (PSTGridLayoutSection *)addSection;
35 
36 // forces the layout to recompute on next access
37 // TODO; what's the parameter for?
38 - (void)invalidate:(BOOL)arg;
39 
40 // Make a copy of the current state.
41 - (PSTGridLayoutInfo *)snapshot;
42 
43 @end
44