SF.net SVN: geany: [2312] trunk
eht16 at users.sourceforge.net
eht16 at xxxxx
Fri Mar 7 15:42:47 UTC 2008
Revision: 2312
http://geany.svn.sourceforge.net/geany/?rev=2312&view=rev
Author: eht16
Date: 2008-03-07 07:42:46 -0800 (Fri, 07 Mar 2008)
Log Message:
-----------
Add opton to style "caret" to change the caret into a block caret.
Add new styles "translucency", "line_wrap_visuals" and "line_wrap_indent" to filetypes.common (#1905141).
Modified Paths:
--------------
trunk/ChangeLog
trunk/data/filetypes.common
trunk/doc/geany.html
trunk/doc/geany.txt
trunk/src/highlighting.c
trunk/src/sciwrappers.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2008-03-07 14:21:01 UTC (rev 2311)
+++ trunk/ChangeLog 2008-03-07 15:42:46 UTC (rev 2312)
@@ -6,6 +6,11 @@
* src/keyfile.c:
When opening session files, don't try to set document properties if
the document can't be opened.
+ * data/filetypes.common, doc/geany.html, doc/geany.txt,
+ src/highlighting.c, src/sciwrappers.c:
+ Add opton to style "caret" to change the caret into a block caret.
+ Add new styles "translucency", "line_wrap_visuals" and
+ "line_wrap_indent" to filetypes.common (#1905141).
2008-03-06 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
Modified: trunk/data/filetypes.common
===================================================================
--- trunk/data/filetypes.common 2008-03-07 14:21:01 UTC (rev 2311)
+++ trunk/data/filetypes.common 2008-03-07 15:42:46 UTC (rev 2312)
@@ -20,7 +20,14 @@
# use the third argument to enable or disable the highlighting of the current line (has to be true/false)
current_line=0x0;0xf0f0f0;true;false
-# colour of the caret(the blinking cursor), only first argument is interpreted
+# translucency for the current line(first argument) and the selection (second argument)
+# values between 0 and 256 are accepted. Note for Windows 95, 98 and ME users:
+# keep this value at 256 to disable translucency otherwise Geany might crash
+# only the first and second argument is interpreted
+translucency=256;256;false;false
+
+# colour of the caret(the blinking cursor), only first and third argument is interpreted
+# set the third argument to true to change the caret into a block caret
caret=0x000000;0x0;false;false
# width of the caret(the blinking cursor), only first argument is interpreted
@@ -48,7 +55,19 @@
# only first argument is interpreted, sets whether all defined colours should be inverted
invert_all=0;0;false;false
+# only first and second argument is interpreted
+# first argument: drawing of visual flags to indicate a line is wrapped. This is a bitmask of the
+# values: 0 - No visual flags, 1 - Visual flag at end of subline of a wrapped line, 2 - Visual flag
+# at begin of subline of a wrapped line, Subline is indented by at least 1 to make room for the flag.
+# second argument: wether the visual flags to indicate a line is wrapped are drawn near the border
+# or near the text. This is a bitmask of the values: 0 - Visual flags drawn near border,
+# 1 - Visual flag at end of subline drawn near text, 2 - Visual flag at begin of subline drawn near text
+line_wrap_visuals=3;0;false;false
+# sets the size of indentation of sublines for wrapped lines in terms of the width of a space,
+# only first argument is interpreted
+line_wrap_indent=0;0;false;false
+
[settings]
# which characters should be skipped when moving (or included when deleting) to word boundaries
# should always include space and tab (\s\t)
Modified: trunk/doc/geany.html
===================================================================
--- trunk/doc/geany.html 2008-03-07 14:21:01 UTC (rev 2311)
+++ trunk/doc/geany.html 2008-03-07 15:42:46 UTC (rev 2312)
@@ -6,7 +6,7 @@
<meta name="generator" content="Docutils 0.4.1: http://docutils.sourceforge.net/" />
<title>Geany</title>
<meta name="authors" content="Enrico Tröger Nick Treleaven Frank Lanitz" />
-<meta name="date" content="2008-02-18" />
+<meta name="date" content="2008-02-21" />
<style type="text/css">
/*
@@ -133,7 +133,7 @@
<br />Nick Treleaven
<br />Frank Lanitz</td></tr>
<tr><th class="docinfo-name">Date:</th>
-<td>2008-02-18</td></tr>
+<td>2008-02-21</td></tr>
<tr><th class="docinfo-name">Version:</th>
<td>0.14</td></tr>
</tbody>
@@ -2437,8 +2437,9 @@
<p class="last"><em>Example:</em> <tt class="docutils literal"><span class="pre">brace_bad=0x0000ff;0xFFFFFF;true;false</span></tt></p>
</dd>
<dt>caret</dt>
-<dd><p class="first">The style for colouring the caret(the blinking cursor). Only the
-first argument is interpreted.</p>
+<dd><p class="first">The style for colouring the caret(the blinking cursor). Only first
+and third argument is interpreted.
+Set the third argument to true to change the caret into a block caret.</p>
<p class="last"><em>Example:</em> <tt class="docutils literal"><span class="pre">caret=0x000000;0x0;false;false</span></tt></p>
</dd>
<dt>caret_width</dt>
@@ -2504,6 +2505,39 @@
colours.</p>
<p class="last"><em>Example:</em> <tt class="docutils literal"><span class="pre">invert_all=0;0;false;false</span></tt></p>
</dd>
+<dt>line_wrap_visuals</dt>
+<dd><p class="first">First argument: drawing of visual flags to indicate a line is wrapped.
+This is a bitmask of the values:</p>
+<ul class="simple">
+<li>0 -- No visual flags</li>
+<li>1 -- Visual flag at end of subline of a wrapped line</li>
+<li>2 -- Visual flag at begin of subline of a wrapped line. Subline is
+indented by at least 1 to make room for the flag.</li>
+</ul>
+<p>Second argument: wether the visual flags to indicate a line is wrapped
+are drawn near the border or near the text. This is a bitmask of the values:</p>
+<ul class="simple">
+<li>0 -- Visual flags drawn near border</li>
+<li>1 -- Visual flag at end of subline drawn near text</li>
+<li>2 -- Visual flag at begin of subline drawn near text</li>
+</ul>
+<p>Only first and second argument is interpreted.</p>
+<p class="last"><em>Example:</em> <tt class="docutils literal"><span class="pre">line_wrap_visuals=3;0;false;false</span></tt></p>
+</dd>
+<dt>line_wrap_indent</dt>
+<dd><p class="first">Sets the size of indentation of sublines for wrapped lines in terms
+of the width of a space.</p>
+<p>Only first argument is interpreted.</p>
+<p class="last"><em>Example:</em> <tt class="docutils literal"><span class="pre">line_wrap_indent=0;0;false;false</span></tt></p>
+</dd>
+<dt>translucency</dt>
+<dd><p class="first">Translucency for the current line(first argument) and the selection
+(second argument). Values between 0 and 256 are accepted.</p>
+<p>Note for Windows 95, 98 and ME users:
+keep this value at 256 to disable translucency otherwise Geany might crash.</p>
+<p>Only the first and second argument is interpreted.</p>
+<p class="last"><em>Example:</em> <tt class="docutils literal"><span class="pre">translucency=256;256;false;false</span></tt></p>
+</dd>
<dt>whitespace_chars</dt>
<dd><p class="first">Characters to treat as whitespace. These characters are ignored
when moving, selecting and deleting across word boundaries
@@ -3428,7 +3462,7 @@
<div class="footer">
<hr class="footer" />
<a class="reference" href="geany.txt">View document source</a>.
-Generated on: 2008-02-21 15:39 UTC.
+Generated on: 2008-03-07 15:41 UTC.
Generated by <a class="reference" href="http://docutils.sourceforge.net/">Docutils</a> from <a class="reference" href="http://docutils.sourceforge.net/rst.html">reStructuredText</a> source.
</div>
Modified: trunk/doc/geany.txt
===================================================================
--- trunk/doc/geany.txt 2008-03-07 14:21:01 UTC (rev 2311)
+++ trunk/doc/geany.txt 2008-03-07 15:42:46 UTC (rev 2312)
@@ -2158,8 +2158,9 @@
*Example:* ``brace_bad=0x0000ff;0xFFFFFF;true;false``
caret
- The style for colouring the caret(the blinking cursor). Only the
- first argument is interpreted.
+ The style for colouring the caret(the blinking cursor). Only first
+ and third argument is interpreted.
+ Set the third argument to true to change the caret into a block caret.
*Example:* ``caret=0x000000;0x0;false;false``
@@ -2234,6 +2235,45 @@
*Example:* ``invert_all=0;0;false;false``
+line_wrap_visuals
+ First argument: drawing of visual flags to indicate a line is wrapped.
+ This is a bitmask of the values:
+
+ * 0 -- No visual flags
+ * 1 -- Visual flag at end of subline of a wrapped line
+ * 2 -- Visual flag at begin of subline of a wrapped line. Subline is
+ indented by at least 1 to make room for the flag.
+
+ Second argument: wether the visual flags to indicate a line is wrapped
+ are drawn near the border or near the text. This is a bitmask of the values:
+
+ * 0 -- Visual flags drawn near border
+ * 1 -- Visual flag at end of subline drawn near text
+ * 2 -- Visual flag at begin of subline drawn near text
+
+ Only first and second argument is interpreted.
+
+ *Example:* ``line_wrap_visuals=3;0;false;false``
+
+line_wrap_indent
+ Sets the size of indentation of sublines for wrapped lines in terms
+ of the width of a space.
+
+ Only first argument is interpreted.
+
+ *Example:* ``line_wrap_indent=0;0;false;false``
+
+translucency
+ Translucency for the current line(first argument) and the selection
+ (second argument). Values between 0 and 256 are accepted.
+
+ Note for Windows 95, 98 and ME users:
+ keep this value at 256 to disable translucency otherwise Geany might crash.
+
+ Only the first and second argument is interpreted.
+
+ *Example:* ``translucency=256;256;false;false``
+
whitespace_chars
Characters to treat as whitespace. These characters are ignored
when moving, selecting and deleting across word boundaries
Modified: trunk/src/highlighting.c
===================================================================
--- trunk/src/highlighting.c 2008-03-07 14:21:01 UTC (rev 2311)
+++ trunk/src/highlighting.c 2008-03-07 15:42:46 UTC (rev 2312)
@@ -67,6 +67,9 @@
GCS_CARET,
GCS_INDENT_GUIDE,
GCS_WHITE_SPACE,
+ GCS_LINE_WRAP_VISUALS,
+ GCS_LINE_WRAP_INDENT,
+ GCS_TRANSLUCENCY,
GCS_MAX
};
@@ -377,6 +380,17 @@
get_keyfile_int(config, config_home, "styling", "caret_width",
1, 0, &tmp_style);
common_style_set.styling[GCS_CARET].background = tmp_style.foreground;
+ get_keyfile_int(config, config_home, "styling", "line_wrap_visuals",
+ 3, 0, &tmp_style);
+ common_style_set.styling[GCS_LINE_WRAP_VISUALS].foreground = tmp_style.foreground;
+ common_style_set.styling[GCS_LINE_WRAP_VISUALS].background = tmp_style.background;
+ get_keyfile_int(config, config_home, "styling", "line_wrap_indent",
+ 0, 0, &tmp_style);
+ common_style_set.styling[GCS_LINE_WRAP_INDENT].foreground = tmp_style.foreground;
+ get_keyfile_int(config, config_home, "styling", "translucency",
+ 256, 256, &tmp_style);
+ common_style_set.styling[GCS_TRANSLUCENCY].foreground = tmp_style.foreground;
+ common_style_set.styling[GCS_TRANSLUCENCY].background = tmp_style.background;
}
get_keyfile_wordchars(config, config_home, &common_style_set.wordchars);
@@ -389,14 +403,30 @@
{
SSM(sci, SCI_STYLECLEARALL, 0, 0);
- /* caret colour and width */
+ /* caret colour, style and width */
SSM(sci, SCI_SETCARETFORE, invert(common_style_set.styling[GCS_CARET].foreground), 0);
SSM(sci, SCI_SETCARETWIDTH, common_style_set.styling[GCS_CARET].background, 0);
+ if (common_style_set.styling[GCS_CARET].bold)
+ SSM(sci, SCI_SETCARETSTYLE, CARETSTYLE_BLOCK, 0);
+ else
+ SSM(sci, SCI_SETCARETSTYLE, CARETSTYLE_LINE, 0);
/* colourize the current line */
SSM(sci, SCI_SETCARETLINEBACK, invert(common_style_set.styling[GCS_CURRENT_LINE].background), 0);
- SSM(sci, SCI_SETCARETLINEVISIBLE, common_style_set.styling[GCS_CURRENT_LINE].bold, 0); /* bold=enable current line */
+ /* bold=enable current line */
+ SSM(sci, SCI_SETCARETLINEVISIBLE, common_style_set.styling[GCS_CURRENT_LINE].bold, 0);
+ /* Translucency for current line and selection */
+ SSM(sci, SCI_SETCARETLINEBACKALPHA, common_style_set.styling[GCS_TRANSLUCENCY].foreground, 0);
+ SSM(sci, SCI_SETSELALPHA, common_style_set.styling[GCS_TRANSLUCENCY].background, 0);
+
+ /* line wrapping visuals */
+ SSM(sci, SCI_SETWRAPVISUALFLAGS,
+ common_style_set.styling[GCS_LINE_WRAP_VISUALS].foreground, 0);
+ SSM(sci, SCI_SETWRAPVISUALFLAGSLOCATION,
+ common_style_set.styling[GCS_LINE_WRAP_VISUALS].background, 0);
+ SSM(sci, SCI_SETWRAPSTARTINDENT, common_style_set.styling[GCS_LINE_WRAP_INDENT].foreground, 0);
+
/* indicator settings */
SSM(sci, SCI_INDICSETSTYLE, 2, INDIC_SQUIGGLE);
/* why? if I let this out, the indicator remains green with PHP */
Modified: trunk/src/sciwrappers.c
===================================================================
--- trunk/src/sciwrappers.c 2008-03-07 14:21:01 UTC (rev 2311)
+++ trunk/src/sciwrappers.c 2008-03-07 15:42:46 UTC (rev 2312)
@@ -164,10 +164,7 @@
void sci_set_lines_wrapped(ScintillaObject* sci, gboolean set )
{
if (set)
- {
SSM(sci,SCI_SETWRAPMODE,SC_WRAP_WORD,0);
- SSM(sci, SCI_SETWRAPVISUALFLAGS, SC_WRAPVISUALFLAG_END | SC_WRAPVISUALFLAG_START, 0);
- }
else
SSM(sci,SCI_SETWRAPMODE,SC_WRAP_NONE,0);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Commits
mailing list