diff options
| -rw-r--r-- | doc/ScintillaDoc.html | 20 | ||||
| -rw-r--r-- | include/Scintilla.h | 2 | ||||
| -rw-r--r-- | include/Scintilla.iface | 6 | ||||
| -rw-r--r-- | src/Editor.cxx | 10 | ||||
| -rw-r--r-- | src/Indicator.cxx | 2 | ||||
| -rw-r--r-- | src/Indicator.h | 3 | 
6 files changed, 36 insertions, 7 deletions
| diff --git a/doc/ScintillaDoc.html b/doc/ScintillaDoc.html index 7fa92a273..5a241e6d6 100644 --- a/doc/ScintillaDoc.html +++ b/doc/ScintillaDoc.html @@ -79,7 +79,7 @@      <h1>Scintilla Documentation</h1> -    <p>Last edited 4/April/2011 NH</p> +    <p>Last edited 20/April/2011 NH</p>      <p>There is <a class="jump" href="Design.html">an overview of the internal design of      Scintilla</a>.<br /> @@ -3557,6 +3557,8 @@ struct Sci_TextToFind {       <a class="message" href="#SCI_INDICGETFORE">SCI_INDICGETFORE(int indicatorNumber)</a><br />       <a class="message" href="#SCI_INDICSETALPHA">SCI_INDICSETALPHA(int indicatorNumber, int alpha)</a><br />       <a class="message" href="#SCI_INDICGETALPHA">SCI_INDICGETALPHA(int indicatorNumber)</a><br /> +     <a class="message" href="#SCI_INDICSETOUTLINEALPHA">SCI_INDICSETOUTLINEALPHA(int indicatorNumber, int alpha)</a><br /> +     <a class="message" href="#SCI_INDICGETOUTLINEALPHA">SCI_INDICGETOUTLINEALPHA(int indicatorNumber)</a><br />       <a class="message" href="#SCI_INDICSETUNDER">SCI_INDICSETUNDER(int indicatorNumber, bool under)</a><br />       <a class="message" href="#SCI_INDICGETUNDER">SCI_INDICGETUNDER(int indicatorNumber)</a><br />      </code> @@ -3641,9 +3643,10 @@ struct Sci_TextToFind {            <td align="center">7</td>            <td>A rectangle with rounded corners around the text using translucent drawing with the -              interior more transparent than the border. You can use -              <a class="message" href="#SCI_INDICSETALPHA">SCI_INDICSETALPHA</a> -              to control the alpha transparency value. The default alpha value is 30. +              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> @@ -3665,7 +3668,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 color of the INDIC_ROUNDBOX rectangle. The alpha value can range from +     fill colour of the INDIC_ROUNDBOX 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       0 (completely transparent) to 255 (no transparency).       </p> diff --git a/include/Scintilla.h b/include/Scintilla.h index 6cb9b4b81..0405fe844 100644 --- a/include/Scintilla.h +++ b/include/Scintilla.h @@ -709,6 +709,8 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam,  #define SCI_GETKEYSUNICODE 2522  #define SCI_INDICSETALPHA 2523  #define SCI_INDICGETALPHA 2524 +#define SCI_INDICSETOUTLINEALPHA 2558 +#define SCI_INDICGETOUTLINEALPHA 2559  #define SCI_SETEXTRAASCENT 2525  #define SCI_GETEXTRAASCENT 2526  #define SCI_SETEXTRADESCENT 2527 diff --git a/include/Scintilla.iface b/include/Scintilla.iface index 9ff8e3feb..ef2bac944 100644 --- a/include/Scintilla.iface +++ b/include/Scintilla.iface @@ -1890,6 +1890,12 @@ set void IndicSetAlpha=2523(int indicator, int alpha)  # Get the alpha fill colour of the given indicator.  get int IndicGetAlpha=2524(int indicator,) +# Set the alpha outline colour of the given indicator. +set void IndicSetOutlineAlpha=2558(int indicator, int alpha) + +# Get the alpha outline colour of the given indicator. +get int IndicGetOutlineAlpha=2559(int indicator,) +  # Set extra ascent for each line  set void SetExtraAscent=2525(int extraAscent,) diff --git a/src/Editor.cxx b/src/Editor.cxx index b0560e758..2e8654ca4 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -8212,6 +8212,16 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) {  	case SCI_INDICGETALPHA:  		return (wParam <= INDIC_MAX) ? vs.indicators[wParam].fillAlpha : 0; +	case SCI_INDICSETOUTLINEALPHA: +		if (wParam <= INDIC_MAX && lParam >=0 && lParam <= 255) { +			vs.indicators[wParam].outlineAlpha = lParam; +			InvalidateStyleRedraw(); +		} +		break; + +	case SCI_INDICGETOUTLINEALPHA: +		return (wParam <= INDIC_MAX) ? vs.indicators[wParam].outlineAlpha : 0; +  	case SCI_SETINDICATORCURRENT:  		pdoc->decorations.SetCurrentIndicator(wParam);  		break; diff --git a/src/Indicator.cxx b/src/Indicator.cxx index da9531224..f4e137286 100644 --- a/src/Indicator.cxx +++ b/src/Indicator.cxx @@ -72,7 +72,7 @@ void Indicator::Draw(Surface *surface, const PRectangle &rc, const PRectangle &r  		rcBox.top = rcLine.top + 1;  		rcBox.left = rc.left;  		rcBox.right = rc.right; -		surface->AlphaRectangle(rcBox, 1, fore.allocated, fillAlpha, fore.allocated, 50, 0); +		surface->AlphaRectangle(rcBox, 1, fore.allocated, fillAlpha, fore.allocated, outlineAlpha, 0);  	} else {	// Either INDIC_PLAIN or unknown  		surface->MoveTo(rc.left, ymid);  		surface->LineTo(rc.right, ymid); diff --git a/src/Indicator.h b/src/Indicator.h index 42b56f07e..e787b592d 100644 --- a/src/Indicator.h +++ b/src/Indicator.h @@ -20,7 +20,8 @@ public:  	bool under;  	ColourPair fore;  	int fillAlpha; -	Indicator() : style(INDIC_PLAIN), under(false), fore(ColourDesired(0,0,0)), fillAlpha(30) { +	int outlineAlpha; +	Indicator() : style(INDIC_PLAIN), under(false), fore(ColourDesired(0,0,0)), fillAlpha(30), outlineAlpha(50) {  	}  	void Draw(Surface *surface, const PRectangle &rc, const PRectangle &rcLine);  }; | 
