Hi Enrico,
On Sat, 2008 Dec 06 13:44:42 +0100, Enrico Tröger wrote:
> On Sat, 6 Dec 2008 06:24:00 -0500, "Daniel Richard G."
> <[EMAIL PROTECTED]> wrote:
>
> >Scintilla CVS should have a bit of code I submitted a while ago that
> >implements SCI_{GET,SET}SPACEDOTSIZE. I've been using this with a
> >hard-coded value of 3, but perhaps some folks would like a pref... :-)
>
> that'd be awesome but I couldn't find those messages, not even in
> Scintilla CVS. I guess it wasn't yet committed.
Damn. This must've been over a year ago, too.
Attached is my diff against Scintilla CVS, with some unrelated changes
edited out. Give it a try if it looks interesting... let me know if it
breaks for any reason.
And everyone bug the Scintilla maintainer to apply it already ^_^
--Daniel
--
NAME = Daniel Richard G. ## Remember, skunks _\|/_ meef?
EMAIL1 = [EMAIL PROTECTED] ## don't smell bad--- (/o|o\) /
EMAIL2 = [EMAIL PROTECTED] ## it's the people who < (^),>
WWW = http://www.******.org/ ## annoy them that do! / \
--
(****** = site not yet online)
Index: include/Scintilla.h
===================================================================
RCS file: /cvsroot/scintilla/scintilla/include/Scintilla.h,v
retrieving revision 1.199
diff -u -r1.199 Scintilla.h
--- include/Scintilla.h 27 Jul 2008 08:17:23 -0000 1.199
+++ include/Scintilla.h 6 Dec 2008 20:27:00 -0000
@@ -685,6 +685,8 @@
#define SCI_GETPROPERTYEXPANDED 4009
#define SCI_GETPROPERTYINT 4010
#define SCI_GETSTYLEBITSNEEDED 4011
+#define SCI_GETSPACEDOTSIZE 2520
+#define SCI_SETSPACEDOTSIZE 2521
#define SC_MOD_INSERTTEXT 0x1
#define SC_MOD_DELETETEXT 0x2
#define SC_MOD_CHANGESTYLE 0x4
Index: include/Scintilla.iface
===================================================================
RCS file: /cvsroot/scintilla/scintilla/include/Scintilla.iface,v
retrieving revision 1.338
diff -u -r1.338 Scintilla.iface
--- include/Scintilla.iface 27 Nov 2008 22:42:50 -0000 1.338
+++ include/Scintilla.iface 6 Dec 2008 20:27:00 -0000
@@ -1854,6 +1854,13 @@
# Retrieve the number of bits the current lexer needs for styling.
get int GetStyleBitsNeeded=4011(,)
+# Retrieve the current size of the dot used to indicate a space character.
+get int GetSpaceDotSize=2520(,)
+
+# Set the size of the dot used to indicate a space (when visible whitespace is enabled).
+# The "dot" is currently drawn as an NxN-pixel square, where N is the size given here.
+set void SetSpaceDotSize=2521(int size,)
+
# Notifications
# Type of modification and the action which caused the modification.
# These are defined as a bit mask to make it easy to specify which notifications are wanted.
Index: src/Editor.cxx
===================================================================
RCS file: /cvsroot/scintilla/scintilla/src/Editor.cxx,v
retrieving revision 1.419
diff -u -r1.419 Editor.cxx
--- src/Editor.cxx 21 Nov 2008 04:14:13 -0000 1.419
+++ src/Editor.cxx 6 Dec 2008 20:27:00 -0000
@@ -2524,8 +2542,11 @@
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;
+ int radius = vsDraw.spaceDotSize >> 1;
+ rcDot.left -= radius;
+ rcDot.top -= radius;
+ rcDot.right = rcDot.left + vsDraw.spaceDotSize;
+ rcDot.bottom = rcDot.top + vsDraw.spaceDotSize;
surface->FillRectangle(rcDot, textFore);
}
}
@@ -6475,6 +6502,14 @@
Redraw();
break;
+ case SCI_GETSPACEDOTSIZE:
+ return vs.spaceDotSize;
+
+ case SCI_SETSPACEDOTSIZE:
+ vs.spaceDotSize = wParam;
+ Redraw();
+ break;
+
case SCI_POSITIONFROMPOINT:
return PositionFromLocation(Point(wParam, lParam));
Index: src/ViewStyle.cxx
===================================================================
RCS file: /cvsroot/scintilla/scintilla/src/ViewStyle.cxx,v
retrieving revision 1.42
diff -u -r1.42 ViewStyle.cxx
--- src/ViewStyle.cxx 12 Jul 2007 12:59:47 -0000 1.42
+++ src/ViewStyle.cxx 6 Dec 2008 20:27:00 -0000
@@ -137,6 +137,7 @@
viewWhitespace = source.viewWhitespace;
viewIndentationGuides = source.viewIndentationGuides;
viewEOL = source.viewEOL;
+ spaceDotSize = source.spaceDotSize;
showMarkedLines = source.showMarkedLines;
extraFontFlag = source.extraFontFlag;
}
@@ -231,6 +232,7 @@
viewWhitespace = wsInvisible;
viewIndentationGuides = ivNone;
viewEOL = false;
+ spaceDotSize = 1;
showMarkedLines = true;
extraFontFlag = false;
}
Index: src/ViewStyle.h
===================================================================
RCS file: /cvsroot/scintilla/scintilla/src/ViewStyle.h,v
retrieving revision 1.24
diff -u -r1.24 ViewStyle.h
--- src/ViewStyle.h 12 Jul 2007 12:59:47 -0000 1.24
+++ src/ViewStyle.h 6 Dec 2008 20:27:00 -0000
@@ -91,6 +91,7 @@
WhiteSpaceVisibility viewWhitespace;
IndentView viewIndentationGuides;
bool viewEOL;
+ int spaceDotSize;
bool showMarkedLines;
ColourPair caretcolour;
bool showCaretLineBackground;
_______________________________________________
Geany mailing list
[email protected]
http://lists.uvena.de/cgi-bin/mailman/listinfo/geany