Add code to support item identifier to NSTableView

This commit is contained in:
Gregory John Casamento 2024-02-16 23:14:36 -05:00
parent 53e040a6bb
commit 182427bf97
4 changed files with 10 additions and 2 deletions

View file

@ -33,6 +33,7 @@
#import <AppKit/NSControl.h>
#import <AppKit/NSDragging.h>
#import <AppKit/NSUserInterfaceValidation.h>
#import <AppKit/NSUserInterfaceItemIdentification.h>
@class NSArray;
@class NSIndexSet;
@ -190,6 +191,7 @@ APPKIT_EXPORT_CLASS
/* Supporting ivars for view based tables */
BOOL _viewBased;
NSMapTable *_renderedViewPaths;
NSMutableDictionary *_registeredViews;
}
/* Data Source */
@ -396,6 +398,7 @@ APPKIT_EXPORT_CLASS
- (void) insertRowsAtIndexes: (NSIndexSet*)indexes withAnimation: (NSTableViewAnimationOptions)animationOptions;
- (void) removeRowsAtIndexes: (NSIndexSet*)indexes withAnimation: (NSTableViewAnimationOptions)animationOptions;
- (NSInteger) rowForView: (NSView*)view;
- (NSView *) makeViewWithIdentifier: (NSUserInterfaceItemIdentifier)identifier owner:(id)owner;
#endif
@end /* interface of NSTableView */

View file

@ -30,7 +30,7 @@
#import <Foundation/NSObject.h>
#if OS_API_VERSION(MAC_OS_X_VERSION_10_7, GS_API_LATEST)
#if OS_API_VERSION(MAC_OS_X_VERSION_10_13, GS_API_LATEST)
#if defined(__cplusplus)
extern "C" {

View file

@ -579,7 +579,7 @@ to YES. */
if ([aDecoder containsValueForKey: @"NSPrototypeCellViews"])
{
ASSIGN(_prototypeCellViews, [aDecoder decodeObjectForKey: @"NSPrototypeCellViews"]);
}
}
}
else
{

View file

@ -6889,6 +6889,11 @@ For a more detailed explanation, -setSortDescriptors:. */
return NSNotFound;
}
- (NSView *) makeViewWithIdentifier: (NSUserInterfaceItemIdentifier)identifier owner:(id)owner
{
return nil;
}
@end /* implementation of NSTableView */
@implementation NSTableView (SelectionHelper)