mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 15:30:38 +00:00
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:
parent
aee03ee7c4
commit
8572458a5d
8 changed files with 1771 additions and 56 deletions
|
@ -25,15 +25,115 @@
|
|||
#ifndef _NSCollectionViewFlowLayout_h_GNUSTEP_GUI_INCLUDE
|
||||
#define _NSCollectionViewFlowLayout_h_GNUSTEP_GUI_INCLUDE
|
||||
|
||||
#import <AppKit/NSCollectionView.h>
|
||||
#import <AppKit/NSCollectionViewLayout.h>
|
||||
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_0, GS_API_LATEST)
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_11, GS_API_LATEST)
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
enum
|
||||
{
|
||||
NSCollectionViewScrollDirectionVertical,
|
||||
NSCollectionViewScrollDirectionHorizontal
|
||||
};
|
||||
typedef NSInteger NSCollectionViewScrollDirection;
|
||||
|
||||
NSCollectionViewSupplementaryElementKind const NSCollectionElementKindSectionHeader;
|
||||
NSCollectionViewSupplementaryElementKind const NSCollectionElementKindSectionFooter;
|
||||
|
||||
@interface NSCollectionViewFlowLayoutInvalidationContext : NSCollectionViewLayoutInvalidationContext
|
||||
{
|
||||
BOOL _invalidateFlowLayoutDelegateMetrics;
|
||||
BOOL _invalidateFlowLayoutAttributes;
|
||||
}
|
||||
|
||||
- (void) setInvalidateFlowLayoutDelegateMetrics: (BOOL)flag;
|
||||
- (BOOL) invalidateFlowLayoutDelegateMetrics;
|
||||
|
||||
- (void) setInvalidateFlowLayoutAttributes: (BOOL)flag;
|
||||
- (BOOL) invalidateFlowLayoutAttributes;
|
||||
@end
|
||||
|
||||
@protocol NSCollectionViewDelegateFlowLayout <NSCollectionViewDelegate>
|
||||
|
||||
- (NSSize) collectionView: (NSCollectionView *)collectionView
|
||||
layout: (NSCollectionViewLayout*)collectionViewLayout
|
||||
sizeForItemAtIndexPath:(NSIndexPath *)indexPath;
|
||||
|
||||
- (NSEdgeInsets)collectionView: (NSCollectionView *)collectionView
|
||||
layout: (NSCollectionViewLayout*)collectionViewLayout
|
||||
insetForSectionAtIndex: (NSInteger)section;
|
||||
|
||||
- (CGFloat) collectionView: (NSCollectionView *)collectionView
|
||||
layout: (NSCollectionViewLayout*)collectionViewLayout
|
||||
minimumLineSpacingForSectionAtIndex: (NSInteger)section;
|
||||
|
||||
- (CGFloat) collectionView: (NSCollectionView *)collectionView
|
||||
layout: (NSCollectionViewLayout*)collectionViewLayout
|
||||
minimumInteritemSpacingForSectionAtIndex: (NSInteger)section;
|
||||
|
||||
- (NSSize) collectionView: (NSCollectionView *)collectionView
|
||||
layout: (NSCollectionViewLayout*)collectionViewLayout
|
||||
referenceSizeForHeaderInSection: (NSInteger)section;
|
||||
|
||||
- (NSSize) collectionView: (NSCollectionView *)collectionView
|
||||
layout: (NSCollectionViewLayout*)collectionViewLayout
|
||||
referenceSizeForFooterInSection:(NSInteger)section;
|
||||
|
||||
@end
|
||||
|
||||
@interface NSCollectionViewFlowLayout : NSCollectionViewLayout
|
||||
{
|
||||
CGFloat _minimumLineSpacing;
|
||||
CGFloat _minimumInteritemSpacing;
|
||||
NSSize _itemSize;
|
||||
NSSize _estimatedItemSize;
|
||||
NSCollectionViewScrollDirection _scrollDirection;
|
||||
NSSize _headerReferenceSize;
|
||||
NSSize _footerReferenceSize;
|
||||
NSEdgeInsets _sectionInset;
|
||||
BOOL _sectionHeadersPinToVisibleBounds;
|
||||
BOOL _sectionFootersPinToVisibleBounds;
|
||||
}
|
||||
|
||||
- (CGFloat) minimumLineSpacing;
|
||||
- (void) setMinimumLineSpacing: (CGFloat)spacing;
|
||||
|
||||
- (CGFloat) minimumInteritemSpacing;
|
||||
- (void) setMinimumInteritemSpacing: (CGFloat)spacing;
|
||||
|
||||
- (NSSize) itemSize;
|
||||
- (void) setItemSize: (NSSize)itemSize;
|
||||
|
||||
- (NSSize) estimatedItemSize;
|
||||
- (void) setEstimatedItemSize: (NSSize)size;
|
||||
|
||||
- (NSCollectionViewScrollDirection) scrollDirection;
|
||||
- (void) setScrollDirection: (NSCollectionViewScrollDirection)direction;
|
||||
|
||||
- (NSSize) headerReferenceSize;
|
||||
- (void) setHeaderReferenceSize: (NSSize)size;
|
||||
|
||||
- (NSSize) footerReferenceSize;
|
||||
- (void) setFooterReferenceSize: (NSSize)size;
|
||||
|
||||
- (NSEdgeInsets) sectionInset;
|
||||
- (void) setSectionInset: (NSEdgeInsets)inset;
|
||||
|
||||
- (BOOL) sectionHeadersPinToVisibleBounds;
|
||||
- (void) setSectionHeadersPinToVisibleBounds: (BOOL)f;
|
||||
|
||||
- (BOOL) sectionFootersPinToVisibleBounds;
|
||||
- (void) setSectionFootersPinToVisibleBounds: (BOOL)f;
|
||||
|
||||
- (BOOL) sectionAtIndexIsCollapsed: (NSUInteger)sectionIndex;
|
||||
|
||||
- (void) collapseSectionAtIndex: (NSUInteger)sectionIndex;
|
||||
|
||||
- (void) expandSectionAtIndex: (NSUInteger)sectionIndex;
|
||||
|
||||
@end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue