mirror of
https://github.com/darlinghq/darling-cocotron.git
synced 2024-11-23 12:09:51 +00:00
rough in more spelling
This commit is contained in:
parent
264eef6426
commit
84644531c5
File diff suppressed because it is too large
Load Diff
@ -213,6 +213,9 @@ static NSSpellChecker *shared=nil;
|
||||
|
||||
NSView *view=[_spellingViewController view];
|
||||
_spellingPanel=[[NSPanel alloc] initWithContentRect:[view frame] styleMask:NSUtilityWindowMask backing:NSBackingStoreBuffered defer:YES];
|
||||
|
||||
[_spellingPanel setContentView:view];
|
||||
|
||||
[_spellingPanel center];
|
||||
}
|
||||
|
||||
|
@ -132,6 +132,9 @@ APPKIT_EXPORT NSString * const NSTextDidChangeNotification;
|
||||
-(void)copyRuler:sender;
|
||||
-(void)pasteRuler:sender;
|
||||
|
||||
-(void)showGuessPanel:sender;
|
||||
-(void)checkSpelling:sender;
|
||||
|
||||
@end
|
||||
|
||||
@interface NSObject(NSText_delegate)
|
||||
|
@ -272,5 +272,13 @@ NSString * const NSTextDidChangeNotification=@"NSTextDidChangeNotification";
|
||||
NSInvalidAbstractInvocation();
|
||||
}
|
||||
|
||||
-(void)showGuessPanel:sender {
|
||||
NSInvalidAbstractInvocation();
|
||||
}
|
||||
|
||||
-(void)checkSpelling:sender {
|
||||
NSInvalidAbstractInvocation();
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
|
@ -2601,6 +2601,15 @@ NSString * const NSOldSelectedCharacterRange=@"NSOldSelectedCharacterRange";
|
||||
[[NSSpellChecker sharedSpellChecker] ignoreWord:[[sender selectedCell] stringValue] inSpellDocumentWithTag: [self spellCheckerDocumentTag]];
|
||||
}
|
||||
|
||||
-(void)showGuessPanel:sender {
|
||||
[[[NSSpellChecker sharedSpellChecker] spellingPanel] makeKeyAndOrderFront: self];
|
||||
}
|
||||
|
||||
-(void)checkSpelling:sender {
|
||||
[NSSpellChecker sharedSpellChecker];
|
||||
NSUnimplementedMethod();
|
||||
}
|
||||
|
||||
-(NSInteger)spellCheckerDocumentTag {
|
||||
/* There is no explicity invalid document tag, this is indirectly documented as zero in the full checkSpellingOfString: method.
|
||||
and supported by behavior. */
|
||||
|
@ -14,4 +14,6 @@
|
||||
|
||||
}
|
||||
|
||||
+(void)registerEngine;
|
||||
|
||||
@end
|
||||
|
@ -8,9 +8,32 @@
|
||||
|
||||
#import <Foundation/NSSpellEngine.h>
|
||||
#import <Foundation/NSRaise.h>
|
||||
#import <Foundation/NSBundle.h>
|
||||
#import <Foundation/NSArray.h>
|
||||
|
||||
@implementation NSSpellEngine
|
||||
|
||||
+(void)initialize {
|
||||
if(self==[NSSpellEngine class]){
|
||||
|
||||
NSArray *allPaths=[[NSBundle bundleForClass:self] pathsForResourcesOfType:@"spellEngine" inDirectory:nil];
|
||||
int i,count=[allPaths count];
|
||||
|
||||
for(i=0;i<count;i++){
|
||||
NSString *path=[allPaths objectAtIndex:i];
|
||||
NSBundle *check=[NSBundle bundleWithPath:path];
|
||||
Class cls=[check principalClass];
|
||||
|
||||
[cls registerEngine];
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+(void)registerEngine {
|
||||
NSUnimplementedMethod();
|
||||
}
|
||||
|
||||
-(NSRange)spellServer:(NSSpellServer *)sender checkGrammarInString:(NSString *)string language:(NSString *)language details:(NSArray **)outDetails {
|
||||
NSUnimplementedMethod();
|
||||
return NSMakeRange(0,0);
|
||||
|
@ -23,6 +23,6 @@
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string></string>
|
||||
<string>NSSpellEngine_hunspell</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
Loading…
Reference in New Issue
Block a user