libs-gui/Source/NSCollectionViewTransitionLayout.m

80 lines
2 KiB
Mathematica
Raw Normal View History

2021-05-30 08:53:03 +00:00
/* Implementation of class NSCollectionViewTransitionLayout
Copyright (C) 2021 Free Software Foundation, Inc.
By: Gregory John Casamento
Date: 30-05-2021
This file is part of the GNUstep Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110 USA.
*/
#import "AppKit/NSCollectionViewTransitionLayout.h"
@implementation NSCollectionViewTransitionLayout
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
2021-05-31 11:47:58 +00:00
- (CGFloat) transitionProgress
{
return _transitionProgress;
}
- (void) setTransitionProgress: (CGFloat)transitionProgress
{
_transitionProgress = transitionProgress;
}
- (NSCollectionViewLayout *) currentLayout
{
return _currentLayout;
}
- (NSCollectionViewLayout *) nextLayout
{
return _nextLayout;
}
// Designated initializer
- (instancetype) initWithCurrentLayout: (NSCollectionViewLayout *)currentLayout
nextLayout: (NSCollectionViewLayout *)nextLayout
{
self = [super init];
if (self != nil)
{
ASSIGN(_currentLayout, currentLayout);
ASSIGN(_nextLayout, nextLayout);
}
return self;
}
- (void) dealloc
{
RELEASE(_currentLayout);
RELEASE(_nextLayout);
[super dealloc];
}
- (void) updateValue: (CGFloat)value forAnimatedKey: (NSCollectionViewTransitionLayoutAnimatedKey)key
{
}
- (CGFloat) valueForAnimatedKey: (NSCollectionViewTransitionLayoutAnimatedKey)key
{
return 1.0;
}
2021-05-30 08:53:03 +00:00
@end