Change GSTextFinder parent class back to NSObject, start implementing NSTextFinder in terms of GSTextFinder.

This commit is contained in:
Gregory John Casamento 2020-08-04 06:52:54 -04:00
parent 8c36246dca
commit c3701e2daf
3 changed files with 24 additions and 2 deletions

View file

@ -82,6 +82,8 @@ APPKIT_EXPORT NSPasteboardTypeTextFinderOptionKey const NSTextFinderMatchingType
BOOL _incrementalSearchingEnabled;
BOOL _incrementalSearchingShouldDimContentView;
NSArray *_incrementalMatchRanges;
id _finder;
}
// Validating and performing

View file

@ -31,7 +31,6 @@
#define _GS_TEXT_FINDER_H
#import <Foundation/NSObject.h>
#import "AppKit/NSTextFinder.h"
@class NSString;
@class NSButton;
@ -39,7 +38,7 @@
@class NSPanel;
@class NSTextField;
@interface GSTextFinder : NSTextFinder
@interface GSTextFinder : NSObject
{
// local attributes
NSString *findString;

View file

@ -147,6 +147,27 @@
- (void) encodeWithCoder: (NSCoder *)coder
{
if ([coder allowsKeyedCoding])
{
[coder encodeBool: _findIndicatorNeedsUpdate
forKey: @"NSFindIndicatorNeedsUpdate"];
[coder encodeBool: _incrementalSearchingEnabled
forKey: @"NSIncrementalSearchingEnabled"];
[coder encodeBool: _incrementalSearchingShouldDimContentView
forKey: @"NSIncrementalSearchingShouldDimContentView"];
[coder encodeObject: _incrementalMatchRanges
forKey: @"NSIncrementalMatchRanges"];
}
else
{
[coder encodeValueOfObjCType: @encode(BOOL)
at: &_findIndicatorNeedsUpdate];
[coder encodeValueOfObjCType: @encode(BOOL)
at: &_incrementalSearchingEnabled];
[coder encodeValueOfObjCType: @encode(BOOL)
at: &_incrementalSearchingShouldDimContentView];
[coder encodeObject: _incrementalMatchRanges];
}
}
@end