Update headers

This commit is contained in:
Gregory John Casamento 2023-03-08 10:43:41 -05:00
parent be1acf04c4
commit 5bceae9f01
2 changed files with 30 additions and 11 deletions

View file

@ -86,7 +86,7 @@ APPKIT_EXPORT_CLASS
- (void) setAvoidsEmptySelection: (BOOL)flag; - (void) setAvoidsEmptySelection: (BOOL)flag;
- (void) setChildrenKeyPath: (NSString*)path; - (void) setChildrenKeyPath: (NSString*)path;
- (void) setCountKeyPath: (NSString*)path; - (void) setCountKeyPath: (NSString*)path;
- (void) setLeafPathKey: (NSString*)key; - (void) setLeafKeyPath: (NSString*)key;
- (void) setPreservesSelection: (BOOL)flag; - (void) setPreservesSelection: (BOOL)flag;
- (void) setSelectsInsertedObjects: (BOOL)flag; - (void) setSelectsInsertedObjects: (BOOL)flag;
- (void) setSortDescriptors: (NSArray*)descriptors; - (void) setSortDescriptors: (NSArray*)descriptors;

View file

@ -1,5 +1,5 @@
/* /*
NSTreeController.h NSTreeController.m
The tree controller class. The tree controller class.
@ -7,7 +7,7 @@
Author: Gregory Casamento <greg.casamento@gmail.com> Author: Gregory Casamento <greg.casamento@gmail.com>
Date: 2012 Date: 2012
This file is part of the GNUstep GUI Library. This file is part of the GNUstep GUI Library.
This library is free software; you can redistribute it and/or This library is free software; you can redistribute it and/or
@ -22,27 +22,46 @@
You should have received a copy of the GNU Lesser General Public You should have received a copy of the GNU Lesser General Public
License along with this library; see the file COPYING.LIB. License along with this library; see the file COPYING.LIB.
If not, see <http://www.gnu.org/licenses/> or write to the If not, see <http://www.gnu.org/licenses/> or write to the
Free Software Foundation, 51 Franklin Street, Fifth Floor, Free Software Foundation, 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. Boston, MA 02110-1301, USA.
*/ */
#import <Foundation/NSArray.h> #import <Foundation/NSArray.h>
#import <Foundation/NSIndexPath.h> #import <Foundation/NSIndexPath.h>
#import <Foundation/NSKeyValueObserving.h>
#import <Foundation/NSString.h> #import <Foundation/NSString.h>
#import <Foundation/NSSortDescriptor.h> #import <Foundation/NSSortDescriptor.h>
#import <AppKit/NSTreeController.h> #import "AppKit/NSKeyValueBinding.h"
#import <AppKit/NSTreeNode.h> #import "AppKit/NSTreeController.h"
#import "AppKit/NSTreeNode.h"
#import "GSBindingHelpers.h"
#import "GSFastEnumeration.h"
@implementation NSTreeController @implementation NSTreeController
+ (void) initialize
{
if (self == [NSTreeController class])
{
[self exposeBinding: NSContentArrayBinding];
[self setKeys: [NSArray arrayWithObjects: NSContentBinding, NSContentObjectBinding, nil]
triggerChangeNotificationsForDependentKey: @"arrangedObjects"];
}
}
- (id) initWithContent: (id)content - (id) initWithContent: (id)content
{ {
if ((self = [super initWithContent: content]) != nil) if ((self = [super initWithContent: content]) != nil)
{ {
_childrenKeyPath = nil;
_countKeyPath = nil;
_leafKeyPath = nil;
_sortDescriptors = nil;
} }
return self; return self;
} }
@ -238,7 +257,7 @@
ASSIGN(_countKeyPath, path); ASSIGN(_countKeyPath, path);
} }
- (void) setLeafPathKey: (NSString*)key - (void) setLeafKeyPath: (NSString*)key
{ {
ASSIGN(_leafKeyPath, key); ASSIGN(_leafKeyPath, key);
} }