From c9209d18f432741eca0bfe33ee81b8b7dc05959e Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Wed, 4 May 2011 11:20:13 +1000 Subject: INDIC_STRAIGHTBOX added to indicators. Bug #3290435. From Marko Njezic. --- doc/ScintillaDoc.html | 21 ++++++++++++++++----- include/Scintilla.h | 1 + include/Scintilla.iface | 1 + src/Indicator.cxx | 4 ++-- 4 files changed, 20 insertions(+), 7 deletions(-) diff --git a/doc/ScintillaDoc.html b/doc/ScintillaDoc.html index a981711b2..6511269a5 100644 --- a/doc/ScintillaDoc.html +++ b/doc/ScintillaDoc.html @@ -79,7 +79,7 @@

Scintilla Documentation

-

Last edited 27/April/2011 NH

+

Last edited 3/May/2011 NH

There is an overview of the internal design of Scintilla.
@@ -3652,8 +3652,19 @@ 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. + + + + INDIC_STRAIGHTBOX + + 8 + + A rectangle around the text using translucent drawing with the + 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. @@ -3674,14 +3685,14 @@ struct Sci_TextToFind {

SCI_INDICSETALPHA(int indicatorNumber, int alpha)
SCI_INDICGETALPHA(int indicatorNumber)
These two messages set and get the alpha transparency used for drawing the - fill colour of the INDIC_ROUNDBOX rectangle. The alpha value can range from + fill colour of the INDIC_ROUNDBOX and INDIC_STRAIGHTBOX rectangle. The alpha value can range from 0 (completely transparent) to 255 (no transparency).

SCI_INDICSETOUTLINEALPHA(int indicatorNumber, int alpha)
SCI_INDICGETOUTLINEALPHA(int indicatorNumber)
These two messages set and get the alpha transparency used for drawing the - outline colour of the INDIC_ROUNDBOX rectangle. The alpha value can range from + outline colour of the INDIC_ROUNDBOX and INDIC_STRAIGHTBOX rectangle. The alpha value can range from 0 (completely transparent) to 255 (no transparency).

diff --git a/include/Scintilla.h b/include/Scintilla.h index 00df9c349..c0ed9545e 100644 --- a/include/Scintilla.h +++ b/include/Scintilla.h @@ -247,6 +247,7 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam, #define INDIC_HIDDEN 5 #define INDIC_BOX 6 #define INDIC_ROUNDBOX 7 +#define INDIC_STRAIGHTBOX 8 #define INDIC_MAX 31 #define INDIC_CONTAINER 8 #define INDIC0_MASK 0x20 diff --git a/include/Scintilla.iface b/include/Scintilla.iface index 309d5fe3e..2cd7eba1d 100644 --- a/include/Scintilla.iface +++ b/include/Scintilla.iface @@ -550,6 +550,7 @@ val INDIC_STRIKE=4 val INDIC_HIDDEN=5 val INDIC_BOX=6 val INDIC_ROUNDBOX=7 +val INDIC_STRAIGHTBOX=8 val INDIC_MAX=31 val INDIC_CONTAINER=8 val INDIC0_MASK=0x20 diff --git a/src/Indicator.cxx b/src/Indicator.cxx index f4e137286..5c352bf1c 100644 --- a/src/Indicator.cxx +++ b/src/Indicator.cxx @@ -67,12 +67,12 @@ void Indicator::Draw(Surface *surface, const PRectangle &rc, const PRectangle &r surface->LineTo(rc.right, rcLine.top+1); surface->LineTo(rc.left, rcLine.top+1); surface->LineTo(rc.left, ymid+1); - } else if (style == INDIC_ROUNDBOX) { + } else if (style == INDIC_ROUNDBOX || style == INDIC_STRAIGHTBOX) { PRectangle rcBox = rcLine; rcBox.top = rcLine.top + 1; rcBox.left = rc.left; rcBox.right = rc.right; - surface->AlphaRectangle(rcBox, 1, fore.allocated, fillAlpha, fore.allocated, outlineAlpha, 0); + surface->AlphaRectangle(rcBox, (style == INDIC_ROUNDBOX) ? 1 : 0, fore.allocated, fillAlpha, fore.allocated, outlineAlpha, 0); } else { // Either INDIC_PLAIN or unknown surface->MoveTo(rc.left, ymid); surface->LineTo(rc.right, ymid); -- cgit v1.2.3