aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Style.cxx
diff options
context:
space:
mode:
authornyamatongwe <unknown>2000-05-15 14:19:52 +0000
committernyamatongwe <unknown>2000-05-15 14:19:52 +0000
commit02e0afd5a9d78f997df5e498550e5b2832ca5aa0 (patch)
treeb5e3048d8416aefd2a461149fbb755f71fc49f39 /src/Style.cxx
parente149d7bf98c013bad08a5c7aeb0e652e83042ce2 (diff)
downloadscintilla-mirror-02e0afd5a9d78f997df5e498550e5b2832ca5aa0.tar.gz
Support for different character sets for each style.
Diffstat (limited to 'src/Style.cxx')
-rw-r--r--src/Style.cxx18
1 files changed, 12 insertions, 6 deletions
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);
}