HKSyntaxHighlighter.h

00001 /*
00002     HKSyntaxHighlighter.h
00003 
00004     Interface declaration of the HKSyntaxHighlighter class for the
00005     HighlighterKit framework.
00006 
00007     Copyright (C) 2005, 2006, 2007, 2008  Saso Kiselkov
00008 
00009     This library is free software; you can redistribute it and/or
00010     modify it under the terms of the GNU Lesser General Public
00011     License as published by the Free Software Foundation; either
00012     version 2.1 of the License, or (at your option) any later version.
00013 
00014     This library is distributed in the hope that it will be useful,
00015     but WITHOUT ANY WARRANTY; without even the implied warranty of
00016     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00017     Lesser General Public License for more details.
00018 
00019     You should have received a copy of the GNU Lesser General Public
00020     License along with this library; if not, write to the Free Software
00021     Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
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

Generated on Thu Nov 25 10:47:42 2010 for HighlighterKit by  doxygen 1.5.5