Add methods and actions for layout classes as well as the abstract classes for NSCollectionViewLayout.

Declarations added to collectionview layout header.

Clean compile for NSCollectionViewLayout abstract class

Add header for NSCollectionViewFlowLayout.h

Add skeleton implementation of NSCollectionViewFlowLayout

Add implementation for simple setter/getter methods.

Correct compilation error with non-clang compilers

Fix compilation issues

Add getter/setter for collectionViewLayout

Skeleton of NSCollectionViewTransitionLayout implementation

Add encoding/decoding for collectionViewLayout key

Make NSCollectionViewGridLayout default if the NSCollectionViewLayoutKey is not set

Add protocols for DataSource and Prefetching for NSCollectionView

Add 10.11 methods to delegate declaration

remove templating from NSCollectionViewDelegate that gcc can't handle.

New delegate methods for NSCollectionViewDelegate to support NSSets of NSIndexPaths and multiple selection.

Reset .travis.yml to the proper version and modify NSCollectionView.h to use forward declarations for both NSPasteboard and NSPasteboardWriting so that we don't explicitly import.

Add declarations for missing methods from 10.11 version of NSCollectionView

Add new methods for 10.11 for moving, deleting and collapsing sections.

Add new methods from 10.11

Add the remaining missing methods as well as delcarations for blocks needed for batch handler and completion handler.

Add skeleton implementations for all new methods

Changes to add new methods to collection view for delegate

Consolidate the registeredClass and registeredNib maps.

Implementation of dataSource related methods

Implment nib loading for NSCollectionViewItem subclasses

Remove uneeded ivars, add categories for override and layout

Minor formatting change

Update categories and organization of code

Add init method to NSCollectionViewFlowLayoutInvalidationContext

Add collectionview layout subclasses

Declarations added to collectionview layout header.

Clean compile for NSCollectionViewLayout abstract class

Add skeleton implementation of NSCollectionViewFlowLayout

Add implementation for simple setter/getter methods.

Correct compilation error with non-clang compilers

Fix compilation issues

Add getter/setter for collectionViewLayout

Add encoding/decoding for collectionViewLayout key

Make NSCollectionViewGridLayout default if the NSCollectionViewLayoutKey is not set

Add protocols for DataSource and Prefetching for NSCollectionView

New delegate methods for NSCollectionViewDelegate to support NSSets of NSIndexPaths and multiple selection.

Reset .travis.yml to the proper version and modify NSCollectionView.h to use forward declarations for both NSPasteboard and NSPasteboardWriting so that we don't explicitly import.

Add declarations for missing methods from 10.11 version of NSCollectionView

Add new methods for 10.11 for moving, deleting and collapsing sections.

Add new methods from 10.11

Changes to add new methods to collection view for delegate

Consolidate the registeredClass and registeredNib maps.

Add init method to NSCollectionViewFlowLayoutInvalidationContext

Fix issues with rebase
This commit is contained in:
Gregory John Casamento 2021-05-31 07:47:58 -04:00
parent aee03ee7c4
commit 8572458a5d
8 changed files with 1771 additions and 56 deletions

View file

@ -24,7 +24,155 @@
#import "AppKit/NSCollectionViewFlowLayout.h"
@implementation NSCollectionViewFlowLayout
@implementation NSCollectionViewFlowLayoutInvalidationContext
- (instancetype) init
{
self = [super init];
if (self != nil)
{
_invalidateFlowLayoutAttributes = YES;
_invalidateFlowLayoutDelegateMetrics = YES;
}
return self;
}
- (void) setInvalidateFlowLayoutDelegateMetrics: (BOOL)flag
{
_invalidateFlowLayoutDelegateMetrics = flag;
}
- (BOOL) invalidateFlowLayoutDelegateMetrics
{
return _invalidateFlowLayoutDelegateMetrics;
}
- (void) setInvalidateFlowLayoutAttributes: (BOOL)flag
{
_invalidateFlowLayoutAttributes = flag;
}
- (BOOL) invalidateFlowLayoutAttributes
{
return _invalidateFlowLayoutAttributes;
}
@end
@implementation NSCollectionViewFlowLayout
- (CGFloat) minimumLineSpacing
{
return _minimumLineSpacing;
}
- (void) setMinimumLineSpacing: (CGFloat)spacing
{
_minimumLineSpacing = spacing;
}
- (CGFloat) minimumInteritemSpacing
{
return _minimumInteritemSpacing;
}
- (void) setMinimumInteritemSpacing: (CGFloat)spacing
{
_minimumInteritemSpacing = spacing;
}
- (NSSize) itemSize
{
return _itemSize;
}
- (void) setItemSize: (NSSize)itemSize
{
_itemSize = itemSize;
}
- (NSSize) estimatedItemSize
{
return _estimatedItemSize;
}
- (void) setEstimatedItemSize: (NSSize)size
{
_estimatedItemSize = size;
}
- (NSCollectionViewScrollDirection) scrollDirection
{
return _scrollDirection;
}
- (void) setScrollDirection: (NSCollectionViewScrollDirection)direction
{
_scrollDirection = direction;
}
- (NSSize) headerReferenceSize
{
return _headerReferenceSize;
}
- (void) setHeaderReferenceSize: (NSSize)size
{
_headerReferenceSize = size;
}
- (NSSize) footerReferenceSize
{
return _footerReferenceSize;
}
- (void) setFooterReferenceSize: (NSSize)size
{
_footerReferenceSize = size;
}
- (NSEdgeInsets) sectionInset
{
return _sectionInset;
}
- (void) setSectionInset: (NSEdgeInsets)inset
{
_sectionInset = inset;
}
- (BOOL) sectionHeadersPinToVisibleBounds
{
return _sectionHeadersPinToVisibleBounds;
}
- (void) setSectionHeadersPinToVisibleBounds: (BOOL)f
{
_sectionHeadersPinToVisibleBounds = f;
}
- (BOOL) sectionFootersPinToVisibleBounds
{
return _sectionFootersPinToVisibleBounds;
}
- (void) setSectionFootersPinToVisibleBounds: (BOOL)f
{
_sectionFootersPinToVisibleBounds = f;
}
- (BOOL) sectionAtIndexIsCollapsed: (NSUInteger)sectionIndex
{
return NO;
}
- (void) collapseSectionAtIndex: (NSUInteger)sectionIndex
{
}
- (void) expandSectionAtIndex: (NSUInteger)sectionIndex
{
}
@end