diff options
| author | nyamatongwe <unknown> | 2009-09-03 00:41:00 +0000 | 
|---|---|---|
| committer | nyamatongwe <unknown> | 2009-09-03 00:41:00 +0000 | 
| commit | d9b50ef1a69897f0465df61ab4592ee3e40db926 (patch) | |
| tree | 3bac05d1b7e2b0f676a9b79659a853c7f0d14f3a | |
| parent | 8e303fc5005cee63b4f29cd5508f236f9ad16878 (diff) | |
| download | scintilla-mirror-d9b50ef1a69897f0465df61ab4592ee3e40db926.tar.gz | |
Added white space mark size setting from Enrico Tröger.
| -rw-r--r-- | doc/ScintillaDoc.html | 9 | ||||
| -rw-r--r-- | include/Scintilla.h | 2 | ||||
| -rw-r--r-- | include/Scintilla.iface | 6 | ||||
| -rw-r--r-- | src/Editor.cxx | 12 | ||||
| -rw-r--r-- | src/ViewStyle.cxx | 2 | ||||
| -rw-r--r-- | src/ViewStyle.h | 1 | 
6 files changed, 30 insertions, 2 deletions
| diff --git a/doc/ScintillaDoc.html b/doc/ScintillaDoc.html index f4c0e93c6..976e5eb65 100644 --- a/doc/ScintillaDoc.html +++ b/doc/ScintillaDoc.html @@ -1950,6 +1950,9 @@ struct TextToFind {      useWhitespaceForeColour, int colour)</a><br />       <a class="message" href="#SCI_SETWHITESPACEBACK">SCI_SETWHITESPACEBACK(bool      useWhitespaceBackColour, int colour)</a><br /> +     <a class="message" href="#SCI_SETWHITESPACESIZE">SCI_SETWHITESPACESIZE(int +    size)</a><br /> +     <a class="message" href="#SCI_GETWHITESPACESIZE">SCI_GETWHITESPACESIZE</a><br />       <a class="message" href="#SCI_SETEXTRAASCENT">SCI_SETEXTRAASCENT(int extraAscent)</a><br />       <a class="message" href="#SCI_GETEXTRAASCENT">SCI_GETEXTRAASCENT</a><br />       <a class="message" href="#SCI_SETEXTRADESCENT">SCI_SETEXTRADESCENT(int extraDescent)</a><br /> @@ -2005,6 +2008,12 @@ struct TextToFind {      the lexer's colours with <code>SCI_SETWHITESPACEFORE</code> and      <code>SCI_SETWHITESPACEBACK</code>.</p> +     <b id="SCI_SETWHITESPACESIZE">SCI_SETWHITESPACESIZE(int size)</b><br /> +     <b id="SCI_GETWHITESPACESIZE">SCI_GETWHITESPACESIZE</b><br /> +     SCI_SETWHITESPACESIZE sets the size of the dots used for mark space characters. +     The SCI_GETWHITESPACESIZE message retrieves the current size. +    <p> +      <p>       <b id="SCI_SETEXTRAASCENT">SCI_SETEXTRAASCENT(int extraAscent)</b><br />       <b id="SCI_GETEXTRAASCENT">SCI_GETEXTRAASCENT</b><br /> diff --git a/include/Scintilla.h b/include/Scintilla.h index e20935d02..16d2d6910 100644 --- a/include/Scintilla.h +++ b/include/Scintilla.h @@ -254,6 +254,8 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam,  #define SCI_INDICGETUNDER 2511  #define SCI_SETWHITESPACEFORE 2084  #define SCI_SETWHITESPACEBACK 2085 +#define SCI_SETWHITESPACESIZE 2086 +#define SCI_GETWHITESPACESIZE 2087  #define SCI_SETSTYLEBITS 2090  #define SCI_GETSTYLEBITS 2091  #define SCI_SETLINESTATE 2092 diff --git a/include/Scintilla.iface b/include/Scintilla.iface index ee7ba0ba1..0b31c8d5b 100644 --- a/include/Scintilla.iface +++ b/include/Scintilla.iface @@ -571,6 +571,12 @@ fun void SetWhitespaceFore=2084(bool useSetting, colour fore)  # Set the background colour of all whitespace and whether to use this setting.  fun void SetWhitespaceBack=2085(bool useSetting, colour back) +# Set the size of the dots used to mark space characters. +fun void SetWhitespaceSize=2086(int size,) + +# Get the size of the dots used to mark space characters. +fun void GetWhitespaceSize=2087(,) +  # Divide each styling byte into lexical class bits (default: 5) and indicator  # bits (default: 3). If a lexer requires more than 32 lexical states, then this  # is used to expand the possible states. diff --git a/src/Editor.cxx b/src/Editor.cxx index b1065b77e..6866cbc0f 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -2807,8 +2807,8 @@ void Editor::DrawLine(Surface *surface, ViewStyle &vsDraw, int line, int lineVis  										surface->FillRectangle(rcSpace, textBack);  									}  									PRectangle rcDot(xmid + xStart - subLineStart, rcSegment.top + vsDraw.lineHeight / 2, 0, 0); -									rcDot.right = rcDot.left + 1; -									rcDot.bottom = rcDot.top + 1; +									rcDot.right = rcDot.left + vs.whitespaceSize; +									rcDot.bottom = rcDot.top + vs.whitespaceSize;  									surface->FillRectangle(rcDot, textFore);  								}  							} @@ -6863,6 +6863,14 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) {  		Redraw();  		break; +	case SCI_GETWHITESPACESIZE: +		return vs.whitespaceSize; + +	case SCI_SETWHITESPACESIZE: +		vs.whitespaceSize = static_cast<int>(wParam); +		Redraw(); +		break; +  	case SCI_POSITIONFROMPOINT:  		return PositionFromLocation(Point(wParam, lParam), false, false); diff --git a/src/ViewStyle.cxx b/src/ViewStyle.cxx index e162f722a..3dff07b9b 100644 --- a/src/ViewStyle.cxx +++ b/src/ViewStyle.cxx @@ -139,6 +139,7 @@ ViewStyle::ViewStyle(const ViewStyle &source) {  	fixedColumnWidth = source.fixedColumnWidth;  	zoomLevel = source.zoomLevel;  	viewWhitespace = source.viewWhitespace; +	whitespaceSize = source.whitespaceSize;  	viewIndentationGuides = source.viewIndentationGuides;  	viewEOL = source.viewEOL;  	showMarkedLines = source.showMarkedLines; @@ -242,6 +243,7 @@ void ViewStyle::Init(size_t stylesSize_) {  	}  	zoomLevel = 0;  	viewWhitespace = wsInvisible; +	whitespaceSize = 1;  	viewIndentationGuides = ivNone;  	viewEOL = false;  	showMarkedLines = true; diff --git a/src/ViewStyle.h b/src/ViewStyle.h index fe17a0aa7..1a85cf43f 100644 --- a/src/ViewStyle.h +++ b/src/ViewStyle.h @@ -92,6 +92,7 @@ public:  	int fixedColumnWidth;  	int zoomLevel;  	WhiteSpaceVisibility viewWhitespace; +	int whitespaceSize;  	IndentView viewIndentationGuides;  	bool viewEOL;  	bool showMarkedLines; | 
