diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/CallTip.cxx | 3 | ||||
| -rw-r--r-- | src/Editor.cxx | 16 | ||||
| -rw-r--r-- | src/Style.cxx | 18 | ||||
| -rw-r--r-- | src/Style.h | 3 | ||||
| -rw-r--r-- | src/ViewStyle.cxx | 4 | 
5 files changed, 34 insertions, 10 deletions
| diff --git a/src/CallTip.cxx b/src/CallTip.cxx index ad6740208..d22a96364 100644 --- a/src/CallTip.cxx +++ b/src/CallTip.cxx @@ -8,6 +8,7 @@  #include "Platform.h" +#include "Scintilla.h"  #include "CallTip.h"  CallTip::CallTip() { @@ -117,7 +118,7 @@ PRectangle CallTip::CallTipStart(int pos, Point pt, const char *defn,  	Surface surfaceMeasure;  	surfaceMeasure.Init();  	int deviceHeight = (size * surfaceMeasure.LogPixelsY()) / 72; -	font.Create(faceName, deviceHeight); +	font.Create(faceName, SC_CHARSET_DEFAULT, deviceHeight, false, false);  	if (val)  		delete []val;  	val = new char[strlen(defn) + 1]; diff --git a/src/Editor.cxx b/src/Editor.cxx index 37400f9ba..ad8bab8c5 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -3591,12 +3591,18 @@ LRESULT Editor::WndProc(UINT iMessage, WPARAM wParam, LPARAM lParam) {  			vs.styles[wParam].underline = lParam;  			InvalidateStyleRedraw();  		} +		break; +	case SCI_STYLESETCHARACTERSET: +		if (wParam <= STYLE_MAX) { +			vs.styles[wParam].characterSet = lParam; +			InvalidateStyleRedraw(); +		} +		break;  	case SCI_STYLERESETDEFAULT:  		vs.ResetDefaultStyle();  		InvalidateStyleRedraw();  		break; -  	case SCI_SETSTYLEBITS:  		pdoc->SetStylingBits(wParam);  		break; @@ -3883,6 +3889,14 @@ LRESULT Editor::WndProc(UINT iMessage, WPARAM wParam, LPARAM lParam) {  		SetDocPointer(reinterpret_cast<Document *>(lParam));  		return 0; +	case SCI_ADDREFDOC: +		(reinterpret_cast<Document *>(lParam))->AddRef(); +		break; +		 +	case SCI_RELEASEDOC: +		(reinterpret_cast<Document *>(lParam))->Release(); +		break; +		  	case SCI_SETMODEVENTMASK:  		modEventMask = wParam;  		return 0; diff --git a/src/Style.cxx b/src/Style.cxx index 2fea6898d..7aa44c0eb 100644 --- a/src/Style.cxx +++ b/src/Style.cxx @@ -7,21 +7,23 @@  #include "Platform.h" +#include "Scintilla.h"  #include "Style.h"  Style::Style() {  	aliasOfDefaultFont = true;  	Clear(Colour(0,0,0), Colour(0xff,0xff,0xff), -	        Platform::DefaultFontSize(), 0, +	        Platform::DefaultFontSize(), 0, SC_CHARSET_DEFAULT,  		false, false, false, false);  }  Style::Style(const Style &source) {  	Clear(Colour(0,0,0), Colour(0xff,0xff,0xff), -	        0, 0, +	        0, 0, 0,  		false, false, false, false);  	fore.desired = source.fore.desired;  	back.desired = source.back.desired; +	characterSet = source.characterSet;  	bold = source.bold;  	italic = source.italic;  	size = source.size; @@ -41,10 +43,11 @@ Style &Style::operator=(const Style &source) {  	if (this == &source)  		return *this;  	Clear(Colour(0,0,0), Colour(0xff,0xff,0xff), -	        0, 0, +	        0, 0, SC_CHARSET_DEFAULT,  		false, false, false, false);  	fore.desired = source.fore.desired;  	back.desired = source.back.desired; +	characterSet = source.characterSet;  	bold = source.bold;  	italic = source.italic;  	size = source.size; @@ -53,10 +56,12 @@ Style &Style::operator=(const Style &source) {  	return *this;  } -void Style::Clear(Colour fore_, Colour back_, int size_, const char *fontName_,  +void Style::Clear(Colour fore_, Colour back_, int size_,  +	const char *fontName_, int characterSet_,  	bool bold_, bool italic_, bool eolFilled_, bool underline_) {  	fore.desired = fore_;  	back.desired = back_; +	characterSet = characterSet_;  	bold = bold_;  	italic = italic_;  	size = size_; @@ -73,7 +78,8 @@ void Style::Clear(Colour fore_, Colour back_, int size_, const char *fontName_,  bool Style::EquivalentFontTo(const Style *other) const {  	if (bold != other->bold ||  		italic != other->italic || -		size != other->size) +		size != other->size || +		characterSet != other->characterSet)  		return false;  	if (fontName == other->fontName)  		return true; @@ -99,7 +105,7 @@ void Style::Realise(Surface &surface, int zoomLevel, Style *defaultStyle) {  	if (aliasOfDefaultFont) {  		font.SetID(defaultStyle->font.GetID());  	} else if (fontName) { -		font.Create(fontName, deviceHeight, bold, italic); +		font.Create(fontName, characterSet, deviceHeight, bold, italic);  	} else {  		font.SetID(0);  	} diff --git a/src/Style.h b/src/Style.h index a8a0a859a..dc643d08d 100644 --- a/src/Style.h +++ b/src/Style.h @@ -15,6 +15,7 @@ public:  	bool italic;  	int size;  	const char *fontName; +	int characterSet;  	bool eolFilled;  	bool underline; @@ -32,7 +33,7 @@ public:  	Style &operator=(const Style &source);  	void Clear(Colour fore_, Colour back_,             	int size_,  -		const char *fontName_,  +		const char *fontName_, int characterSet_,  		bool bold_, bool italic_, bool eolFilled_, bool underline_);  	bool EquivalentFontTo(const Style *other) const;  	void Realise(Surface &surface, int zoomLevel, Style *defaultStyle=0); diff --git a/src/ViewStyle.cxx b/src/ViewStyle.cxx index 5fac88cea..580ecc71f 100644 --- a/src/ViewStyle.cxx +++ b/src/ViewStyle.cxx @@ -201,7 +201,8 @@ void ViewStyle::Refresh(Surface &surface) {  void ViewStyle::ResetDefaultStyle() {  	styles[STYLE_DEFAULT].Clear(Colour(0,0,0), Colour(0xff,0xff,0xff), -	        Platform::DefaultFontSize(), fontNames.Save(Platform::DefaultFont()), +	        Platform::DefaultFontSize(), fontNames.Save(Platform::DefaultFont()),  +		SC_CHARSET_DEFAULT,  		false, false, false, false);  } @@ -214,6 +215,7 @@ void ViewStyle::ClearStyles() {  				styles[STYLE_DEFAULT].back.desired,   				styles[STYLE_DEFAULT].size,   				styles[STYLE_DEFAULT].fontName,  +				styles[STYLE_DEFAULT].characterSet,   				styles[STYLE_DEFAULT].bold,   				styles[STYLE_DEFAULT].italic,  				styles[STYLE_DEFAULT].eolFilled, | 
