diff options
author | nyamatongwe <devnull@localhost> | 2000-07-05 04:49:03 +0000 |
---|---|---|
committer | nyamatongwe <devnull@localhost> | 2000-07-05 04:49:03 +0000 |
commit | 63654a7adf0e2960f63d2e20ccf3900d274fa410 (patch) | |
tree | dbaabe79f4af1f9fef1b514ed64466165560a098 /src | |
parent | db04c9f43e663e771b0eeeca0cae3b8924afb35e (diff) | |
download | scintilla-mirror-63654a7adf0e2960f63d2e20ccf3900d274fa410.tar.gz |
Changed print colour mode to have black on white as well as invert light
states.
Diffstat (limited to 'src')
-rw-r--r-- | src/Editor.cxx | 18 | ||||
-rw-r--r-- | src/Editor.h | 2 |
2 files changed, 11 insertions, 9 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx index 4ac0b0d89..f1c497db2 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -34,7 +34,7 @@ Editor::Editor() { stylesValid = false; printMagnification = 0; - printInvertLight = false; + printColourMode = SC_PRINT_NORMAL; hideSelection = false; inOverstrike = false; @@ -1295,12 +1295,14 @@ long Editor::FormatRange(bool draw, FORMATRANGE *pfr) { vsPrint.selforeset = false; // White background for the line numbers vsPrint.styles[STYLE_LINENUMBER].back.desired = Colour(0xff,0xff,0xff); - if (printInvertLight) { - for (int sty=0;sty<=STYLE_MAX;sty++) { + for (int sty=0;sty<=STYLE_MAX;sty++) { + if (printColourMode == SC_PRINT_INVERTLIGHT) { vsPrint.styles[sty].fore.desired = InvertedLight(vsPrint.styles[sty].fore.desired); vsPrint.styles[sty].back.desired = InvertedLight(vsPrint.styles[sty].back.desired); + } else if (printColourMode == SC_PRINT_BLACKONWHITE) { + vsPrint.styles[sty].fore.desired = Colour(0,0,0); + vsPrint.styles[sty].back.desired = Colour(0xff,0xff,0xff); } - //vsPrint.styles[sty].size = vsPrint.styles[sty].size * printMagnification / 100; } vsPrint.styles[STYLE_LINENUMBER].back.desired = Colour(0xff,0xff,0xff); @@ -3390,12 +3392,12 @@ LRESULT Editor::WndProc(UINT iMessage, WPARAM wParam, LPARAM lParam) { case SCI_GETPRINTMAGNIFICATION: return printMagnification; - case SCI_SETPRINTINVERTLIGHT: - printInvertLight = wParam; + case SCI_SETPRINTCOLOURMODE: + printColourMode = wParam; break; - case SCI_GETPRINTINVERTLIGHT: - return printInvertLight; + case SCI_GETPRINTCOLOURMODE: + return printColourMode; case SCI_GETSTYLEAT: if (static_cast<short>(wParam) >= pdoc->Length()) diff --git a/src/Editor.h b/src/Editor.h index 456fdd1ea..c39157747 100644 --- a/src/Editor.h +++ b/src/Editor.h @@ -60,7 +60,7 @@ protected: // ScintillaBase subclass needs access to much of Editor ViewStyle vs; Palette palette; int printMagnification; - bool printInvertLight; + int printColourMode; bool hideSelection; bool inOverstrike; |