1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
|
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>gtksourceview.SourceView</title><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="Python GtkSourceView Reference Manual"><link rel="up" href="gtksourceview-class-reference.html" title="The GtkSourceView Class Reference"><link rel="prev" href="gtksourceview-class-reference.html" title="The GtkSourceView Class Reference"><link rel="next" href="class-gtksourcebuffer.html" title="gtksourceview.SourceBuffer"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gtksourceview.SourceView</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="gtksourceview-class-reference.html">Prev</a> </td><th width="60%" align="center">The GtkSourceView Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-gtksourcebuffer.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gtksourceview.SourceView"><a name="class-gtksourceview"></a><div class="titlepage"></div><div class="refnamediv"><h2>gtksourceview.SourceView</h2><p>gtksourceview.SourceView — a widget that displays the source code</p></div><div class="refsect1" title="Synopsis"><a name="id2585335"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gtksourceview.SourceView</span></span>(<span class="ooclass"><span class="classname">gtk.TextView</span></span>):
<code class="constructorsynopsis"> <span class="methodname"><a class="link" href="class-gtksourceview.html#constructor-gtksourceview" title="Constructor">gtksourceview.SourceView</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>buffer</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtksourceview.html#method-gtksourceview--set-show-line-numbers" title="gtksourceview.SourceView.set_show_line_numbers">set_show_line_numbers</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>show</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtksourceview.html#method-gtksourceview--get-show-line-numbers" title="gtksourceview.SourceView.get_show_line_numbers">get_show_line_numbers</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtksourceview.html#method-gtksourceview--set-show-line-markers" title="gtksourceview.SourceView.set_show_line_markers">set_show_line_markers</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>show</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtksourceview.html#method-gtksourceview--get-show-line-markers" title="gtksourceview.SourceView.get_show_line_markers">get_show_line_markers</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtksourceview.html#method-gtksourceview--set-tabs-width" title="gtksourceview.SourceView.set_tabs_width">set_tabs_width</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>width</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtksourceview.html#method-gtksourceview--get-tabs-width" title="gtksourceview.SourceView.get_tabs_width">get_tabs_width</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtksourceview.html#method-gtksourceview--set-auto-indent" title="gtksourceview.SourceView.set_auto_indent">set_auto_indent</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>enable</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtksourceview.html#method-gtksourceview--get-auto-indent" title="gtksourceview.SourceView.get_auto_indent">get_auto_indent</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtksourceview.html#method-gtksourceview--set-insert-spaces-instead-of-tabs" title="gtksourceview.SourceView.set_insert_spaces_instead_of_tabs">set_insert_spaces_instead_of_tabs</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>enable</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtksourceview.html#method-gtksourceview--get-insert-spaces-instead-of-tabs" title="gtksourceview.SourceView.get_insert_spaces_instead_of_tabs">get_insert_spaces_instead_of_tabs</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtksourceview.html#method-gtksourceview--set-show-margin" title="gtksourceview.SourceView.set_show_margin">set_show_margin</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>show</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtksourceview.html#method-gtksourceview--get-show-margin" title="gtksourceview.SourceView.get_show_margin">get_show_margin</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtksourceview.html#method-gtksourceview--set-margin" title="gtksourceview.SourceView.set_tabs_width">set_margin</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>margin</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtksourceview.html#method-gtksourceview--get-margin" title="gtksourceview.SourceView.get_margin">get_margin</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtksourceview.html#method-gtksourceview--set-marker-pixbuf" title="gtksourceview.SourceView.set_marker_pixbuf">set_marker_pixbuf</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>marker_type</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>pixbuf</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtksourceview.html#method-gtksourceview--get-marker-pixbuf" title="gtksourceview.SourceView.get_marker_pixbuf">get_marker_pixbuf</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtksourceview.html#method-gtksourceview--set-smart-home-end" title="gtksourceview.SourceView.set_smart_home_end">set_smart_home_end</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>enable</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtksourceview.html#method-gtksourceview--get-smart-home-end" title="gtksourceview.SourceView.get_smart_home_end">get_smart_home_end</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>window</code></strong></span></span>)</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id2510520"></a><h2>Ancestry</h2><pre class="synopsis">+-- gobject.GObject
+-- gtk.Object
+-- gtk.Widget
+-- gtk.Container
+-- gtk.TextView
+-- <a class="link" href="class-gtksourceview.html" title="gtksourceview.SourceView">gtksourceview.SourceView</a>
</pre></div><div class="refsect1" title="Properties"><a name="id2510570"></a><h2>Properties</h2><div class="blockquote"><table width="100%" border="0" bgcolor="#E0E0E0"><tr><td valign="top"><div class="informaltable"><table width="100%" border="0"><colgroup><col width="1in"><col width="1in"><col width="4in"></colgroup><tbody><tr valign="top"><td valign="top">"auto-indent"</td><td valign="top">Read-Write</td><td valign="top">If <code class="literal">TRUE</code> enable auto indentation.</td></tr><tr valign="top"><td valign="top">"insert-spaces-instead-of-tabs"</td><td valign="top">Read-Write</td><td valign="top">If <code class="literal">TRUE</code> spaces will be inserted instead of tabs.</td></tr><tr valign="top"><td valign="top">"margin"</td><td valign="top">Read-Write</td><td valign="top">Position of the right margin.</td></tr><tr valign="top"><td valign="top">"show-line-markers"</td><td valign="top">Read-Write</td><td valign="top">If <code class="literal">TRUE</code>, the display line marker pixbufs will be shown.</td></tr><tr valign="top"><td valign="top">"show-line-numbers"</td><td valign="top">Read-Write</td><td valign="top">If <code class="literal">TRUE</code>, the line numbers will be shown.</td></tr><tr valign="top"><td valign="top">"show-margin"</td><td valign="top">Read-Write</td><td valign="top">If <code class="literal">TRUE</code>, the right margin will be shown.</td></tr><tr valign="top"><td valign="top">"smart-home-end"</td><td valign="top">Read-Write</td><td valign="top"><span class="keycap"><strong>HOME</strong></span> and <span class="keycap"><strong>END</strong></span> keys move to first/last characters on
line first before going to the start/end of the line.</td></tr><tr valign="top"><td valign="top">"tabs-width"</td><td valign="top">Read-Write</td><td valign="top">Tabs Width.</td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" title="Signal Prototypes"><a name="id2575703"></a><h2>Signal Prototypes</h2><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term">"<a class="link" href="class-gtksourceview.html#signal-gtksourceview--redo" title='The "redo" gtksourceview.SourceView Signal'>redo</a>"</span></p></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>sourceview</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></td></tr><tr><td><p><span class="term">"<a class="link" href="class-gtksourceview.html#signal-gtksourceview--undo" title='The "undo" gtksourceview.SourceView Signal'>undo</a>"</span></p></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>sourceview</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></td></tr></tbody></table></div><div class="refsect1" title="Description"><a name="description-gtktextview"></a><h2>Description</h2><p>A <a class="link" href="class-gtksourceview.html" title="gtksourceview.SourceView"><code class="classname">gtksourceview.SourceView</code></a>
is a text widget that extends the standard
<code class="classname">gtk.TextView</code>
It improves the
<code class="classname">gtk.TextView</code>
by implementing syntax highlighting and other features typical of a source editor.</p></div><div class="refsect1" title="Constructor"><a name="constructor-gtksourceview"></a><h2>Constructor</h2><pre class="programlisting"><code class="constructorsynopsis"> <span class="methodname">gtksourceview.SourceView</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>buffer</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>buffer</code></strong> :</span></p></td><td>a <a class="link" href="class-gtksourcebuffer.html" title="gtksourceview.SourceBuffer"><code class="classname">gtksourceview.SourceBuffer</code></a>
or <code class="literal">None</code></td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a new <a class="link" href="class-gtksourceview.html" title="gtksourceview.SourceView"><code class="classname">gtksourceview.SourceView</code></a>.</td></tr></tbody></table><p>Creates a new <a class="link" href="class-gtksourceview.html" title="gtksourceview.SourceView"><code class="classname">gtksourceview.SourceView</code></a>
widget displaying the <a class="link" href="class-gtksourcebuffer.html" title="gtksourceview.SourceBuffer"><code class="classname">gtksourceview.SourceBuffer</code></a>
specified by <em class="parameter"><code>buffer</code></em>. If <em class="parameter"><code>buffer</code></em>
is <code class="literal">None</code>, a new <a class="link" href="class-gtksourcebuffer.html" title="gtksourceview.SourceBuffer"><code class="classname">gtksourceview.SourceBuffer</code></a>
will be created. One sourcebuffer can be shared among many widgets.</p></div><div class="refsect1" title="Methods"><a name="id2576008"></a><h2>Methods</h2><div class="refsect2" title="gtksourceview.SourceView.set_show_line_numbers"><a name="method-gtksourceview--set-show-line-numbers"></a><h3>gtksourceview.SourceView.set_show_line_numbers</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_show_line_numbers</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>show</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>show</code></strong> :</span></p></td><td>if <code class="literal">TRUE</code> the line numbers will be shown.</td></tr></tbody></table><p>The <code class="methodname">set_show_line_numbers</code>() method sets the property
"show-line-numbers" to the value of <em class="parameter"><code>show</code></em>. If <em class="parameter"><code>show</code></em>
is set to <code class="literal">TRUE</code> the line numbers should be visible, otherwise not.</p></div><div class="refsect2" title="gtksourceview.SourceView.get_show_line_numbers"><a name="method-gtksourceview--get-show-line-numbers"></a><h3>gtksourceview.SourceView.get_show_line_numbers</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_show_line_numbers</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">TRUE</code> if the line numbers are visible,
<code class="literal">FALSE</code> otherwise.</td></tr></tbody></table><p>The <code class="methodname">get_show_line_numbers</code>() method returns the
value of the "show-line-numbers" property which determines if the line numbers should be visible.</p></div><div class="refsect2" title="gtksourceview.SourceView.set_show_line_markers"><a name="method-gtksourceview--set-show-line-markers"></a><h3>gtksourceview.SourceView.set_show_line_markers</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_show_line_markers</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>show</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>show</code></strong> :</span></p></td><td>if <code class="literal">TRUE</code> the line markers will be shown.</td></tr></tbody></table><p>The <code class="methodname">set_show_line_markers</code>() method sets the property
"show-line-markers" to the value of <em class="parameter"><code>show</code></em>. If <em class="parameter"><code>show</code></em>
is set to <code class="literal">TRUE</code> the line markers should be visible, otherwise not.</p></div><div class="refsect2" title="gtksourceview.SourceView.get_show_line_markers"><a name="method-gtksourceview--get-show-line-markers"></a><h3>gtksourceview.SourceView.get_show_line_markers</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_show_line_markers</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">TRUE</code> if the line markers are visible,
<code class="literal">FALSE</code> otherwise.</td></tr></tbody></table><p>The <code class="methodname">get_show_line_markers</code>() method returns the
value of the "show-line-markers" property which determines if the line markers should be visible.</p></div><div class="refsect2" title="gtksourceview.SourceView.set_tabs_width"><a name="method-gtksourceview--set-tabs-width"></a><h3>gtksourceview.SourceView.set_tabs_width</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_tabs_width</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>width</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>width</code></strong> :</span></p></td><td>The width of the tabs</td></tr></tbody></table><p>The <code class="methodname">set_tabs_width</code>() method sets the property
"tab-width" to the value of <em class="parameter"><code>width</code></em>.</p></div><div class="refsect2" title="gtksourceview.SourceView.get_tabs_width"><a name="method-gtksourceview--get-tabs-width"></a><h3>gtksourceview.SourceView.get_tabs_width</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_tabs_width</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>The value of <em class="parameter"><code>width</code></em>.</td></tr></tbody></table><p>The <code class="methodname">get_tabs_width</code>() method returns the
value of <em class="parameter"><code>width</code></em>.</p></div><div class="refsect2" title="gtksourceview.SourceView.set_auto_indent"><a name="method-gtksourceview--set-auto-indent"></a><h3>gtksourceview.SourceView.set_auto_indent</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_auto_indent</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>enable</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>enable</code></strong> :</span></p></td><td>if <code class="literal">TRUE</code> the auto indentation will be active.</td></tr></tbody></table><p>The <code class="methodname">set_auto_indent</code>() method sets the property
"auto-indent" to the value of <em class="parameter"><code>enable</code></em>. If <em class="parameter"><code>enable</code></em>
is set to <code class="literal">TRUE</code> the auto indentation is active, otherwise not.</p></div><div class="refsect2" title="gtksourceview.SourceView.get_auto_indent"><a name="method-gtksourceview--get-auto-indent"></a><h3>gtksourceview.SourceView.get_auto_indent</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_auto_indent</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">TRUE</code> if the auto indentation is turned on,
<code class="literal">FALSE</code> otherwise.</td></tr></tbody></table><p>The <code class="methodname">get_auto_indent</code>() method returns the
value of the "auto-indent" property which determines if the auto indentation should be used.</p></div><div class="refsect2" title="gtksourceview.SourceView.set_insert_spaces_instead_of_tabs"><a name="method-gtksourceview--set-insert-spaces-instead-of-tabs"></a><h3>gtksourceview.SourceView.set_insert_spaces_instead_of_tabs</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_insert_spaces_instead_of_tabs</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>enable</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>enable</code></strong> :</span></p></td><td>if <code class="literal">TRUE</code> spaces will be used instead of tabs.</td></tr></tbody></table><p>The <code class="methodname">set_insert_spaces_instead_of_tabs</code>() method sets the property
"insert-spaces-instead-of-tabs" to the value of <em class="parameter"><code>enable</code></em>. If <em class="parameter"><code>enable</code></em>
is set to <code class="literal">TRUE</code> then spaces will be used instead of tabs, otherwise not.</p></div><div class="refsect2" title="gtksourceview.SourceView.get_insert_spaces_instead_of_tabs"><a name="method-gtksourceview--get-insert-spaces-instead-of-tabs"></a><h3>gtksourceview.SourceView.get_insert_spaces_instead_of_tabs</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_insert_spaces_instead_of_tabs</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">TRUE</code> if spaces are used instead of tabs,
<code class="literal">FALSE</code> otherwise.</td></tr></tbody></table><p>The <code class="methodname">get_insert_spaces_instead_of_tabs</code>() method returns the
value of the "insert-spaces-instead-of-tabs" property which determines if spaces should be used instead of tabs.</p></div><div class="refsect2" title="gtksourceview.SourceView.set_show_margin"><a name="method-gtksourceview--set-show-margin"></a><h3>gtksourceview.SourceView.set_show_margin</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_show_margin</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>show</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>show</code></strong> :</span></p></td><td>if <code class="literal">TRUE</code> the line markers will be shown.</td></tr></tbody></table><p>The <code class="methodname">set_show_margin</code>() method sets the property
"show-margin" to the value of <em class="parameter"><code>show</code></em>. If <em class="parameter"><code>show</code></em>
is set to <code class="literal">TRUE</code> the margin should be visible, otherwise not.</p></div><div class="refsect2" title="gtksourceview.SourceView.get_show_margin"><a name="method-gtksourceview--get-show-margin"></a><h3>gtksourceview.SourceView.get_show_margin</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_show_margin</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">TRUE</code> if the line markers are visible,
<code class="literal">FALSE</code> otherwise.</td></tr></tbody></table><p>The <code class="methodname">get_show_margin</code>() method returns the
value of the "show-margin" property which determines if the margin should be visible.</p></div><div class="refsect2" title="gtksourceview.SourceView.set_tabs_width"><a name="method-gtksourceview--set-margin"></a><h3>gtksourceview.SourceView.set_tabs_width</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_margin</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>margin</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>margin</code></strong> :</span></p></td><td>The width of the margin</td></tr></tbody></table><p>The <code class="methodname">set_margin</code>() method sets the property
"margin" to the value of <em class="parameter"><code>margin</code></em>.</p></div><div class="refsect2" title="gtksourceview.SourceView.get_margin"><a name="method-gtksourceview--get-margin"></a><h3>gtksourceview.SourceView.get_margin</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_margin</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>The value of <em class="parameter"><code>margin</code></em>.</td></tr></tbody></table><p>The <code class="methodname">get_margin</code>() method returns the
value of <em class="parameter"><code>margin</code></em>.</p></div><div class="refsect2" title="gtksourceview.SourceView.set_marker_pixbuf"><a name="method-gtksourceview--set-marker-pixbuf"></a><h3>gtksourceview.SourceView.set_marker_pixbuf</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_marker_pixbuf</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>marker_type</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>pixbuf</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>marker_type</code></strong> :</span></p></td><td>The marker that have to be shown in the margin.</td></tr></tbody></table><p>The <code class="methodname">set_marker_pixbuf</code>() method sets the marker
that have to be used.</p></div><div class="refsect2" title="gtksourceview.SourceView.get_marker_pixbuf"><a name="method-gtksourceview--get-marker-pixbuf"></a><h3>gtksourceview.SourceView.get_marker_pixbuf</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_marker_pixbuf</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>The value of <em class="parameter"><code>marker_type</code></em>.</td></tr></tbody></table><p>The <code class="methodname">get_marker_pixbuf</code>() method returns the
value of <em class="parameter"><code>marker_type</code></em>.</p></div><div class="refsect2" title="gtksourceview.SourceView.set_smart_home_end"><a name="method-gtksourceview--set-smart-home-end"></a><h3>gtksourceview.SourceView.set_smart_home_end</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_smart_home_end</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>enable</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>enable</code></strong> :</span></p></td><td>if <code class="literal">TRUE</code> spaces will be used instead of tabs.</td></tr></tbody></table><p>The <code class="methodname">set_smart_home_end</code>() method sets the property
"smart-home-end" to the value of <em class="parameter"><code>enable</code></em>. If <em class="parameter"><code>enable</code></em>
is set to <code class="literal">TRUE</code> then <span class="keycap"><strong>HOME</strong></span> and <span class="keycap"><strong>END</strong></span> keys move to first/last characters on
line first before going to the start/end of the line.</p></div><div class="refsect2" title="gtksourceview.SourceView.get_smart_home_end"><a name="method-gtksourceview--get-smart-home-end"></a><h3>gtksourceview.SourceView.get_smart_home_end</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_smart_home_end</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">TRUE</code> if <span class="keycap"><strong>HOME</strong></span> and <span class="keycap"><strong>END</strong></span> keys move
to first/last characters on line first before going to the start/end of the line.
<code class="literal">FALSE</code> otherwise.</td></tr></tbody></table><p>The <code class="methodname">get_smart_home_end</code>() method returns the
value of the "smart-home-end" property which determines if <span class="keycap"><strong>HOME</strong></span> and <span class="keycap"><strong>END</strong></span> keys
move to first/last characters on line first before going to the start/end of the line.</p></div></div><div class="refsect1" title="Signals"><a name="id2577498"></a><h2>Signals</h2><div class="refsect2" title='The "redo" gtksourceview.SourceView Signal'><a name="signal-gtksourceview--redo"></a><h3>The "redo" gtksourceview.SourceView Signal</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>sourceview</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>sourceview</code></em> :</span></p></td><td>the sourceview that received the
signal</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_param1</code></em> :</span></p></td><td>the first user parameter (if any) specified
with the <code class="methodname">connect</code>()
method</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>additional user parameters (if
any)</td></tr></tbody></table><p>The "redo" signal is emitted when ...</p></div><div class="refsect2" title='The "undo" gtksourceview.SourceView Signal'><a name="signal-gtksourceview--undo"></a><h3>The "undo" gtksourceview.SourceView Signal</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>sourceview</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>sourceview</code></em> :</span></p></td><td>the sourceview that received the
signal</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_param1</code></em> :</span></p></td><td>the first user parameter (if any) specified
with the <code class="methodname">connect</code>()
method</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>additional user parameters (if
any)</td></tr></tbody></table><p>The "undo" signal is emitted when ....</p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="gtksourceview-class-reference.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gtksourceview-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-gtksourcebuffer.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">The GtkSourceView Class Reference </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gtksourceview.SourceBuffer</td></tr></table></div></body></html>
|