File: class-gtksourcebuffer.html

package info (click to toggle)
gnome-python-desktop 2.32.0%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 4,548 kB
  • sloc: sh: 10,214; xml: 8,851; ansic: 3,428; python: 1,457; makefile: 664
file content (219 lines) | stat: -rw-r--r-- 63,982 bytes parent folder | download | duplicates (2)
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>gtksourceview.SourceBuffer</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="class-gtksourceview.html" title="gtksourceview.SourceView"><link rel="next" href="class-gtksourcelanguage.html" title="gtksourceview.SourceLanguage"></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.SourceBuffer</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gtksourceview.html">Prev</a> </td><th width="60%" align="center">The GtkSourceView Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-gtksourcelanguage.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gtksourceview.SourceBuffer"><a name="class-gtksourcebuffer"></a><div class="titlepage"></div><div class="refnamediv"><h2>gtksourceview.SourceBuffer</h2><p>gtksourceview.SourceBuffer — Text buffer object for <a class="link" href="class-gtksourceview.html" title="gtksourceview.SourceView">gtksourceview.SourceView</a></p></div><div class="refsect1" title="Synopsis"><a name="id2598460"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gtksourceview.SourceBuffer</span></span>(<span class="ooclass"><span class="classname">gtk.TextBuffer</span></span>):
<code class="constructorsynopsis">    <span class="methodname"><a class="link" href="class-gtksourcebuffer.html#constructor-gtksourcebuffer" title="Constructor">gtksourceview.SourceBuffer</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-gtksourcebuffer.html#method-gtksourcebuffer--set-check-brackets" title="gtksourceview.SourceBuffer.set_check_brackets">set_check_brackets</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>check_brackets</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtksourcebuffer.html#method-gtksourcebuffer--get-check-brackets" title="gtksourceview.SourceBuffer.get_check_brackets">get_check_brackets</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtksourcebuffer.html#method-gtksourcebuffer--set-bracket-match-style" title="gtksourceview.SourceBuffer.set_bracket_match_style">set_bracket_match_style</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>style</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtksourcebuffer.html#method-gtksourcebuffer--set-highlight" title="gtksourceview.SourceBuffer.set_highlight">set_highlight</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>highlight</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtksourcebuffer.html#method-gtksourcebuffer--get-highlight" title="gtksourceview.SourceBuffer.get_highlight">get_highlight</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtksourcebuffer.html#method-gtksourcebuffer--set-max-undo-levels" title="gtksourceview.SourceBuffer.set_max_undo_levels">set_max_undo_levels</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>max_undo_levels</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtksourcebuffer.html#method-gtksourcebuffer--get-max-undo-levels" title="gtksourceview.SourceBuffer.get_max_undo_levels">get_max_undo_levels</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtksourcebuffer.html#method-gtksourcebuffer--set-language" title="gtksourceview.SourceBuffer.set_language">set_language</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>language</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtksourcebuffer.html#method-gtksourcebuffer--get-language" title="gtksourceview.SourceBuffer.get_language">get_language</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtksourcebuffer.html#method-gtksourcebuffer--set-escape-char" title="gtksourceview.SourceBuffer.set_escape_char">set_escape_char</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>escape_char</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtksourcebuffer.html#method-gtksourcebuffer--get-escape-char" title="gtksourceview.SourceBuffer.get_escape_char">get_escape_char</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtksourcebuffer.html#method-gtksourcebuffer--can-undo" title="gtksourceview.SourceBuffer.can_undo">can_undo</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtksourcebuffer.html#method-gtksourcebuffer--can-redo" title="gtksourceview.SourceBuffer.can_redo">can_redo</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtksourcebuffer.html#method-gtksourcebuffer--undo" title="gtksourceview.SourceBuffer.undo">undo</a></span>()</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtksourcebuffer.html#method-gtksourcebuffer--redo" title="gtksourceview.SourceBuffer.redo">redo</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtksourcebuffer.html#method-gtksourcebuffer--begin-not-undoable-action" title="gtksourceview.SourceBuffer.begin_not_undoable_action">begin_not_undoable_action</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtksourcebuffer.html#method-gtksourcebuffer--end-not-undoable-action" title="gtksourceview.SourceBuffer.end_not_undoable_action">end_not_undoable_action</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtksourcebuffer.html#method-gtksourcebuffer--create-marker" title="gtksourceview.SourceBuffer.create_marker">create_marker</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>name</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>type</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>where</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtksourcebuffer.html#method-gtksourcebuffer--move-marker" title="gtksourceview.SourceBuffer.move_marker">move_marker</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>marker</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>where</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtksourcebuffer.html#method-gtksourcebuffer--delete-marker" title="gtksourceview.SourceBuffer.delete_marker">delete_marker</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>marker</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtksourcebuffer.html#method-gtksourcebuffer--get-marker" title="gtksourceview.SourceBuffer.get_marker">get_marker</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>name</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtksourcebuffer.html#method-gtksourcebuffer--get-markers-in-region" title="gtksourceview.SourceBuffer.get_markers_in_region">get_marker_in_region</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>start</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>end</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtksourcebuffer.html#method-gtksourcebuffer--get-first-marker" title="gtksourceview.SourceBuffer.get_first_marker">get_first_marker</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtksourcebuffer.html#method-gtksourcebuffer--get-last-marker" title="gtksourceview.SourceBuffer.get_last_marker">get_last_marker</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtksourcebuffer.html#method-gtksourcebuffer--get-iter-at-marker" title="gtksourceview.SourceBuffer.get_iter_at_marker">get_iter_at_marker</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtksourcebuffer.html#method-gtksourcebuffer--get-next-marker" title="gtksourceview.SourceBuffer.get_next_marker">get_next_marker</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtksourcebuffer.html#method-gtksourcebuffer--get-prev-marker" title="gtksourceview.SourceBuffer.get_prev_marker">get_prev_marker</a></span>(<span class="methodparam"></span>)</code><br></pre></td></tr></table><pre class="programlisting">
<span class="bold"><strong>Functions</strong></span>

<code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtksourcebuffer.html#function-gtksourcebuffer--new-with-language" title="gtksourceview.SourceBuffer.gtk_source_buffer_new_with_language">gtksourceview.gtk_source_buffer_new_with_language</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>gtksourceview.SourceLanguage</code></strong></span></span>)</code></pre></div><div class="refsect1" title="Ancestry"><a name="id2559201"></a><h2>Ancestry</h2><pre class="synopsis">+-- gobject.GObject
  +-- gtk.TextBuffer
    +-- <a class="link" href="class-gtksourcebuffer.html" title="gtksourceview.SourceBuffer">gtksourceview.SourceBuffer</a>
</pre></div><div class="refsect1" title="Properties"><a name="id2559242"></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">"check-brackets"</td><td valign="top">Read-Write</td><td valign="top">If <code class="literal">TRUE</code> bracket match highlighting is activated.</td></tr><tr valign="top"><td valign="top">"escape-char"</td><td valign="top">Read-Write</td><td valign="top">Escaping character for syntax patterns.</td></tr><tr valign="top"><td valign="top">"highlight"</td><td valign="top">Read-Write</td><td valign="top">If <code class="literal">TRUE</code> the syntax highlighting is activated.</td></tr><tr valign="top"><td valign="top">"language"</td><td valign="top">Read-Write</td><td valign="top">Language object to get highlighting patterns from.</td></tr><tr valign="top"><td valign="top">"max-undo-levels"</td><td valign="top">Read-Write</td><td valign="top">Number of undo levels for the buffer.</td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" title="Signal Prototypes"><a name="id2559406"></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-gtksourcebuffer.html#signal-gtksourcebuffer--can-redo" title='The "can-redo" gtksourceview.SourceBuffer Signal'>"can-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>arg1</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-gtksourcebuffer.html#signal-gtksourcebuffer--can-undo" title='The "can-undo" gtksourceview.SourceBuffer Signal'>"can-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>arg1</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-gtksourcebuffer.html#signal-gtksourcebuffer--highlight-updated" title='The "highlight-updated" gtksourceview.SourceBuffer Signal'>"highlight-updated"</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>start</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>end</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-gtksourcebuffer.html#signal-gtksourcebuffer--marker-updated" title='The "marker-updated" gtksourceview.SourceBuffer Signal'>"marker-updated"</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>iter</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-gtksourcebuffer"></a><h2>Description</h2><p>
The <a class="link" href="class-gtksourcebuffer.html" title="gtksourceview.SourceBuffer"><code class="classname">gtksourceview.SourceBuffer</code></a>
is the model for <a class="link" href="class-gtksourceview.html" title="gtksourceview.SourceView"><code class="classname">gtksourceview.SourceView</code></a>
widgets. It extends the <code class="classname">gtk.TextBuffer</code>
object by adding features necessary to display and edit source code: syntax highlighting, bracket matching and markers. 
It also implements support for undo/redo operations.
</p><p>
To create a <a class="link" href="class-gtksourcebuffer.html" title="gtksourceview.SourceBuffer"><code class="classname">gtksourceview.SourceBuffer</code></a> 
use <code class="methodname">gtksourceview.gtk_source_buffer_new</code>() 
or <a class="link" href="class-gtksourcebuffer.html#function-gtksourcebuffer--new-with-language" title="gtksourceview.SourceBuffer.gtk_source_buffer_new_with_language"><code class="methodname">gtksourceview.gtk_source_buffer_new_with_language</code></a>.
The second form is just a convenience function which allows you to initially set a 
<a class="link" href="class-gtksourcelanguage.html" title="gtksourceview.SourceLanguage"><code class="classname">gtksourceview.SourceLanguage</code></a>.
</p><p>
By default highlighting is enabled, but you can disable it with 
<a class="link" href="class-gtksourcebuffer.html#method-gtksourcebuffer--set-highlight" title="gtksourceview.SourceBuffer.set_highlight"><code class="methodname">set_highlight</code>()</a>. This can be useful if you're not using 
<a class="link" href="class-gtksourcelanguage.html" title="gtksourceview.SourceLanguage"><code class="classname">gtksourceview.SourceLanguage</code></a> 
objects to set the highlighting patterns, and instead you're manually adding 
<a class="link" href="class-gtksourcetag.html" title="gtksourceview.SourceTag"><code class="classname">gtksourceview.SourceTag</code></a> objects to the buffer's tag table.
</p></div><div class="refsect1" title="Constructor"><a name="constructor-gtksourcebuffer"></a><h2>Constructor</h2><pre class="programlisting"><code class="constructorsynopsis">    <span class="methodname">gtksourceview.SourceBuffer</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>table</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>table</code></strong> :</span></p></td><td>a <a class="link" href="class-gtksourcetagtable.html" title="gtksourceview.SourceTagTable"><code class="classname">gtksourceview.SourceTagTable</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-gtksourcebuffer.html" title="gtksourceview.SourceBuffer"><code class="classname">gtksourceview.SourceBuffer</code></a>.
        </td></tr></tbody></table><p>
    Creates a new <a class="link" href="class-gtksourcebuffer.html" title="gtksourceview.SourceBuffer"><code class="classname">gtksourceview.SourceBuffer</code></a> object.
  </p></div><div class="refsect1" title="Methods"><a name="id2559958"></a><h2>Methods</h2><div class="refsect2" title="gtksourceview.SourceBuffer.set_check_brackets"><a name="method-gtksourcebuffer--set-check-brackets"></a><h3>gtksourceview.SourceBuffer.set_check_brackets</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_check_brackets</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>check_brackets</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>check_brackets</code></strong> :</span></p></td><td>if <code class="literal">TRUE</code> turns on the matching brackets highlight.</td></tr></tbody></table><p>
      The <code class="methodname">set_check_brackets</code>() method controls the bracket match highlighting function in the buffer. 
      If activated, when you position your cursor over a bracket character (a parenthesis, a square bracket, etc.) the matching 
      opening or closing bracket character will be highlighted. You can specify the style with the 
      <a class="link" href="class-gtksourcebuffer.html#method-gtksourcebuffer--set-bracket-match-style" title="gtksourceview.SourceBuffer.set_bracket_match_style"><code class="methodname">set_bracket_match_style</code></a> function.
	  </p></div><div class="refsect2" title="gtksourceview.SourceBuffer.get_check_brackets"><a name="method-gtksourcebuffer--get-check-brackets"></a><h3>gtksourceview.SourceBuffer.get_check_brackets</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_check_brackets</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 matching brackets highlight is active, 
	      <code class="literal">FALSE</code> otherwise.</td></tr></tbody></table><p>
      The <code class="methodname">get_check_brackets</code>() method returns the
      value of the "check-brackets" property which determines if the matching brackets highlight is active.
    </p></div><div class="refsect2" title="gtksourceview.SourceBuffer.set_bracket_match_style"><a name="method-gtksourcebuffer--set-bracket-match-style"></a><h3>gtksourceview.SourceBuffer.set_bracket_match_style</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_bracket_match_style</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>style</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>style</code></strong> :</span></p></td><td>the <a class="link" href="class-gtksourcetagstyle.html" title="gtksourceview.SourceTagStyle"><code class="classname">gtksourceview.SourceTagStyle</code></a> 
    specifying colors and text attributes.</td></tr></tbody></table><p>
      The <code class="methodname">set_bracket_match_style</code>() method sets the style used for highlighting matching brackets.
	  </p></div><div class="refsect2" title="gtksourceview.SourceBuffer.set_highlight"><a name="method-gtksourcebuffer--set-highlight"></a><h3>gtksourceview.SourceBuffer.set_highlight</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_highlight</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>highlight</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>highlight</code></strong> :</span></p></td><td>if <code class="literal">TRUE</code> turns on the source highlighting.</td></tr></tbody></table><p>
        The <code class="methodname">set_highlight</code>() method controls whether text is highlighted in the buffer. If 
        <strong class="parameter"><code>highlight</code></strong> is <code class="literal">TRUE</code> , the text will be highlighted 
        according to the patterns installed in the buffer (either set with 
        <code class="methodname"><a class="link" href="class-gtksourcebuffer.html#method-gtksourcebuffer--set-language" title="gtksourceview.SourceBuffer.set_language">set_language</a></code> or 
        by adding individual <a class="link" href="class-gtksourcetag.html" title="gtksourceview.SourceTag"><code class="classname">gtksourceview.SourceTag</code></a> 
        tags to the buffer's tag table). Otherwise, any current highlighted text will be restored to the default buffer style.
      </p><p>
        Tags not of <a class="link" href="class-gtksourcetag.html" title="gtksourceview.SourceTag"><code class="classname">gtksourceview.SourceTag</code></a> 
        type will not be removed by this option, and normal GtkTextTag priority settings apply when highlighting is enabled.
      </p><p>
        If not using a <a class="link" href="class-gtksourcelanguage.html" title="gtksourceview.SourceLanguage"><code class="classname">gtksourceview.SourceLanguage</code></a> 
        for setting the highlighting patterns in the buffer, it is recommended for performance reasons that you add all the 
        <a class="link" href="class-gtksourcetag.html" title="gtksourceview.SourceTag"><code class="classname">gtksourceview.SourceTag</code></a> 
        tags with highlighting disabled and enable it when finished.
      </p></div><div class="refsect2" title="gtksourceview.SourceBuffer.get_highlight"><a name="method-gtksourcebuffer--get-highlight"></a><h3>gtksourceview.SourceBuffer.get_highlight</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_highlight</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 source highlighting is active, 
	      <code class="literal">FALSE</code> otherwise.</td></tr></tbody></table><p>
      The <code class="methodname">get_highlight</code>() method returns the
      value of the "highlight" property which determines if the text highlighting is active.
    </p></div><div class="refsect2" title="gtksourceview.SourceBuffer.set_max_undo_levels"><a name="method-gtksourcebuffer--set-max-undo-levels"></a><h3>gtksourceview.SourceBuffer.set_max_undo_levels</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_max_undo_levels</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>max_undo_levels</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>max_undo_levels</code></strong> :</span></p></td><td>	 the desired maximum number of undo levels.</td></tr></tbody></table><p>
        The <code class="methodname">set_max_undo_levels</code>() method Sets the number of undo levels for user actions
        the buffer will track. If the number of user actions exceeds the limit set by this function, older actions will be discarded.
      </p><p>
        A new action is started whenever the function 
        <code class="methodname">begin_user_action</code>
        is called. In general, this happens whenever the user presses any key which modifies the buffer, but the undo manager 
        will try to merge similar consecutive actions, such as multiple character insertions into one action. 
        But, inserting a newline does start a new action.
      </p></div><div class="refsect2" title="gtksourceview.SourceBuffer.get_max_undo_levels"><a name="method-gtksourcebuffer--get-max-undo-levels"></a><h3>gtksourceview.SourceBuffer.get_max_undo_levels</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_max_undo_levels</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 maximum number of possible undo levels.</td></tr></tbody></table><p>
      The <code class="methodname">get_max_undo_levels</code>() method returns the
      value of the "max-undo-levels" property which determines the number of undo levels the buffer will track for buffer edits.
    </p></div><div class="refsect2" title="gtksourceview.SourceBuffer.set_language"><a name="method-gtksourcebuffer--set-language"></a><h3>gtksourceview.SourceBuffer.set_language</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_language</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>language</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>language</code></strong> :</span></p></td><td>A <a class="link" href="class-gtksourcelanguage.html" title="gtksourceview.SourceLanguage"><code class="classname">gtksourceview.SourceLanguage</code></a> 
    or <code class="literal">None</code>.</td></tr></tbody></table><p>
      The <code class="methodname">set_check_brackets</code>() method Sets the 
      <a class="link" href="class-gtksourcelanguage.html" title="gtksourceview.SourceLanguage"><code class="classname">gtksourceview.SourceLanguage</code></a> 
      the source buffer will use, adding 
      <a class="link" href="class-gtksourcetag.html" title="gtksourceview.SourceTag"><code class="classname">gtksourceview.SourceTag</code></a> 
      tags with the language's patterns and setting the escape character with 
      <code class="methodname"><a class="link" href="class-gtksourcebuffer.html#method-gtksourcebuffer--set-escape-char" title="gtksourceview.SourceBuffer.set_escape_char">set_escape_char</a></code>.
      Note that this will remove any 
      <a class="link" href="class-gtksourcetag.html" title="gtksourceview.SourceTag"><code class="classname">gtksourceview.SourceTag</code></a> 
      tags currently in the buffer's tag table. The buffer holds a reference to the <strong class="parameter"><code>language</code></strong> set.
	  </p></div><div class="refsect2" title="gtksourceview.SourceBuffer.get_language"><a name="method-gtksourcebuffer--get-language"></a><h3>gtksourceview.SourceBuffer.get_language</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_language</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 
        <a class="link" href="class-gtksourcelanguage.html" title="gtksourceview.SourceLanguage"><code class="classname">gtksourceview.SourceLanguage</code></a> 
        set by <code class="methodname"><a class="link" href="class-gtksourcebuffer.html#method-gtksourcebuffer--set-language" title="gtksourceview.SourceBuffer.set_language">set_language</a></code>.
        </td></tr></tbody></table><p>
      The <code class="methodname">get_check_brackets</code>() method determines the 
        <a class="link" href="class-gtksourcelanguage.html" title="gtksourceview.SourceLanguage"><code class="classname">gtksourceview.SourceLanguage</code></a> 
        used by the buffer. The returned object should not be unreferenced by the user.
    </p></div><div class="refsect2" title="gtksourceview.SourceBuffer.set_escape_char"><a name="method-gtksourcebuffer--set-escape-char"></a><h3>gtksourceview.SourceBuffer.set_escape_char</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_escape_char</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>escape_char</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>escape_char</code></strong> :</span></p></td><td> the escape character the buffer should use.</td></tr></tbody></table><p>
      The <code class="methodname">set_check_brackets</code>() method sets the escape character to be used by the highlighting engine.
	  </p><p>
    When performing the initial analysis, the engine will discard a matching syntax pattern if it's prefixed with an odd number 
    of escape characters. This allows for example to correctly highlight strings with escaped quotes embedded.
    </p><p>
    This setting affects only syntax patterns (i.e. those defined in 
    <a class="link" href="class-gtksourcetag.html" title="gtksourceview.SourceTag"><code class="classname">gtksourceview.SourceTag</code></a> tags).
    </p></div><div class="refsect2" title="gtksourceview.SourceBuffer.get_escape_char"><a name="method-gtksourcebuffer--get-escape-char"></a><h3>gtksourceview.SourceBuffer.get_escape_char</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_escape_char</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 UTF-8 character for the escape character the buffer is using.</td></tr></tbody></table><p>
      The <code class="methodname">get_escape_char</code>() method determines the escaping character used by the source buffer highlighting engine.
    </p></div><div class="refsect2" title="gtksourceview.SourceBuffer.can_undo"><a name="method-gtksourcebuffer--can-undo"></a><h3>gtksourceview.SourceBuffer.can_undo</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">can_undo</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 it's possible to undo the last action.</td></tr></tbody></table><p>
      The <code class="methodname">can_undo</code>() method determines whether a source buffer can undo the last action.
    </p></div><div class="refsect2" title="gtksourceview.SourceBuffer.can_redo"><a name="method-gtksourcebuffer--can-redo"></a><h3>gtksourceview.SourceBuffer.can_redo</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">can_redo</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 a redo is possible.</td></tr></tbody></table><p>
      The <code class="methodname">can_redo</code>() method Determines whether a source buffer can redo the last action 
      (i.e. if the last operation was an undo).
    </p></div><div class="refsect2" title="gtksourceview.SourceBuffer.undo"><a name="method-gtksourcebuffer--undo"></a><h3>gtksourceview.SourceBuffer.undo</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">undo</span>(<span class="methodparam"></span>)</code></pre><p>
      The <code class="methodname">undo</code>() Undoes the last user action which modified the buffer. Use 
      <code class="methodname"><a class="link" href="class-gtksourcebuffer.html#method-gtksourcebuffer--can-undo" title="gtksourceview.SourceBuffer.can_undo">can_undo</a></code> 
      to check whether a call to this function will have any effect.
    </p><p>
      Actions are defined as groups of operations between a call to 
      <code class="methodname">begin_user_action</code>() and 
      <code class="methodname">end_user_action</code>(), 
      or sequences of similar edits (inserts or deletes) on the same line.
    </p></div><div class="refsect2" title="gtksourceview.SourceBuffer.redo"><a name="method-gtksourcebuffer--redo"></a><h3>gtksourceview.SourceBuffer.redo</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">redo</span>(<span class="methodparam"></span>)</code></pre><p>
      The <code class="methodname">redo</code>() method redoes the last undo operation. Use 
      <code class="methodname"><a class="link" href="class-gtksourcebuffer.html#method-gtksourcebuffer--can-redo" title="gtksourceview.SourceBuffer.can_redo">can_redo</a></code>
      to check whether a call to this function will have any effect.
    </p></div><div class="refsect2" title="gtksourceview.SourceBuffer.begin_not_undoable_action"><a name="method-gtksourcebuffer--begin-not-undoable-action"></a><h3>gtksourceview.SourceBuffer.begin_not_undoable_action</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">begin_not_undoable_action</span>(<span class="methodparam"></span>)</code></pre><p>
      The <code class="methodname">begin_not_undoable_action</code>() marks the beginning of a not undoable action on the buffer, 
      disabling the undo manager. Typically you would call this function before initially setting the contents of the buffer 
      (e.g. when loading a file in a text editor).
    </p><p>
      You may nest <code class="methodname"><a class="link" href="class-gtksourcebuffer.html#method-gtksourcebuffer--begin-not-undoable-action" title="gtksourceview.SourceBuffer.begin_not_undoable_action">begin_not_undoable_action</a></code>() / 
      <code class="methodname"><a class="link" href="class-gtksourcebuffer.html#method-gtksourcebuffer--end-not-undoable-action" title="gtksourceview.SourceBuffer.end_not_undoable_action">end_not_undoable_action</a></code>() blocks.
    </p></div><div class="refsect2" title="gtksourceview.SourceBuffer.end_not_undoable_action"><a name="method-gtksourcebuffer--end-not-undoable-action"></a><h3>gtksourceview.SourceBuffer.end_not_undoable_action</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">end_not_undoable_action</span>(<span class="methodparam"></span>)</code></pre><p>
      The <code class="methodname">end_not_undoable_action</code>() method marks the end of a not undoable action on the buffer. 
      When the last not undoable block is closed through the call to this function, the list of undo actions is cleared 
      and the undo manager is re-enabled.
    </p></div><div class="refsect2" title="gtksourceview.SourceBuffer.create_marker"><a name="method-gtksourcebuffer--create-marker"></a><h3>gtksourceview.SourceBuffer.create_marker</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">create_marker</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>name</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>type</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>where</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>name</code></strong> :</span></p></td><td> the name of the marker, or <code class="literal">None</code>.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>type</code></strong> :</span></p></td><td> a string defining the marker type, or <code class="literal">None</code>.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>where</code></strong> :</span></p></td><td> location to place the marker.</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-gtksourcemarker.html" title="gtksourceview.SourceMarker"><code class="classname">gtksourceview.SourceMarker</code></a>
    </td></tr></tbody></table><p>
    The <code class="methodname">set_marker_pixbuf</code>() method creates a marker in the 
    <code class="methodname"><a class="link" href="class-gtksourcebuffer.html#constructor-gtksourcebuffer" title="Constructor">gtksourceview.SourceBuffer</a></code> of type 
    <em class="parameter"><code>type</code></em>. A marker is semantically very similar to a 
    <code class="classname">gtk.TextMark</code>, except it has a type which is used by the 
    <code class="classname"><a class="link" href="class-gtksourceview.html" title="gtksourceview.SourceView">gtksourceview.SourceView</a></code> displaying the buffer to show 
    a pixmap on the left margin, at the line the marker is in. Because of this, a marker is generally associated to a line 
    and not a character position. Markers are also accessible through a position or range in the buffer.
    </p><p>
    Markers are implemented using <code class="classname">gtk.TextMark</code>, so all 
    characteristics and restrictions to marks apply to markers too. These includes life cycle issues 
    and "mark-set" and "mark-deleted" signal emissions.
    </p><p>
    Like a <code class="classname">gtk.TextMark</code>, a 
    <a class="link" href="class-gtksourcemarker.html" title="gtksourceview.SourceMarker"><code class="classname">gtksourceview.SourceMarker</code></a>
    can be anonymous if the passed <em class="parameter"><code>name</code></em> is <code class="literal">None</code>. 
    Also, the buffer owns the markers so you shouldn't unreference it.
    </p><p>
    Markers always have left gravity and are moved to the beginning of the line when the user deletes the line they were in. 
    Also, if the user deletes a region of text which contained lines with markers, those are deleted.
    </p><p>
    Typical uses for a marker are bookmarks, breakpoints, current executing instruction indication in a source file, etc..
    </p></div><div class="refsect2" title="gtksourceview.SourceBuffer.move_marker"><a name="method-gtksourcebuffer--move-marker"></a><h3>gtksourceview.SourceBuffer.move_marker</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">move_marker</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>marker</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>where</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</code></strong> :</span></p></td><td> a <a class="link" href="class-gtksourcemarker.html" title="gtksourceview.SourceMarker"><code class="classname">gtksourceview.SourceMarker</code></a>.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>where</code></strong> :</span></p></td><td> the new location for the marker.</td></tr></tbody></table><p>
    Moves <em class="parameter"><code>marker</code></em> to the new location <em class="parameter"><code>where</code></em>.
    </p></div><div class="refsect2" title="gtksourceview.SourceBuffer.delete_marker"><a name="method-gtksourcebuffer--delete-marker"></a><h3>gtksourceview.SourceBuffer.delete_marker</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">delete_marker</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>marker</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</code></strong> :</span></p></td><td> a <a class="link" href="class-gtksourcemarker.html" title="gtksourceview.SourceMarker"><code class="classname">gtksourceview.SourceMarker</code></a>.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>where</code></strong> :</span></p></td><td> the new location for the marker.</td></tr></tbody></table><p>
    Deletes <em class="parameter"><code>marker</code></em> from the source buffer. The same conditions as for 
    <code class="classname">gtk.TextMark</code>
    apply here. The marker is no longer accessible from the buffer, but if you held a reference to it, it will not be destroyed.
    </p></div><div class="refsect2" title="gtksourceview.SourceBuffer.get_marker"><a name="method-gtksourcebuffer--get-marker"></a><h3>gtksourceview.SourceBuffer.get_marker</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_marker</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>name</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>name</code></strong> :</span></p></td><td> name of the <a class="link" href="class-gtksourcemarker.html" title="gtksourceview.SourceMarker"><code class="classname">gtksourceview.SourceMarker</code></a> 
    to retreive.</td></tr></tbody></table><p>
    Looks up the <a class="link" href="class-gtksourcemarker.html" title="gtksourceview.SourceMarker"><code class="classname">gtksourceview.SourceMarker</code></a> 
    named <strong class="parameter"><code>name</code></strong> in <strong class="parameter"><code>buffer</code></strong>, returning 
    <code class="literal">None</code> if it doesn't exists.
    </p></div><div class="refsect2" title="gtksourceview.SourceBuffer.get_markers_in_region"><a name="method-gtksourcebuffer--get-markers-in-region"></a><h3>gtksourceview.SourceBuffer.get_markers_in_region</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_markers_in_region</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>begin</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>end</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>begin</code></strong> :</span></p></td><td> beginning of the range.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>end</code></strong> :</span></p></td><td> end of the range.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td> a list of the <a class="link" href="class-gtksourcemarker.html" title="gtksourceview.SourceMarker"><code class="classname">gtksourceview.SourceMarker</code></a> 
    in the range.</td></tr></tbody></table><p>
    Returns an ordered (by position) list of <a class="link" href="class-gtksourcemarker.html" title="gtksourceview.SourceMarker"><code class="classname">gtksourceview.SourceMarker</code></a> 
    objects inside the region delimited by the <code class="classname">gtk.TextIter</code> 
    <em class="parameter"><code>begin</code></em> and <em class="parameter"><code>end</code></em>. The iters may be in any order.
    </p></div><div class="refsect2" title="gtksourceview.SourceBuffer.get_first_marker"><a name="method-gtksourcebuffer--get-first-marker"></a><h3>gtksourceview.SourceBuffer.get_first_marker</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_first_marker</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> a reference to the first
        <a class="link" href="class-gtksourcemarker.html" title="gtksourceview.SourceMarker"><code class="classname">gtksourceview.SourceMarker</code></a>, 
        or <code class="literal">None</code> if there are no markers in the buffer.
        </td></tr></tbody></table><p>
      Returns the first (nearest to the top of the buffer) marker in buffer.
    </p></div><div class="refsect2" title="gtksourceview.SourceBuffer.get_last_marker"><a name="method-gtksourcebuffer--get-last-marker"></a><h3>gtksourceview.SourceBuffer.get_last_marker</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_last_marker</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> a reference to the last
        <a class="link" href="class-gtksourcemarker.html" title="gtksourceview.SourceMarker"><code class="classname">gtksourceview.SourceMarker</code></a>, 
        or <code class="literal">None</code> if there are no markers in the buffer.
        </td></tr></tbody></table><p>
      Returns the last (nearest to the bottom of the buffer) marker in buffer.
    </p></div><div class="refsect2" title="gtksourceview.SourceBuffer.get_iter_at_marker"><a name="method-gtksourcebuffer--get-iter-at-marker"></a><h3>gtksourceview.SourceBuffer.get_iter_at_marker</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_iter_at_marker</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>iter</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>marker</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>iter</code></strong> :</span></p></td><td> a <code class="classname">gtk.TextIter</code> to initialize.
    </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>marker</code></strong> :</span></p></td><td> a <a class="link" href="class-gtksourcemarker.html" title="gtksourceview.SourceMarker"><code class="classname">gtksourceview.SourceMarker</code></a> of buffer.
    </td></tr></tbody></table><p>
    Initializes <em class="parameter"><code>iter</code></em> at the location of <em class="parameter"><code>marker</code></em>.
    </p></div><div class="refsect2" title="gtksourceview.SourceBuffer.get_next_marker"><a name="method-gtksourcebuffer--get-next-marker"></a><h3>gtksourceview.SourceBuffer.get_next_marker</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_next_marker</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>iter</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>iter</code></strong> :</span></p></td><td> the location to start searching from.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td> the <a class="link" href="class-gtksourcemarker.html" title="gtksourceview.SourceMarker"><code class="classname">gtksourceview.SourceMarker</code></a> 
    nearest to the right of <em class="parameter"><code>iter</code></em>, or <code class="literal">None</code> if there are no more markers after 
    <em class="parameter"><code>iter</code></em>.</td></tr></tbody></table><p>
    Returns the nearest marker to the right of <em class="parameter"><code>iter</code></em>. If there are multiple markers at the same position, 
    this function will always return the first one (from the internal linked list), even if starting the search exactly at its location. 
    You can get the others using <code class="methodname"><a class="link" href="class-gtksourcemarker.html#method-gtksourcemarker--next" title="gtksourceview.SourceMarker.next">next</a></code>().
    </p></div><div class="refsect2" title="gtksourceview.SourceBuffer.get_prev_marker"><a name="method-gtksourcebuffer--get-prev-marker"></a><h3>gtksourceview.SourceBuffer.get_prev_marker</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_prev_marker</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>iter</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>iter</code></strong> :</span></p></td><td> the location to start searching from.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td> the <a class="link" href="class-gtksourcemarker.html" title="gtksourceview.SourceMarker"><code class="classname">gtksourceview.SourceMarker</code></a> 
    nearest to the left of <em class="parameter"><code>iter</code></em>, or <code class="literal">None</code> if there are no more markers before 
    <em class="parameter"><code>iter</code></em>.</td></tr></tbody></table><p>
    Returns the nearest marker to the left of <em class="parameter"><code>iter</code></em>. If there are multiple markers at the same position, 
    this function will always return the first one (from the internal linked list), even if starting the search exactly at its location. 
    You can get the others using <code class="methodname"><a class="link" href="class-gtksourcemarker.html#method-gtksourcemarker--prev" title="gtksourceview.SourceMarker.prev">prev</a></code>().
    </p></div></div><div class="refsect1" title="Functions"><a name="id2607653"></a><h2>Functions</h2><div class="refsect2" title="gtksourceview.SourceBuffer.gtk_source_buffer_new_with_language"><a name="function-gtksourcebuffer--new-with-language"></a><h3>gtksourceview.SourceBuffer.gtk_source_buffer_new_with_language</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">gtksourceview.SourceBuffer.gtk_source_buffer_new_with_language</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>language</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>language</code></strong> :</span></p></td><td> a <a class="link" href="class-gtksourcelanguage.html" title="gtksourceview.SourceLanguage"><code class="classname">gtksourceview.SourceLanguage</code></a>.
        </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td> a new source buffer which will highlight text according to <em class="parameter"><code>language</code></em>.</td></tr></tbody></table><p>
        Creates a new source buffer using the highlighting patterns in <em class="parameter"><code>language</code></em>. 
        This is equivalent to creating a new source buffer with the default tag table and then calling 
        <code class="methodname"><a class="link" href="class-gtksourcebuffer.html#method-gtksourcebuffer--set-language" title="gtksourceview.SourceBuffer.set_language">set_language</a></code>
      </p></div></div><div class="refsect1" title="Signals"><a name="id2607769"></a><h2>Signals</h2><div class="refsect2" title='The "can-redo" gtksourceview.SourceBuffer Signal'><a name="signal-gtksourcebuffer--can-redo"></a><h3>The "can-redo" gtksourceview.SourceBuffer Signal</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>sourcebuffer</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>arg1</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>sourcebuffer</code></em> :</span></p></td><td>the sourcebuffer that received the signal</td></tr><tr><td><p><span class="term"><em class="parameter"><code>arg1</code></em> :</span></p></td><td>TRUE if the buffer can now perform a redo.</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 "can-redo" signal is emitted when there is a change in the buffer's ability to redo an operation.
    </p></div><div class="refsect2" title='The "can-undo" gtksourceview.SourceBuffer Signal'><a name="signal-gtksourcebuffer--can-undo"></a><h3>The "can-undo" gtksourceview.SourceBuffer Signal</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>sourcebuffer</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>arg1</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>sourcebuffer</code></em> :</span></p></td><td>the sourcebuffer that received the signal</td></tr><tr><td><p><span class="term"><em class="parameter"><code>arg1</code></em> :</span></p></td><td>TRUE if the buffer can now perform an undo.</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 "can-undo" signal is emitted when there is a change in the buffer's ability to undo an operation.
    </p></div><div class="refsect2" title='The "highlight-updated" gtksourceview.SourceBuffer Signal'><a name="signal-gtksourcebuffer--highlight-updated"></a><h3>The "highlight-updated" gtksourceview.SourceBuffer Signal</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>sourcebuffer</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>start</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>end</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>sourcebuffer</code></em> :</span></p></td><td>the sourcebuffer that received the signal</td></tr><tr><td><p><span class="term"><em class="parameter"><code>start</code></em> :</span></p></td><td>the <code class="classname">gtk.TextIter</code>
          at the start of the updated region.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>end</code></em> :</span></p></td><td>the <code class="classname">gtk.TextIter</code>
          at the end of the updated region.</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 "highlight-updated" signal is emitted whenever the syntax highlighting information has been updated, 
      so that views can request a redraw if the region changed is visible. Usually only view widgets displaying 
      this buffer will be interested in this signal.
    </p></div><div class="refsect2" title='The "marker-updated" gtksourceview.SourceBuffer Signal'><a name="signal-gtksourcebuffer--marker-updated"></a><h3>The "marker-updated" gtksourceview.SourceBuffer Signal</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>sourcebuffer</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>arg1</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>sourcebuffer</code></em> :</span></p></td><td>the sourcebuffer that received the signal</td></tr><tr><td><p><span class="term"><em class="parameter"><code>end</code></em> :</span></p></td><td>the <code class="classname">gtk.TextIter</code>
          at the location where the change occurred.</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 "can-undo" signal is emitted whenever a marker of <em class="parameter"><code>sourcebuffer</code></em> has changed and 
      needs to be redisplayed by the view. A change in a marker's type or location can trigger this signal.
    </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-gtksourceview.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-gtksourcelanguage.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gtksourceview.SourceView </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gtksourceview.SourceLanguage</td></tr></table></div></body></html>