diff --git a/ChangeLog b/ChangeLog index 7fd09ef..34edc4d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2020-09-08 Riccardo Mottola + + * Modules/Editors/ProjectCenter/SyntaxHighlighter.h + * Modules/Editors/ProjectCenter/SyntaxHighlighter.m + Add setters for fonts. + 2020-09-08 Riccardo Mottola * Framework/PCProjectLauncher.m diff --git a/Modules/Editors/ProjectCenter/SyntaxHighlighter.h b/Modules/Editors/ProjectCenter/SyntaxHighlighter.h index d407319..4580f14 100644 --- a/Modules/Editors/ProjectCenter/SyntaxHighlighter.h +++ b/Modules/Editors/ProjectCenter/SyntaxHighlighter.h @@ -5,6 +5,7 @@ ProjectManager application. Copyright (C) 2005 Saso Kiselkov + 2020 Riccardo Mottola This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -40,10 +41,10 @@ NSTextStorage *textStorage; SyntaxDefinition *syntax; - NSFont * normalFont, - * boldFont, - * italicFont, - * boldItalicFont; + NSFont *normalFont; + NSFont *boldFont; + NSFont *italicFont; + NSFont *boldItalicFont; NSUInteger lastProcessedContextIndex; @@ -54,6 +55,11 @@ - initWithFileType:(NSString *)fileType textStorage:(NSTextStorage *)aStorage; +- (void)setNormalFont:(NSFont *)f; +- (void)setBoldFont:(NSFont *)f; +- (void)setItalicFont:(NSFont *)f; +- (void)setBoldItalicFont:(NSFont *)f; + - (void)highlightRange:(NSRange)r; - (void)textStorageWillProcessEditing:(NSNotification *)notif; diff --git a/Modules/Editors/ProjectCenter/SyntaxHighlighter.m b/Modules/Editors/ProjectCenter/SyntaxHighlighter.m index 66ad1da..aa0d8e5 100644 --- a/Modules/Editors/ProjectCenter/SyntaxHighlighter.m +++ b/Modules/Editors/ProjectCenter/SyntaxHighlighter.m @@ -732,6 +732,27 @@ LocateString(NSString * str, } } +- (void)setNormalFont:(NSFont *)f +{ + ASSIGN(normalFont, f); +} + +- (void)setBoldFont:(NSFont *)f +{ + ASSIGN(boldFont, f); +} + +- (void)setItalicFont:(NSFont *)f +{ + ASSIGN(italicFont, f); +} + +- (void)setBoldItalicFont:(NSFont *)f +{ + ASSIGN(boldItalicFont, f); +} + + - (void) dealloc { NSDebugLLog(@"SyntaxHighlighter", @"SyntaxHighlighter: dealloc");