From f17c785c236648e3370efc1006b81f2b73946ce0 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Tue, 16 Apr 2013 13:49:03 +1000 Subject: Add indicator INDIC_COMPOSITIONTHICK, a thick low underline, to mimic an appearance used for Asian language input composition. --- doc/ScintillaDoc.html | 10 ++++++++++ doc/ScintillaHistory.html | 8 ++++++++ include/Scintilla.h | 1 + include/Scintilla.iface | 1 + src/Indicator.cxx | 3 +++ 5 files changed, 23 insertions(+) diff --git a/doc/ScintillaDoc.html b/doc/ScintillaDoc.html index 18155093b..44b7449b7 100644 --- a/doc/ScintillaDoc.html +++ b/doc/ScintillaDoc.html @@ -3925,6 +3925,16 @@ struct Sci_TextToFind { Apperance will not be as good as INDIC_SQUIGGLE on OS X in HiDPI mode. + + INDIC_COMPOSITIONTHICK + + 14 + + A 2-pixel thick underline located at the bottom of the line to try to avoid touching the character base. + Each side is inset 1 pixel so that different indicators in this style covering a range appear isolated. + This is similar to an appearance used for Asian language input composition. + + diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html index 23c3990db..4abe22a14 100644 --- a/doc/ScintillaHistory.html +++ b/doc/ScintillaHistory.html @@ -446,6 +446,14 @@ #region folding added. Feature #985. +
  • + Add indicator INDIC_COMPOSITIONTHICK, a thick low underline, to mimic an + appearance used for Asian language input composition. +
  • +
  • + Fix multi-typing when two carets are located in virtual space on one line so that spaces + are preserved. +
  • Release 3.3.1 diff --git a/include/Scintilla.h b/include/Scintilla.h index 490cd3bf6..b175fc80f 100644 --- a/include/Scintilla.h +++ b/include/Scintilla.h @@ -264,6 +264,7 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam, #define INDIC_SQUIGGLELOW 11 #define INDIC_DOTBOX 12 #define INDIC_SQUIGGLEPIXMAP 13 +#define INDIC_COMPOSITIONTHICK 14 #define INDIC_MAX 31 #define INDIC_CONTAINER 8 #define INDIC0_MASK 0x20 diff --git a/include/Scintilla.iface b/include/Scintilla.iface index 364dec91c..449ef3110 100644 --- a/include/Scintilla.iface +++ b/include/Scintilla.iface @@ -581,6 +581,7 @@ val INDIC_DOTS=10 val INDIC_SQUIGGLELOW=11 val INDIC_DOTBOX=12 val INDIC_SQUIGGLEPIXMAP=13 +val INDIC_COMPOSITIONTHICK=14 val INDIC_MAX=31 val INDIC_CONTAINER=8 val INDIC0_MASK=0x20 diff --git a/src/Indicator.cxx b/src/Indicator.cxx index da75cbb85..ac7435156 100644 --- a/src/Indicator.cxx +++ b/src/Indicator.cxx @@ -152,6 +152,9 @@ void Indicator::Draw(Surface *surface, const PRectangle &rc, const PRectangle &r surface->FillRectangle(rcDot, fore); x += 2; } + } else if (style == INDIC_COMPOSITIONTHICK) { + PRectangle rcComposition(rc.left+1, rcLine.bottom-2, rc.right-1, rcLine.bottom); + surface->FillRectangle(rcComposition, fore); } else { // Either INDIC_PLAIN or unknown surface->MoveTo(rc.left, ymid); surface->LineTo(rc.right, ymid); -- cgit v1.2.3