PSTGridLayoutRow.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. //
  2. // PSTGridLayoutRow.h
  3. // PSPDFKit
  4. //
  5. // Copyright (c) 2012-2013 Peter Steinberger. All rights reserved.
  6. //
  7. #import <UIKit/UIKit.h>
  8. @class PSTGridLayoutSection, PSTGridLayoutItem;
  9. @interface PSTGridLayoutRow : NSObject
  10. @property (nonatomic, unsafe_unretained) PSTGridLayoutSection *section;
  11. @property (nonatomic, strong, readonly) NSArray *items;
  12. @property (nonatomic, assign) CGSize rowSize;
  13. @property (nonatomic, assign) CGRect rowFrame;
  14. @property (nonatomic, assign) NSInteger index;
  15. @property (nonatomic, assign) BOOL complete;
  16. @property (nonatomic, assign) BOOL fixedItemSize;
  17. // @steipete addition for row-fastPath
  18. @property (nonatomic, assign) NSInteger itemCount;
  19. //- (PSTGridLayoutRow *)copyFromSection:(PSTGridLayoutSection *)section; // ???
  20. // Add new item to items array.
  21. - (void)addItem:(PSTGridLayoutItem *)item;
  22. // Layout current row (if invalid)
  23. - (void)layoutRow;
  24. // @steipete: Helper to save code in PSTCollectionViewFlowLayout.
  25. // Returns the item rects when fixedItemSize is enabled.
  26. - (NSArray *)itemRects;
  27. // Set current row frame invalid.
  28. - (void)invalidate;
  29. // Copy a snapshot of the current row data
  30. - (PSTGridLayoutRow *)snapshot;
  31. @end