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
00026 #import "HKTextPattern.h"
00027
00028 @class NSColor, NSArray;
00029
00030 @interface HKSyntaxDefinition : NSObject
00031 {
00032 HKTextPattern ** contextBeginnings;
00033 char contextBeginningChars;
00034
00035 HKTextPattern *** contextSkips;
00036 char ** contextSkipChars;
00037
00038 HKTextPattern ** contextEndings;
00039 NSArray * contextGraphics;
00040
00041
00042
00043
00044 HKTextPattern *** keywords;
00045
00046 NSArray * keywordGraphics;
00047 }
00048
00049 + (NSString *) findSyntaxFileForType: (NSString *) type;
00050 + (HKSyntaxDefinition *) syntaxDefinitionForType: (NSString *) type;
00051
00052 - initWithContextList: (NSArray *) contexts;
00053
00054
00055 - (HKTextPattern **) contextBeginnings;
00056 - (const char *) contextBeginningCharacters;
00057 - (unsigned int) numberOfContextBeginningCharacters;
00058
00059 - (const char *) contextSkipCharactersForContext: (unsigned int) ctxt;
00060 - (unsigned int) numberOfContextSkipCharactersForContext: (unsigned int) ctxt;
00061
00062 - (HKTextPattern **) contextSkipsForContext: (unsigned int) ctxt;
00063 - (HKTextPattern *) contextEndingForContext: (unsigned int) ctxt;
00064
00065
00066 - (NSColor *) foregroundColorForContext: (unsigned int) context;
00067 - (NSColor *) backgroundColorForContext: (unsigned int) context;
00068 - (BOOL) isItalicFontForContext: (unsigned int) context;
00069 - (BOOL) isBoldFontForContext: (unsigned int) context;
00070
00071
00072 - (HKTextPattern **) keywordsInContext: (unsigned int) context;
00073
00074
00075 - (NSColor *) foregroundColorForKeyword: (unsigned int) keyword
00076 inContext: (unsigned int) context;
00077 - (NSColor *) backgroundColorForKeyword: (unsigned int) keyword
00078 inContext: (unsigned int) context;
00079 - (BOOL) isItalicFontForKeyword: (unsigned int) keyword
00080 inContext: (unsigned int) context;
00081 - (BOOL) isBoldFontForKeyword: (unsigned int) keyword
00082 inContext: (unsigned int) context;
00083
00084 @end