00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #import <Foundation/NSObject.h>
00025 #import <Foundation/NSRange.h>
00026 #import <Foundation/NSCharacterSet.h>
00027
00028 @class NSNotification,
00029 NSDictionary,
00030 NSMutableDictionary,
00031 NSString,
00032 NSTextStorage;
00033
00034 @class NSFont,
00035 NSColor;
00036
00037 @class HKSyntaxDefinition;
00038
00039 @interface HKSyntaxHighlighter : NSObject
00040 {
00041 NSTextStorage * textStorage;
00042 HKSyntaxDefinition * syntax;
00043
00044 NSFont * normalFont,
00045 * boldFont,
00046 * italicFont,
00047 * boldItalicFont;
00048 NSColor * defaultTextColor;
00049
00050 unsigned int lastProcessedContextIndex;
00051
00052 NSRange delayedProcessedRange;
00053 BOOL didBeginEditing;
00054 }
00055
00056 + (NSFont *) defaultFont;
00057 + (NSFont *) defaultBoldFont;
00058 + (NSFont *) defaultItalicFont;
00059 + (NSFont *) defaultBoldItalicFont;
00060
00061 - initWithHighlighterType: (NSString *) type
00062 textStorage: (NSTextStorage *) aStorage
00063 defaultTextColor: (NSColor *) aColor;
00064
00065 - initWithSyntaxDefinition: (HKSyntaxDefinition *) aSyntaxDefinition
00066 textStorage: (NSTextStorage *) aStorage
00067 defaultTextColor: (NSColor *) aColor;
00068
00069 - (void) highlightRange: (NSRange) r;
00070
00071 - (void) textStorageWillProcessEditing: (NSNotification *) notif;
00072
00073 @end