Add setters for fonts.

This commit is contained in:
Riccardo Mottola 2020-09-08 23:28:44 +02:00
parent 79125b35a8
commit 3df9137f39
3 changed files with 37 additions and 4 deletions

View file

@ -1,3 +1,9 @@
2020-09-08 Riccardo Mottola <rm@gnu.org>
* Modules/Editors/ProjectCenter/SyntaxHighlighter.h
* Modules/Editors/ProjectCenter/SyntaxHighlighter.m
Add setters for fonts.
2020-09-08 Riccardo Mottola <rm@gnu.org>
* Framework/PCProjectLauncher.m

View file

@ -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;

View file

@ -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");