From 7ff487f2dda3411dd4cf34f5616c468435d2ef9b Mon Sep 17 00:00:00 2001 From: Neil Date: Tue, 10 Feb 2015 10:08:32 +1100 Subject: Add INDIC_FULLBOX. --- doc/ScintillaDoc.html | 15 +++++++++++++-- doc/ScintillaHistory.html | 6 ++++-- include/Scintilla.h | 1 + include/Scintilla.iface | 1 + src/Indicator.cxx | 7 +++++-- 5 files changed, 24 insertions(+), 6 deletions(-) diff --git a/doc/ScintillaDoc.html b/doc/ScintillaDoc.html index ed3f23966..66a529540 100644 --- a/doc/ScintillaDoc.html +++ b/doc/ScintillaDoc.html @@ -82,7 +82,7 @@

Scintilla Documentation

-

Last edited 10 January 2015 NH

+

Last edited 10 February 2015 NH

There is an overview of the internal design of Scintilla.
@@ -4058,7 +4058,18 @@ struct Sci_TextToFind { interior usually more transparent than the border. You can use SCI_INDICSETALPHA and SCI_INDICSETOUTLINEALPHA - to control the alpha transparency values. The default alpha values are 30 for fill colour and 50 for outline colour. + to control the alpha transparency values. The default alpha values are 30 for fill colour and 50 for outline colour. + This indicator does not colour the top pixel of the line so that indicators on contiguous lines are visually distinct + and disconnected. + + + + INDIC_FULLBOX + + 16 + + A rectangle around the text using translucent drawing similar to INDIC_STRAIGHTBOX + but covering the entire character area. diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html index 5aa8dac35..d3d270ce9 100644 --- a/doc/ScintillaHistory.html +++ b/doc/ScintillaHistory.html @@ -502,8 +502,10 @@ Verilog folder fixes a bug with inconsistent folding when fold.comment is on.

  • - Add new indicator INDIC_COMPOSITIONTHIN to mimic the appearance of non-target segments - in OS X IME. + Add new indicators INDIC_COMPOSITIONTHIN and INDIC_FULLBOX. + INDIC_COMPOSITIONTHIN is a thin underline that mimics the appearance of non-target segments in OS X IME. + INDIC_FULLBOX is similar to INDIC_STRAIGHTBOX but covers the entire character area which means that + indicators with this style on contiguous lines may touch.
  • Fix crash in SciTE when saving large files in background when closing application. diff --git a/include/Scintilla.h b/include/Scintilla.h index e8c5a7414..9668e7fb6 100644 --- a/include/Scintilla.h +++ b/include/Scintilla.h @@ -275,6 +275,7 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam, #define INDIC_SQUIGGLEPIXMAP 13 #define INDIC_COMPOSITIONTHICK 14 #define INDIC_COMPOSITIONTHIN 15 +#define INDIC_FULLBOX 16 #define INDIC_IME 32 #define INDIC_IME_MAX 35 #define INDIC_MAX 35 diff --git a/include/Scintilla.iface b/include/Scintilla.iface index b609c056f..4a405d9d3 100644 --- a/include/Scintilla.iface +++ b/include/Scintilla.iface @@ -606,6 +606,7 @@ val INDIC_DOTBOX=12 val INDIC_SQUIGGLEPIXMAP=13 val INDIC_COMPOSITIONTHICK=14 val INDIC_COMPOSITIONTHIN=15 +val INDIC_FULLBOX=16 val INDIC_IME=32 val INDIC_IME_MAX=35 val INDIC_MAX=35 diff --git a/src/Indicator.cxx b/src/Indicator.cxx index 9cbf7e12d..eea5877bb 100644 --- a/src/Indicator.cxx +++ b/src/Indicator.cxx @@ -116,9 +116,12 @@ void Indicator::Draw(Surface *surface, const PRectangle &rc, const PRectangle &r surface->LineTo(static_cast(rc.right), static_cast(rcLine.top) + 1); surface->LineTo(static_cast(rc.left), static_cast(rcLine.top) + 1); surface->LineTo(static_cast(rc.left), ymid + 1); - } else if (sacDraw.style == INDIC_ROUNDBOX || sacDraw.style == INDIC_STRAIGHTBOX) { + } else if (sacDraw.style == INDIC_ROUNDBOX || + sacDraw.style == INDIC_STRAIGHTBOX || + sacDraw.style == INDIC_FULLBOX) { PRectangle rcBox = rcLine; - rcBox.top = rcLine.top + 1; + if (sacDraw.style != INDIC_FULLBOX) + rcBox.top = rcLine.top + 1; rcBox.left = rc.left; rcBox.right = rc.right; surface->AlphaRectangle(rcBox, (sacDraw.style == INDIC_ROUNDBOX) ? 1 : 0, -- cgit v1.2.3