diff options
| author | nyamatongwe <devnull@localhost> | 2004-03-29 12:43:42 +0000 | 
|---|---|---|
| committer | nyamatongwe <devnull@localhost> | 2004-03-29 12:43:42 +0000 | 
| commit | 9c68461190bd8a25e841b2fc715da96d3143096a (patch) | |
| tree | 8933c762f7672c3cad39df08ec4da39ff8add3c4 /src | |
| parent | a86542284db36d95dfe424b7a181e6a85b1859c8 (diff) | |
| download | scintilla-mirror-9c68461190bd8a25e841b2fc715da96d3143096a.tar.gz | |
Patch from Robin Dunn to pass an extra flag down to
font rendering to allow a platform-specific tweak.
Diffstat (limited to 'src')
| -rw-r--r-- | src/Style.cxx | 10 | ||||
| -rw-r--r-- | src/Style.h | 6 | ||||
| -rw-r--r-- | src/ViewStyle.cxx | 6 | ||||
| -rw-r--r-- | src/ViewStyle.h | 1 | 
4 files changed, 13 insertions, 10 deletions
| diff --git a/src/Style.cxx b/src/Style.cxx index c37bcac90..f01aee082 100644 --- a/src/Style.cxx +++ b/src/Style.cxx @@ -67,8 +67,8 @@ Style &Style::operator=(const Style &source) {  void Style::Clear(ColourDesired fore_, ColourDesired back_, int size_,                    const char *fontName_, int characterSet_, -                  bool bold_, bool italic_, bool eolFilled_,  -                  bool underline_, ecaseForced caseForce_,  +                  bool bold_, bool italic_, bool eolFilled_, +                  bool underline_, ecaseForced caseForce_,  		  bool visible_, bool changeable_, bool hotspot_) {  	fore.desired = fore_;  	back.desired = back_; @@ -102,7 +102,7 @@ void Style::ClearTo(const Style &source) {  		source.eolFilled,  		source.underline,  		source.caseForce, -		source.visible,  +		source.visible,  		source.changeable,  		source.hotspot);  } @@ -122,7 +122,7 @@ bool Style::EquivalentFontTo(const Style *other) const {  	return strcmp(fontName, other->fontName) == 0;  } -void Style::Realise(Surface &surface, int zoomLevel, Style *defaultStyle) { +void Style::Realise(Surface &surface, int zoomLevel, Style *defaultStyle, bool extraFontFlag) {  	sizeZoomed = size + zoomLevel;  	if (sizeZoomed <= 2)	// Hangs if sizeZoomed <= 1  		sizeZoomed = 2; @@ -137,7 +137,7 @@ void Style::Realise(Surface &surface, int zoomLevel, Style *defaultStyle) {  	if (aliasOfDefaultFont) {  		font.SetID(defaultStyle->font.GetID());  	} else if (fontName) { -		font.Create(fontName, characterSet, deviceHeight, bold, italic); +		font.Create(fontName, characterSet, deviceHeight, bold, italic, extraFontFlag);  	} else {  		font.SetID(0);  	} diff --git a/src/Style.h b/src/Style.h index 6ee930b6b..c0f7eca26 100644 --- a/src/Style.h +++ b/src/Style.h @@ -44,12 +44,12 @@ public:  	void Clear(ColourDesired fore_, ColourDesired back_,  	           int size_,  	           const char *fontName_, int characterSet_, -	           bool bold_, bool italic_, bool eolFilled_,  -	           bool underline_, ecaseForced caseForce_,  +	           bool bold_, bool italic_, bool eolFilled_, +	           bool underline_, ecaseForced caseForce_,  		   bool visible_, bool changeable_, bool hotspot_);  	void ClearTo(const Style &source);  	bool EquivalentFontTo(const Style *other) const; -	void Realise(Surface &surface, int zoomLevel, Style *defaultStyle = 0); +	void Realise(Surface &surface, int zoomLevel, Style *defaultStyle = 0, bool extraFontFlag = false);  	bool IsProtected() const { return !(changeable && visible);};  }; diff --git a/src/ViewStyle.cxx b/src/ViewStyle.cxx index 8df779079..c52f1e472 100644 --- a/src/ViewStyle.cxx +++ b/src/ViewStyle.cxx @@ -112,6 +112,7 @@ ViewStyle::ViewStyle(const ViewStyle &source) {  	viewIndentationGuides = source.viewIndentationGuides;  	viewEOL = source.viewEOL;  	showMarkedLines = source.showMarkedLines; +	extraFontFlag = source.extraFontFlag;  }  ViewStyle::~ViewStyle() { @@ -193,6 +194,7 @@ void ViewStyle::Init() {  	viewIndentationGuides = false;  	viewEOL = false;  	showMarkedLines = true; +	extraFontFlag = false;  }  void ViewStyle::RefreshColourPalette(Palette &pal, bool want) { @@ -228,13 +230,13 @@ void ViewStyle::RefreshColourPalette(Palette &pal, bool want) {  void ViewStyle::Refresh(Surface &surface) {  	selbar.desired = Platform::Chrome();  	selbarlight.desired = Platform::ChromeHighlight(); -	styles[STYLE_DEFAULT].Realise(surface, zoomLevel); +	styles[STYLE_DEFAULT].Realise(surface, zoomLevel, NULL, extraFontFlag);  	maxAscent = styles[STYLE_DEFAULT].ascent;  	maxDescent = styles[STYLE_DEFAULT].descent;  	someStylesProtected = false;  	for (unsigned int i=0;i<(sizeof(styles)/sizeof(styles[0]));i++) {  		if (i != STYLE_DEFAULT) { -			styles[i].Realise(surface, zoomLevel, &styles[STYLE_DEFAULT]); +			styles[i].Realise(surface, zoomLevel, &styles[STYLE_DEFAULT], extraFontFlag);  			if (maxAscent < styles[i].ascent)  				maxAscent = styles[i].ascent;  			if (maxDescent < styles[i].descent) diff --git a/src/ViewStyle.h b/src/ViewStyle.h index 5f27cc08c..d06c02002 100644 --- a/src/ViewStyle.h +++ b/src/ViewStyle.h @@ -89,6 +89,7 @@ public:  	int edgeState;  	int caretWidth;  	bool someStylesProtected; +	bool extraFontFlag;  	ViewStyle();  	ViewStyle(const ViewStyle &source); | 
