aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2017-07-01 12:20:47 +1000
committerNeil <nyamatongwe@gmail.com>2017-07-01 12:20:47 +1000
commited43d472889655b39777a7b2e8f01e487acf62b4 (patch)
treee50682f73436bdef0fd9b3672118503a643c08d2
parent97ab4ab3569aa625c0ed2722080619c97bd52c17 (diff)
downloadscintilla-mirror-ed43d472889655b39777a7b2e8f01e487acf62b4.tar.gz
Deprecate single phase drawing.
-rw-r--r--doc/ScintillaDoc.html30
-rw-r--r--doc/ScintillaHistory.html4
-rw-r--r--include/Scintilla.h5
-rw-r--r--include/Scintilla.iface15
-rw-r--r--src/Editor.cxx2
5 files changed, 37 insertions, 19 deletions
diff --git a/doc/ScintillaDoc.html b/doc/ScintillaDoc.html
index 32408be16..20a2925c6 100644
--- a/doc/ScintillaDoc.html
+++ b/doc/ScintillaDoc.html
@@ -95,6 +95,9 @@
.provisional {
background: #FFB000;
}
+ .deprecated {
+ text-decoration: line-through red;
+ }
.parameter {
font-style:italic;
}
@@ -3578,8 +3581,6 @@ struct Sci_TextToFind {
<a class="message" href="#SCI_GETBUFFEREDDRAW">SCI_GETBUFFEREDDRAW &rarr; bool</a><br />
<a class="message" href="#SCI_SETPHASESDRAW">SCI_SETPHASESDRAW(int phases)</a><br />
<a class="message" href="#SCI_GETPHASESDRAW">SCI_GETPHASESDRAW &rarr; int</a><br />
- <a class="message" href="#SCI_SETTWOPHASEDRAW">SCI_SETTWOPHASEDRAW(bool twoPhase)</a><br />
- <a class="message" href="#SCI_GETTWOPHASEDRAW">SCI_GETTWOPHASEDRAW &rarr; bool</a><br />
<a class="message" href="#SCI_SETTECHNOLOGY">SCI_SETTECHNOLOGY(int technology)</a><br />
<a class="message" href="#SCI_GETTECHNOLOGY">SCI_GETTECHNOLOGY &rarr; int</a><br />
<a class="message" href="#SCI_SETFONTQUALITY">SCI_SETFONTQUALITY(int fontQuality)</a><br />
@@ -3620,12 +3621,15 @@ struct Sci_TextToFind {
<b id="SCI_GETPHASESDRAW">SCI_GETPHASESDRAW &rarr; int</b><br />
There are several orders in which the text area may be drawn offering a trade-off between speed
and allowing all pixels of text to be seen even when they overlap other elements.</p>
- <p>In single phase drawing (<code>SC_PHASES_ONE</code>) each
+ <p>In single phase drawing (<code class="deprecated">SC_PHASES_ONE</code>) each
run of characters in one style is drawn along with its background.
If a character overhangs the end of a run, such as in "<i>V</i>_" where the
"<i>V</i>" is in a different style from the "_", then this can cause the right hand
side of the "<i>V</i>" to be overdrawn by the background of the "_" which
cuts it off.</p>
+ <p>
+ Single phase drawing is deprecated and should not be used by applications.
+ </p>
<p>Two phase drawing (<code>SC_PHASES_TWO</code>)
fixes this by drawing all the backgrounds of a line first and then drawing the text
in transparent mode. Lines are drawn separately and no line will overlap another
@@ -3648,11 +3652,6 @@ struct Sci_TextToFind {
SCI_SETLAYOUTCACHE(SC_CACHE_PAGE)</code></a>
or higher can ensure that multiple phase drawing is not significantly slower.</p>
- <p><b id="SCI_SETTWOPHASEDRAW">SCI_SETTWOPHASEDRAW(bool twoPhase)</b><br />
- <b id="SCI_GETTWOPHASEDRAW">SCI_GETTWOPHASEDRAW &rarr; bool</b><br />
- This property has been replaced with the preceding PHASESDRAW property which is more general,
- allowing multiple phase drawing as well as one and two phase drawing.</p>
-
<p><b id="SCI_SETTECHNOLOGY">SCI_SETTECHNOLOGY(int technology)</b><br />
<b id="SCI_GETTECHNOLOGY">SCI_GETTECHNOLOGY &rarr; int</b><br />
The technology property allows choosing between different drawing APIs and options.
@@ -4531,8 +4530,8 @@ struct Sci_TextToFind {
<p><b id="SCI_INDICSETUNDER">SCI_INDICSETUNDER(int indicator, bool under)</b><br />
<b id="SCI_INDICGETUNDER">SCI_INDICGETUNDER(int indicator) &rarr; bool</b><br />
These two messages set and get whether an indicator is drawn under text or over(default).
- Drawing under text works only for indicators when <a class="message" href="#SCI_SETTWOPHASEDRAW">two phase drawing</a>
- is enabled.</p>
+ Drawing under text does not work with the deprecated <a class="message" href="#SCI_SETPHASESDRAW">single phase drawing</a>
+ mode.</p>
<p><b id="SCI_INDICSETHOVERSTYLE">SCI_INDICSETHOVERSTYLE(int indicator, int
indicatorStyle)</b><br />
@@ -8136,6 +8135,8 @@ EM_FORMATRANGE
<code>
<a class="message" href="#SCI_SETKEYSUNICODE">SCI_SETKEYSUNICODE(bool keysUnicode)</a><br />
<a class="message" href="#SCI_GETKEYSUNICODE">SCI_GETKEYSUNICODE &rarr; bool</a><br />
+ <a class="message" href="#SCI_SETTWOPHASEDRAW">SCI_SETTWOPHASEDRAW(bool twoPhase)</a><br />
+ <a class="message" href="#SCI_GETTWOPHASEDRAW">SCI_GETTWOPHASEDRAW &rarr; bool</a><br />
<a class="message" href="#SCI_SETSTYLEBITS">SCI_SETSTYLEBITS(int bits)</a><br />
<a class="message" href="#SCI_GETSTYLEBITS">SCI_GETSTYLEBITS &rarr; int</a><br />
<a class="message" href="#SCI_GETSTYLEBITSNEEDED">SCI_GETSTYLEBITSNEEDED &rarr; int</a><br />
@@ -8145,6 +8146,15 @@ EM_FORMATRANGE
<b id="SCI_GETKEYSUNICODE">SCI_GETKEYSUNICODE &rarr; bool</b> Deprecated<br />
On Windows, Scintilla no longer supports narrow character windows so input is always treated as Unicode.</p>
+ <p><b id="SCI_SETTWOPHASEDRAW">SCI_SETTWOPHASEDRAW(bool twoPhase)</b><br />
+ <b id="SCI_GETTWOPHASEDRAW">SCI_GETTWOPHASEDRAW &rarr; bool</b><br />
+ This property has been replaced with the preceding PHASESDRAW property which is more general,
+ allowing multiple phase drawing as well as one and two phase drawing.</p>
+
+ <p>Single phase drawing <code>SC_PHASES_ONE</code>, is deprecated and should be replaced with
+ 2-phase <code>SC_PHASES_TWO</code> or multi-phase <code>SC_PHASES_MULTIPLE</code> drawing.
+ </p>
+
<p>The following are features that should be removed from calling code but are still
defined to avoid breaking callers.</p>
diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html
index 629208d68..a2f255b16 100644
--- a/doc/ScintillaHistory.html
+++ b/doc/ScintillaHistory.html
@@ -882,6 +882,10 @@
have been removed and can no longer be used in client code.
</li>
<li>
+ Single phase drawing SC_PHASES_ONE is deprecated along with the
+ SCI_SETTWOPHASEDRAW and SCI_GETTWOPHASEDRAW messages.
+ </li>
+ <li>
Accessibility support allowing screen readers to work added on GTK+ and Cocoa.
</li>
<li>
diff --git a/include/Scintilla.h b/include/Scintilla.h
index 6f18af9a9..1a0108270 100644
--- a/include/Scintilla.h
+++ b/include/Scintilla.h
@@ -571,8 +571,6 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam,
#define SCI_SETVSCROLLBAR 2280
#define SCI_GETVSCROLLBAR 2281
#define SCI_APPENDTEXT 2282
-#define SCI_GETTWOPHASEDRAW 2283
-#define SCI_SETTWOPHASEDRAW 2284
#define SC_PHASES_ONE 0
#define SC_PHASES_TWO 1
#define SC_PHASES_MULTIPLE 2
@@ -1205,6 +1203,9 @@ struct SCNotification {
#define SCI_SETKEYSUNICODE 2521
#define SCI_GETKEYSUNICODE 2522
+#define SCI_GETTWOPHASEDRAW 2283
+#define SCI_SETTWOPHASEDRAW 2284
+
#define CharacterRange Sci_CharacterRange
#define TextRange Sci_TextRange
#define TextToFind Sci_TextToFind
diff --git a/include/Scintilla.iface b/include/Scintilla.iface
index 135be3b4e..8406fa6fc 100644
--- a/include/Scintilla.iface
+++ b/include/Scintilla.iface
@@ -1419,13 +1419,6 @@ get bool GetVScrollBar=2281(,)
# Append a string to the end of the document without changing the selection.
fun void AppendText=2282(int length, string text)
-# Is drawing done in two phases with backgrounds drawn before foregrounds?
-get bool GetTwoPhaseDraw=2283(,)
-
-# In twoPhaseDraw mode, drawing is performed in two phases, first the background
-# and then the foreground. This avoids chopping off characters that overlap the next run.
-set void SetTwoPhaseDraw=2284(bool twoPhase,)
-
enu PhasesDraw=SC_PHASES_
val SC_PHASES_ONE=0
val SC_PHASES_TWO=1
@@ -4870,3 +4863,11 @@ set void SetKeysUnicode=2521(bool keysUnicode,)
# Are keys always interpreted as Unicode?
get bool GetKeysUnicode=2522(,)
+
+# Is drawing done in two phases with backgrounds drawn before foregrounds?
+get bool GetTwoPhaseDraw=2283(,)
+
+# In twoPhaseDraw mode, drawing is performed in two phases, first the background
+# and then the foreground. This avoids chopping off characters that overlap the next run.
+set void SetTwoPhaseDraw=2284(bool twoPhase,)
+
diff --git a/src/Editor.cxx b/src/Editor.cxx
index bf81bb8ea..2294105b2 100644
--- a/src/Editor.cxx
+++ b/src/Editor.cxx
@@ -6413,6 +6413,7 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) {
case SCI_GETBUFFEREDDRAW:
return view.bufferedDraw;
+#ifdef INCLUDE_DEPRECATED_FEATURES
case SCI_GETTWOPHASEDRAW:
return view.phasesDraw == EditView::phasesTwo;
@@ -6420,6 +6421,7 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) {
if (view.SetTwoPhaseDraw(wParam != 0))
InvalidateStyleRedraw();
break;
+#endif
case SCI_GETPHASESDRAW:
return view.phasesDraw;