diff options
author | nyamatongwe <unknown> | 2011-05-04 11:20:13 +1000 |
---|---|---|
committer | nyamatongwe <unknown> | 2011-05-04 11:20:13 +1000 |
commit | c9209d18f432741eca0bfe33ee81b8b7dc05959e (patch) | |
tree | 9deebf54a2edf66ee3dc2b8f75e543c16fa4bd41 | |
parent | da90f4795826d7d55759f757c08c8fb95239ed28 (diff) | |
download | scintilla-mirror-c9209d18f432741eca0bfe33ee81b8b7dc05959e.tar.gz |
INDIC_STRAIGHTBOX added to indicators. Bug #3290435.
From Marko Njezic.
-rw-r--r-- | doc/ScintillaDoc.html | 21 | ||||
-rw-r--r-- | include/Scintilla.h | 1 | ||||
-rw-r--r-- | include/Scintilla.iface | 1 | ||||
-rw-r--r-- | 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 @@ <h1>Scintilla Documentation</h1> - <p>Last edited 27/April/2011 NH</p> + <p>Last edited 3/May/2011 NH</p> <p>There is <a class="jump" href="Design.html">an overview of the internal design of Scintilla</a>.<br /> @@ -3652,8 +3652,19 @@ struct Sci_TextToFind { interior usually more transparent than the border. You can use <a class="message" href="#SCI_INDICSETALPHA">SCI_INDICSETALPHA</a> and <a class="message" href="#SCI_INDICSETOUTLINEALPHA">SCI_INDICSETOUTLINEALPHA</a> - to control the alpha transparency values. The default alpha values are 30 for fill colour and 50 for outline colour. - </td> + to control the alpha transparency values. The default alpha values are 30 for fill colour and 50 for outline colour.</td> + </tr> + + <tr> + <td align="left"><code>INDIC_STRAIGHTBOX</code></td> + + <td align="center">8</td> + + <td>A rectangle around the text using translucent drawing with the + interior usually more transparent than the border. You can use + <a class="message" href="#SCI_INDICSETALPHA">SCI_INDICSETALPHA</a> and + <a class="message" href="#SCI_INDICSETOUTLINEALPHA">SCI_INDICSETOUTLINEALPHA</a> + to control the alpha transparency values. The default alpha values are 30 for fill colour and 50 for outline colour.</td> </tr> </tbody> </table> @@ -3674,14 +3685,14 @@ struct Sci_TextToFind { <p><b id="SCI_INDICSETALPHA">SCI_INDICSETALPHA(int indicatorNumber, int alpha)</b><br /> <b id="SCI_INDICGETALPHA">SCI_INDICGETALPHA(int indicatorNumber)</b><br /> 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). </p> <p><b id="SCI_INDICSETOUTLINEALPHA">SCI_INDICSETOUTLINEALPHA(int indicatorNumber, int alpha)</b><br /> <b id="SCI_INDICGETOUTLINEALPHA">SCI_INDICGETOUTLINEALPHA(int indicatorNumber)</b><br /> 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). </p> 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); |