File: class-gtktextbuffer.html

package info (click to toggle)
python-gtk2-doc 2.5.2-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 8,304 kB
  • ctags: 3,741
  • sloc: makefile: 38
file content (513 lines) | stat: -rw-r--r-- 148,253 bytes parent folder | download
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
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>gtk.TextBuffer</title><meta name="generator" content="DocBook XSL Stylesheets V1.65.1"><link rel="home" href="index.html" title="PyGTK 2.0 Reference Manual"><link rel="up" href="gtk-class-reference.html" title="The gtk Class Reference"><link rel="previous" href="class-gtktextattributes.html" title="gtk.TextAttributes"><link rel="next" href="class-gtktextchildanchor.html" title="gtk.TextChildAnchor"></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">gtk.TextBuffer</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gtktextattributes.html">Prev</a></td><th width="60%" align="center">The gtk Class Reference</th><td width="20%" align="right"><a accesskey="n" href="class-gtktextchildanchor.html">Next</a></td></tr></table><hr></div><div class="refentry" lang="en"><a name="class-gtktextbuffer"></a><div class="titlepage"><div></div><div></div></div><div class="refnamediv"><h2>gtk.TextBuffer</h2><p>gtk.TextBuffer &#8212; stores attributed text for display in a <a href="class-gtktextview.html" title="gtk.TextView"><tt class="classname">gtk.TextView</tt></a></p></div><div class="refsect1" lang="en"><a name="id3525485"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gtk.TextBuffer</span></span>(<span class="ooclass"><span class="classname"><a href="class-gobject.html" title="gobject.GObject">gobject.GObject</a></span></span>):
<code class="constructorsynopsis">    <span class="methodname"><a href="class-gtktextbuffer.html#constructor-gtktextbuffer" title="Constructor">gtk.TextBuffer</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>table</tt></b></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtktextbuffer.html#method-gtktextbuffer--get-line-count" title="gtk.TextBuffer.get_line_count">get_line_count</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtktextbuffer.html#method-gtktextbuffer--get-char-count" title="gtk.TextBuffer.get_char_count">get_char_count</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtktextbuffer.html#method-gtktextbuffer--get-tag-table" title="gtk.TextBuffer.get_tag_table">get_tag_table</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtktextbuffer.html#method-gtktextbuffer--set-text" title="gtk.TextBuffer.set_text">set_text</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>text</tt></b></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtktextbuffer.html#method-gtktextbuffer--insert" title="gtk.TextBuffer.insert">insert</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>iter</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>text</tt></b></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtktextbuffer.html#method-gtktextbuffer--insert-at-cursor" title="gtk.TextBuffer.insert_at_cursor">insert_at_cursor</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>text</tt></b></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtktextbuffer.html#method-gtktextbuffer--insert-interactive" title="gtk.TextBuffer.insert_interactive">insert_interactive</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>iter</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>text</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>default_editable</tt></b></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtktextbuffer.html#method-gtktextbuffer--insert-interactive-at-cursor" title="gtk.TextBuffer.insert_interactive_at_cursor">insert_interactive_at_cursor</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>text</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>default_editable</tt></b></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtktextbuffer.html#method-gtktextbuffer--insert-range" title="gtk.TextBuffer.insert_range">insert_range</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>iter</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>start</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>end</tt></b></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtktextbuffer.html#method-gtktextbuffer--insert-range-interactive" title="gtk.TextBuffer.insert_range_interactive">insert_range_interactive</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>iter</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>start</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>end</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>default_editable</tt></b></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtktextbuffer.html#method-gtktextbuffer--insert-with-tags" title="gtk.TextBuffer.insert_with_tags">insert_with_tags</a></span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>iter</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>text</tt></i></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>...</tt></b></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtktextbuffer.html#method-gtktextbuffer--insert-with-tags-by-name" title="gtk.TextBuffer.insert_with_tags_by_name">insert_with_tags_by_name</a></span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>iter</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>text</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>...</tt></i></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtktextbuffer.html#method-gtktextbuffer--delete" title="gtk.TextBuffer.delete">delete</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>start</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>end</tt></b></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtktextbuffer.html#method-gtktextbuffer--delete-interactive" title="gtk.TextBuffer.delete_interactive">delete_interactive</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>start_iter</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>end_iter</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>default_editable</tt></b></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtktextbuffer.html#method-gtktextbuffer--get-text" title="gtk.TextBuffer.get_text">get_text</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>start</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>end</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>include_hidden_chars</tt></b></span><span class="initializer">=TRUE</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtktextbuffer.html#method-gtktextbuffer--get-slice" title="gtk.TextBuffer.get_slice">get_slice</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>start</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>end</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>include_hidden_chars</tt></b></span><span class="initializer">=TRUE</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtktextbuffer.html#method-gtktextbuffer--insert-pixbuf" title="gtk.TextBuffer.insert_pixbuf">insert_pixbuf</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>iter</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>pixbuf</tt></b></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtktextbuffer.html#method-gtktextbuffer--insert-child-anchor" title="gtk.TextBuffer.insert_child_anchor">insert_child_anchor</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>iter</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>anchor</tt></b></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtktextbuffer.html#method-gtktextbuffer--create-child-anchor" title="gtk.TextBuffer.create_child_anchor">create_child_anchor</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>iter</tt></b></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtktextbuffer.html#method-gtktextbuffer--create-mark" title="gtk.TextBuffer.create_mark">create_mark</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>mark_name</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>where</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>left_gravity</tt></b></span><span class="initializer">=FALSE</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtktextbuffer.html#method-gtktextbuffer--move-mark" title="gtk.TextBuffer.move_mark">move_mark</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>mark</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>where</tt></b></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtktextbuffer.html#method-gtktextbuffer--delete-mark" title="gtk.TextBuffer.delete_mark">delete_mark</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>mark</tt></b></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtktextbuffer.html#method-gtktextbuffer--get-mark" title="gtk.TextBuffer.get_mark">get_mark</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>name</tt></b></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtktextbuffer.html#method-gtktextbuffer--move-mark-by-name" title="gtk.TextBuffer.move_mark_by_name">move_mark_by_name</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>name</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>where</tt></b></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtktextbuffer.html#method-gtktextbuffer--delete-mark-by-name" title="gtk.TextBuffer.delete_mark_by_name">delete_mark_by_name</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>name</tt></b></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtktextbuffer.html#method-gtktextbuffer--get-insert" title="gtk.TextBuffer.get_insert">get_insert</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtktextbuffer.html#method-gtktextbuffer--get-selection-bound" title="gtk.TextBuffer.get_selection_bound">get_selection_bound</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtktextbuffer.html#method-gtktextbuffer--place-cursor" title="gtk.TextBuffer.place_cursor">place_cursor</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>where</tt></b></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtktextbuffer.html#method-gtktextbuffer--place-cursor" title="gtk.TextBuffer.place_cursor">select_range</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>ins</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>bound</tt></b></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtktextbuffer.html#method-gtktextbuffer--apply-tag" title="gtk.TextBuffer.apply_tag">apply_tag</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>tag</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>start</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>end</tt></b></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtktextbuffer.html#method-gtktextbuffer--remove-tag" title="gtk.TextBuffer.remove_tag">remove_tag</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>tag</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>start</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>end</tt></b></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtktextbuffer.html#method-gtktextbuffer--apply-tag-by-name" title="gtk.TextBuffer.apply_tag_by_name">apply_tag_by_name</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>name</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>start</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>end</tt></b></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtktextbuffer.html#method-gtktextbuffer--remove-tag-by-name" title="gtk.TextBuffer.remove_tag_by_name">remove_tag_by_name</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>name</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>start</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>end</tt></b></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtktextbuffer.html#method-gtktextbuffer--remove-all-tags" title="gtk.TextBuffer.remove_all_tags">remove_all_tags</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>start</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>end</tt></b></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtktextbuffer.html#method-gtktextbuffer--create-tag" title="gtk.TextBuffer.create_tag">create_tag</a></span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>tag_name</tt></i></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>...</tt></i></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtktextbuffer.html#method-gtktextbuffer--get-iter-at-line-offset" title="gtk.TextBuffer.get_iter_at_line_offset">get_iter_at_line_offset</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>line_number</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>char_offset</tt></b></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtktextbuffer.html#method-gtktextbuffer--get-iter-at-line-index" title="gtk.TextBuffer.get_iter_at_line_index">get_iter_at_line_index</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>line_number</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>byte_index</tt></b></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtktextbuffer.html#method-gtktextbuffer--get-iter-at-offset" title="gtk.TextBuffer.get_iter_at_offset">get_iter_at_offset</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>char_offset</tt></b></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtktextbuffer.html#method-gtktextbuffer--get-iter-at-line" title="gtk.TextBuffer.get_iter_at_line">get_iter_at_line</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>line_number</tt></b></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtktextbuffer.html#method-gtktextbuffer--get-start-iter" title="gtk.TextBuffer.get_start_iter">get_start_iter</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtktextbuffer.html#method-gtktextbuffer--get-end-iter" title="gtk.TextBuffer.get_end_iter">get_end_iter</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtktextbuffer.html#method-gtktextbuffer--get-bounds" title="gtk.TextBuffer.get_bounds">get_bounds</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtktextbuffer.html#method-gtktextbuffer--get-iter-at-mark" title="gtk.TextBuffer.get_iter_at_mark">get_iter_at_mark</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>mark</tt></b></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtktextbuffer.html#method-gtktextbuffer--get-iter-at-child-anchor" title="gtk.TextBuffer.get_iter_at_child_anchor">get_iter_at_child_anchor</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>anchor</tt></b></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtktextbuffer.html#method-gtktextbuffer--get-modified" title="gtk.TextBuffer.get_modified">get_modified</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtktextbuffer.html#method-gtktextbuffer--set-modified" title="gtk.TextBuffer.set_modified">set_modified</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>setting</tt></b></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtktextbuffer.html#method-gtktextbuffer--add-selection-clipboard" title="gtk.TextBuffer.add_selection_clipboard">add_selection_clipboard</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>clipboard</tt></b></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtktextbuffer.html#method-gtktextbuffer--remove-selection-clipboard" title="gtk.TextBuffer.remove_selection_clipboard">remove_selection_clipboard</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>clipboard</tt></b></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtktextbuffer.html#method-gtktextbuffer--cut-clipboard" title="gtk.TextBuffer.cut_clipboard">cut_clipboard</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>clipboard</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>default_editable</tt></b></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtktextbuffer.html#method-gtktextbuffer--copy-clipboard" title="gtk.TextBuffer.copy_clipboard">copy_clipboard</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>clipboard</tt></b></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtktextbuffer.html#method-gtktextbuffer--paste-clipboard" title="gtk.TextBuffer.paste_clipboard">paste_clipboard</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>clipboard</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>override_location</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>default_editable</tt></b></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtktextbuffer.html#method-gtktextbuffer--get-selection-bounds" title="gtk.TextBuffer.get_selection_bounds">get_selection_bounds</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtktextbuffer.html#method-gtktextbuffer--delete-selection" title="gtk.TextBuffer.delete_selection">delete_selection</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>interactive</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>default_editable</tt></b></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtktextbuffer.html#method-gtktextbuffer--begin-user-action" title="gtk.TextBuffer.begin_user_action">begin_user_action</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtktextbuffer.html#method-gtktextbuffer--end-user-action" title="gtk.TextBuffer.end_user_action">end_user_action</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtktextbuffer.html#method-gtktextbuffer--end-user-action" title="gtk.TextBuffer.end_user_action">backspace</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>iter</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>interactive</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>default_editable</tt></b></span></span>)</code><br></pre></td></tr></table></div><div class="refsect1" lang="en"><a name="id3526964"></a><h2>Ancestry</h2><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="synopsis">+-- <a href="class-gobject.html" title="gobject.GObject">gobject.GObject</a>
  +-- <a href="class-gtktextbuffer.html" title="gtk.TextBuffer">gtk.TextBuffer</a>
</pre></td></tr></table></div><div class="refsect1" lang="en"><a name="id3526988"></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><col><col></colgroup><tbody><tr valign="top"><td valign="top">"tag-table"</td><td valign="top">Read-Write-Construct Only</td><td valign="top">The <a href="class-gtktexttagtable.html" title="gtk.TextTagTable"><tt class="classname">gtk.TextTagTable</tt></a> 
associated with the textbuffer. Available in GTK+ 2.2 and above.</td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" lang="en"><a name="id3527067"></a><h2>Attributes</h2><div class="blockquote"><table width="100%" border="0" bgcolor="#E0E0E0"><tr><td valign="top"><div class="informaltable"><table cellpadding="5" width="100%" border="0"><colgroup><col><col><col></colgroup><tbody><tr valign="top"><td valign="top">"tag_table"</td><td valign="top">Read</td><td valign="top">The <a href="class-gtktexttagtable.html" title="gtk.TextTagTable"><tt class="classname">gtk.TextTagTable</tt></a> 
associated with the textbuffer.</td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" lang="en"><a name="id3527147"></a><h2>Signal Prototypes</h2><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term">"<a href="class-gtktextbuffer.html#signal-gtktextbuffer--apply-tag" title='The "apply-tag" gtk.TextBuffer Signal'>apply-tag</a>"</span></td><td><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>textbuffer</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>texttag</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>start</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>end</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>user_param1</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>...</tt></i></span></span>)</code></td></tr><tr><td><span class="term">"<a href="class-gtktextbuffer.html#signal-gtktextbuffer--begin-user-action" title='The "begin-user-action" gtk.TextBuffer Signal'>begin-user-action</a>"</span></td><td><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>textbuffer</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>user_param1</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>...</tt></i></span></span>)</code></td></tr><tr><td><span class="term">"<a href="class-gtktextbuffer.html#signal-gtktextbuffer--changed" title='The "changed" gtk.TextBuffer Signal'>changed</a>"</span></td><td><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>textbuffer</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>user_param1</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>...</tt></i></span></span>)</code></td></tr><tr><td><span class="term">"<a href="class-gtktextbuffer.html#signal-gtktextbuffer--delete-range" title='The "delete-range" gtk.TextBuffer Signal'>delete-range</a>"</span></td><td><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>textbuffer</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>start</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>end</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>user_param1</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>...</tt></i></span></span>)</code></td></tr><tr><td><span class="term">"<a href="class-gtktextbuffer.html#signal-gtktextbuffer--end-user-action" title='The "end-user-action" gtk.TextBuffer Signal'>end-user-action</a>"</span></td><td><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>textbuffer</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>user_param1</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>...</tt></i></span></span>)</code></td></tr><tr><td><span class="term">"<a href="class-gtktextbuffer.html#signal-gtktextbuffer--insert-child-anchor" title='The "insert-child-anchor" gtk.TextBuffer Signal'>insert-child-anchor</a>"</span></td><td><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>textbuffer</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>iter</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>anchor</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>user_param1</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>...</tt></i></span></span>)</code></td></tr><tr><td><span class="term">"<a href="class-gtktextbuffer.html#signal-gtktextbuffer--insert-pixbuf" title='The "insert-pixbuf" gtk.TextBuffer Signal'>insert-pixbuf</a>"</span></td><td><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>textbuffer</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>iter</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>pixbuf</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>user_param1</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>...</tt></i></span></span>)</code></td></tr><tr><td><span class="term">"<a href="class-gtktextbuffer.html#signal-gtktextbuffer--insert-text" title='The "insert-text" gtk.TextBuffer Signal'>insert-text</a>"</span></td><td><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>textbuffer</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>iter</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>text</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>length</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>user_param1</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>...</tt></i></span></span>)</code></td></tr><tr><td><span class="term">"<a href="class-gtktextbuffer.html#signal-gtktextbuffer--mark-deleted" title='The "mark-deleted" gtk.TextBuffer Signal'>mark-deleted</a>"</span></td><td><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>textbuffer</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>textmark</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>user_param1</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>...</tt></i></span></span>)</code></td></tr><tr><td><span class="term">"<a href="class-gtktextbuffer.html#signal-gtktextbuffer--mark-set" title='The "mark-set" gtk.TextBuffer Signal'>mark-set</a>"</span></td><td><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>textbuffer</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>iter</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>textmark</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>user_param1</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>...</tt></i></span></span>)</code></td></tr><tr><td><span class="term">"<a href="class-gtktextbuffer.html#signal-gtktextbuffer--modified-changed" title='The "modified-changed" gtk.TextBuffer Signal'>modified-changed</a>"</span></td><td><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>textbuffer</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>user_param1</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>...</tt></i></span></span>)</code></td></tr><tr><td><span class="term">"<a href="class-gtktextbuffer.html#signal-gtktextbuffer--remove-tag" title='The "remove-tag" gtk.TextBuffer Signal'>remove-tag</a>"</span></td><td><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>textbuffer</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>texttag</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>start</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>end</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>user_param1</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>...</tt></i></span></span>)</code></td></tr></tbody></table></div><div class="refsect1" lang="en"><a name="id3527738"></a><h2>Description</h2><p>A <a href="class-gtktextbuffer.html" title="gtk.TextBuffer"><tt class="classname">gtk.TextBuffer</tt></a>
is the core component of the PyGTK text editing system. A <a href="class-gtktextbuffer.html" title="gtk.TextBuffer"><tt class="classname">gtk.TextBuffer</tt></a>
contains the text, pixbufs and child widget anchors that are displayed in
one or more <a href="class-gtktextview.html" title="gtk.TextView"><tt class="classname">gtk.TextView</tt></a>
widgets. A <a href="class-gtktextbuffer.html" title="gtk.TextBuffer"><tt class="classname">gtk.TextBuffer</tt></a>
has an associated <a href="class-gtktexttagtable.html" title="gtk.TextTagTable"><tt class="classname">gtk.TextTagTable</tt></a> 
that contains the <a href="class-gtktexttag.html" title="gtk.TextTag"><tt class="classname">gtk.TextTag</tt></a> objects
that can be used to set attributes on the text in the textbuffer.</p><p>A <a href="class-gtktextbuffer.html" title="gtk.TextBuffer"><tt class="classname">gtk.TextBuffer</tt></a>
can be automatically created when creating a <a href="class-gtktextview.html" title="gtk.TextView"><tt class="classname">gtk.TextView</tt></a> or it
can be created with the <a href="class-gtktextbuffer.html#constructor-gtktextbuffer" title="Constructor">gtk.TextBuffer</a>() constructor and
associated with a <a href="class-gtktextview.html" title="gtk.TextView"><tt class="classname">gtk.TextView</tt></a> using
the <a href="class-gtktextview.html#method-gtktextview--set-buffer" title="gtk.TextView.set_buffer"><tt class="methodname">set_buffer</tt>()</a> 
method or the <a href="class-gtktextview.html#constructor-gtktextview" title="Constructor">gtk.TextView</a>()
constructor.</p></div><div class="refsect1" lang="en"><a name="constructor-gtktextbuffer"></a><h2>Constructor</h2><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="constructorsynopsis">    <span class="methodname">gtk.TextBuffer</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>table</tt></b></span><span class="initializer">=None</span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>table</tt></b>:</span></td><td>a tag table, or None to create a new
one</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>a new text buffer object</td></tr></tbody></table><p>Creates a new <a href="class-gtktextbuffer.html" title="gtk.TextBuffer"><tt class="classname">gtk.TextBuffer</tt></a>
object.</p></div><div class="refsect1" lang="en"><a name="id3527927"></a><h2>Methods</h2><div class="refsect2" lang="en"><a name="method-gtktextbuffer--get-line-count"></a><h3>gtk.TextBuffer.get_line_count</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_line_count</span>(<span class="methodparam"></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>the number of lines in the
buffer</td></tr></tbody></table><p>The <tt class="methodname">get_line_count</tt>() method returns the
number of lines in the buffer. This value is cached, so the function is very
fast.</p></div><div class="refsect2" lang="en"><a name="method-gtktextbuffer--get-char-count"></a><h3>gtk.TextBuffer.get_char_count</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_char_count</span>(<span class="methodparam"></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>the number of characters in the
buffer</td></tr></tbody></table><p>The <tt class="methodname">get_char_count</tt>() method returns the
number of characters in the buffer; note that characters and bytes are not
the same, you can't e.g. expect the contents of the buffer in string form to
be this many bytes long. The character count is cached, so this function is
very fast.</p></div><div class="refsect2" lang="en"><a name="method-gtktextbuffer--get-tag-table"></a><h3>gtk.TextBuffer.get_tag_table</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_tag_table</span>(<span class="methodparam"></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>the buffer's tag table</td></tr></tbody></table><p>The <tt class="methodname">get_tag_table</tt>() method returns the
<a href="class-gtktexttagtable.html" title="gtk.TextTagTable"><tt class="classname">gtk.TextTagTable</tt></a> 
object associated with the textbuffer.</p></div><div class="refsect2" lang="en"><a name="method-gtktextbuffer--set-text"></a><h3>gtk.TextBuffer.set_text</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_text</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>text</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>text</tt></b>:</span></td><td>UTF-8 text to insert</td></tr></tbody></table><p>The <tt class="methodname">set_text</tt>() method replaces the
current contents of the textbuffer with the contents of
<i class="parameter"><tt>text</tt></i>. <i class="parameter"><tt>text</tt></i> must be valid
UTF-8.</p></div><div class="refsect2" lang="en"><a name="method-gtktextbuffer--insert"></a><h3>gtk.TextBuffer.insert</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">insert</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>iter</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>text</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>iter</tt></b>:</span></td><td>a position in the buffer</td></tr><tr><td><span class="term"><b class="parameter"><tt>text</tt></b>:</span></td><td>UTF-8 format text to
insert</td></tr></tbody></table><p>The <tt class="methodname">insert</tt>() method inserts the
contents of <i class="parameter"><tt>text</tt></i> into the textbuffer at the position
specified by <i class="parameter"><tt>iter</tt></i>. The "insert_text" signal is
emitted and the text insertion actually occurs in the default handler for
the signal. <i class="parameter"><tt>iter</tt></i> is invalidated when insertion occurs
(because the buffer contents change), but the default signal handler
revalidates it to point to the end of the inserted text.</p></div><div class="refsect2" lang="en"><a name="method-gtktextbuffer--insert-at-cursor"></a><h3>gtk.TextBuffer.insert_at_cursor</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">insert_at_cursor</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>text</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>text</tt></b>:</span></td><td>some text in UTF-8 format</td></tr></tbody></table><p>The <tt class="methodname">insert_at_cursor</tt>() method is a
convenience method that calls the <a href="class-gtktextbuffer.html#method-gtktextbuffer--insert" title="gtk.TextBuffer.insert"><tt class="methodname">insert</tt>()</a> 
method, using the current cursor position as the insertion point.</p></div><div class="refsect2" lang="en"><a name="method-gtktextbuffer--insert-interactive"></a><h3>gtk.TextBuffer.insert_interactive</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">insert_interactive</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>iter</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>text</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>default_editable</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>iter</tt></b>:</span></td><td>a position in
<i class="parameter"><tt>buffer</tt></i></td></tr><tr><td><span class="term"><b class="parameter"><tt>text</tt></b>:</span></td><td>some UTF-8 text</td></tr><tr><td><span class="term"><b class="parameter"><tt>default_editable</tt></b>:</span></td><td>default editability of
buffer</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td><tt class="literal">TRUE</tt> if the text was
actually inserted</td></tr></tbody></table><p>The <tt class="methodname">insert_interactive</tt>() method is
similar to the <a href="class-gtktextbuffer.html#method-gtktextbuffer--insert" title="gtk.TextBuffer.insert"><tt class="methodname">insert</tt>()</a> 
method, except the insertion of <i class="parameter"><tt>text</tt></i> at
<i class="parameter"><tt>iter</tt></i> will not occur if <i class="parameter"><tt>iter</tt></i> is
at a non-editable location in the buffer. A location is non-editable if a
<a href="class-gtktexttag.html" title="gtk.TextTag"><tt class="classname">gtk.TextTag</tt></a>
applied at that location has its "editable" attribute set to
<tt class="literal">FALSE</tt> or the <a href="class-gtktextview.html" title="gtk.TextView"><tt class="classname">gtk.TextView</tt></a> used
by the user is set non-editable. Usually you want to prevent insertions at
locations if the insertion results from a user action (is
interactive).</p><p><i class="parameter"><tt>default_editable</tt></i> indicates the
editability of text that doesn't have a tag affecting editability applied to
it. Typically the result of the <a href="class-gtktextview.html#method-gtktextview--get-editable" title="gtk.TextView.get_editable"><tt class="methodname">gtk.TextView.get_editable</tt>()</a> 
method is appropriate here.</p></div><div class="refsect2" lang="en"><a name="method-gtktextbuffer--insert-interactive-at-cursor"></a><h3>gtk.TextBuffer.insert_interactive_at_cursor</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">insert_interactive_at_cursor</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>text</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>default_editable</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>text</tt></b>:</span></td><td>text in UTF-8 format</td></tr><tr><td><span class="term"><b class="parameter"><tt>default_editable</tt></b>:</span></td><td>default editability of
buffer</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td><tt class="literal">TRUE</tt> if the text was
actually inserted</td></tr></tbody></table><p>The <tt class="methodname">insert_interactive_at_cursor</tt>()
method calls the <a href="class-gtktextbuffer.html#method-gtktextbuffer--insert-interactive" title="gtk.TextBuffer.insert_interactive"><tt class="methodname">insert_interactive</tt>()</a> 
method to insert <i class="parameter"><tt>text</tt></i> at the cursor (insert)
position. <i class="parameter"><tt>default_editable</tt></i> indicates the editability
of text that doesn't have a tag affecting editability applied to it.
Typically the result of the <a href="class-gtktextview.html#method-gtktextview--get-editable" title="gtk.TextView.get_editable"><tt class="methodname">gtk.TextView.get_editable</tt>()</a> 
method is appropriate here.</p></div><div class="refsect2" lang="en"><a name="method-gtktextbuffer--insert-range"></a><h3>gtk.TextBuffer.insert_range</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">insert_range</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>iter</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>start</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>end</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>iter</tt></b>:</span></td><td>a position in the
textbuffer</td></tr><tr><td><span class="term"><b class="parameter"><tt>start</tt></b>:</span></td><td>a position in a (possibly different) <a href="class-gtktextbuffer.html" title="gtk.TextBuffer"><tt class="classname">gtk.TextBuffer</tt></a></td></tr><tr><td><span class="term"><b class="parameter"><tt>end</tt></b>:</span></td><td>another position in the same buffer as
<i class="parameter"><tt>start</tt></i></td></tr></tbody></table><p>The <tt class="methodname">insert_range</tt>() method copies text,
tags, and pixbufs (but not child anchors) between
<i class="parameter"><tt>start</tt></i> and <i class="parameter"><tt>end</tt></i> (the order of
<i class="parameter"><tt>start</tt></i> and <i class="parameter"><tt>end</tt></i> doesn't matter)
form a <a href="class-gtktextbuffer.html" title="gtk.TextBuffer"><tt class="classname">gtk.TextBuffer</tt></a>
and inserts the copy at <i class="parameter"><tt>iter</tt></i>. Used instead of simply
getting/inserting text because it preserves images and tags. If
<i class="parameter"><tt>start</tt></i> and <i class="parameter"><tt>end</tt></i> are in a
different buffer from <i class="parameter"><tt>buffer</tt></i>, the two buffers must
share the same tag table. This method is implemented via emissions of the
"insert_text" and "apply_tag" signals.</p></div><div class="refsect2" lang="en"><a name="method-gtktextbuffer--insert-range-interactive"></a><h3>gtk.TextBuffer.insert_range_interactive</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">insert_range_interactive</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>iter</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>start</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>end</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>default_editable</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>iter</tt></b>:</span></td><td>a position in the
textbuffer</td></tr><tr><td><span class="term"><b class="parameter"><tt>start</tt></b>:</span></td><td>a position in a (possibly different) <a href="class-gtktextbuffer.html" title="gtk.TextBuffer"><tt class="classname">gtk.TextBuffer</tt></a></td></tr><tr><td><span class="term"><b class="parameter"><tt>end</tt></b>:</span></td><td>another position in the same buffer as
<i class="parameter"><tt>start</tt></i></td></tr><tr><td><span class="term"><b class="parameter"><tt>default_editable</tt></b>:</span></td><td>default editability of the
buffer</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td><tt class="literal">TRUE</tt> if an insertion was
possible at <i class="parameter"><tt>iter</tt></i></td></tr></tbody></table><p>The <tt class="methodname">insert_range_interactive</tt>() method
is similar to the <a href="class-gtktextbuffer.html#method-gtktextbuffer--insert-range" title="gtk.TextBuffer.insert_range"><tt class="methodname">insert_range</tt>()</a> 
method, except the insertion of <i class="parameter"><tt>text</tt></i> at
<i class="parameter"><tt>iter</tt></i> will not occur if the insertion position is
non-editable. A location is non-editable if a <a href="class-gtktexttag.html" title="gtk.TextTag"><tt class="classname">gtk.TextTag</tt></a> applied
at that location has its "editable" attribute set to
<tt class="literal">FALSE</tt> or the <a href="class-gtktextview.html" title="gtk.TextView"><tt class="classname">gtk.TextView</tt></a> used
by the user is set non-editable. The <i class="parameter"><tt>default_editable</tt></i>
parameter indicates whether the text is editable at
<i class="parameter"><tt>iter</tt></i> if no tags enclosing <i class="parameter"><tt>iter</tt></i>
affect editability. Typically the result of the <a href="class-gtktextview.html#method-gtktextview--get-editable" title="gtk.TextView.get_editable"><tt class="methodname">gtk.TextView.get_editable</tt>()</a> 
method is appropriate here.</p></div><div class="refsect2" lang="en"><a name="method-gtktextbuffer--insert-with-tags"></a><h3>gtk.TextBuffer.insert_with_tags</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">insert_with_tags</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>iter</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>text</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>...</tt></i></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><i class="parameter"><tt>iter</tt></i>:</span></td><td>an iterator in
<i class="parameter"><tt>buffer</tt></i></td></tr><tr><td><span class="term"><i class="parameter"><tt>text</tt></i>:</span></td><td>UTF-8 text</td></tr><tr><td><span class="term"><i class="parameter"><tt>...</tt></i>:</span></td><td>one or more optional <a href="class-gtktexttag.html" title="gtk.TextTag"><tt class="classname">gtk.TextTag</tt></a> objects
to apply to <i class="parameter"><tt>text</tt></i></td></tr></tbody></table><p>The <tt class="methodname">insert_with_tags</tt>() method inserts
the specified <i class="parameter"><tt>text</tt></i> into the textbuffer at the
location specified by <i class="parameter"><tt>iter</tt></i>, applying any optional
tags following the first two parameters to the newly-inserted text. This
method is a convenience method that is equivalent to calling the <a href="class-gtktextbuffer.html#method-gtktextbuffer--insert" title="gtk.TextBuffer.insert"><tt class="methodname">insert</tt>()</a> 
method, then the <a href="class-gtktextbuffer.html#method-gtktextbuffer--apply-tag" title="gtk.TextBuffer.apply_tag"><tt class="methodname">apply_tag</tt>()</a> 
method on the inserted text.</p></div><div class="refsect2" lang="en"><a name="method-gtktextbuffer--insert-with-tags-by-name"></a><h3>gtk.TextBuffer.insert_with_tags_by_name</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">insert_with_tags_by_name</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>iter</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>text</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>...</tt></i></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><i class="parameter"><tt>iter</tt></i>:</span></td><td>position in
<i class="parameter"><tt>buffer</tt></i></td></tr><tr><td><span class="term"><i class="parameter"><tt>text</tt></i>:</span></td><td>UTF-8 text</td></tr><tr><td><span class="term"><i class="parameter"><tt>...</tt></i>:</span></td><td>one or more optional <a href="class-gtktexttag.html" title="gtk.TextTag"><tt class="classname">gtk.TextTag</tt></a> names
to apply to <i class="parameter"><tt>text</tt></i></td></tr></tbody></table><p>The <tt class="methodname">insert_with_tags_by_name</tt>() method
is similar to the <a href="class-gtktextbuffer.html#method-gtktextbuffer--insert-with-tags" title="gtk.TextBuffer.insert_with_tags"><tt class="methodname">insert_with_tags</tt>()</a> 
method, but uses tag names instead of tag objects.</p></div><div class="refsect2" lang="en"><a name="method-gtktextbuffer--delete"></a><h3>gtk.TextBuffer.delete</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">delete</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>start</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>end</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>start</tt></b>:</span></td><td>a position in the
textbuffer</td></tr><tr><td><span class="term"><b class="parameter"><tt>end</tt></b>:</span></td><td>another position in the
textbuffer</td></tr></tbody></table><p>The <tt class="methodname">delete</tt>() method deletes the text
between <i class="parameter"><tt>start</tt></i> and <i class="parameter"><tt>end</tt></i>. The
order of <i class="parameter"><tt>start</tt></i> and <i class="parameter"><tt>end</tt></i> is not
actually relevant as the <tt class="methodname">delete</tt>() method will
reorder them. This method emits the "delete_range" signal, and the default
handler of that signal deletes the text. Because the textbuffer is modified,
all outstanding iterators become invalid after calling this function;
however, <i class="parameter"><tt>start</tt></i> and <i class="parameter"><tt>end</tt></i> will be
re-initialized to point to the location where text was deleted.</p></div><div class="refsect2" lang="en"><a name="method-gtktextbuffer--delete-interactive"></a><h3>gtk.TextBuffer.delete_interactive</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">delete_interactive</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>start_iter</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>end_iter</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>default_editable</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>start_iter</tt></b>:</span></td><td>the start of the text to
delete</td></tr><tr><td><span class="term"><b class="parameter"><tt>end_iter</tt></b>:</span></td><td>the end of the text to
delete</td></tr><tr><td><span class="term"><b class="parameter"><tt>default_editable</tt></b>:</span></td><td>whether the buffer is editable by
default</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td><tt class="literal">TRUE</tt> if some text was
actually deleted</td></tr></tbody></table><p>The <tt class="methodname">delete_interactive</tt>() method deletes
all <span class="emphasis"><em>editable</em></span> text in the given range. This method calls
the <a href="class-gtktextbuffer.html#method-gtktextbuffer--delete" title="gtk.TextBuffer.delete"><tt class="methodname">delete</tt>()</a> 
method for each editable sub-range of
[<i class="parameter"><tt>start</tt></i>,<i class="parameter"><tt>end</tt></i>).
<i class="parameter"><tt>start</tt></i> and <i class="parameter"><tt>end</tt></i> are revalidated
to point to the location of the last deleted range, or left untouched if no
text was deleted. A range of <i class="parameter"><tt>text</tt></i> is non-editable if
a <a href="class-gtktexttag.html" title="gtk.TextTag"><tt class="classname">gtk.TextTag</tt></a>
applied to that range has its "editable" attribute set to
<tt class="literal">FALSE</tt> or the <a href="class-gtktextview.html" title="gtk.TextView"><tt class="classname">gtk.TextView</tt></a> used
by the user is set non-editable. The <i class="parameter"><tt>default_editable</tt></i>
parameter indicates whether <i class="parameter"><tt>text</tt></i> is editable if no
tags enclosing any part of <i class="parameter"><tt>text</tt></i> affect editability.
Typically the result of the <a href="class-gtktextview.html#method-gtktextview--get-editable" title="gtk.TextView.get_editable"><tt class="methodname">gtk.TextView.get_editable</tt>()</a> 
method is appropriate here.</p></div><div class="refsect2" lang="en"><a name="method-gtktextbuffer--get-text"></a><h3>gtk.TextBuffer.get_text</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_text</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>start</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>end</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>include_hidden_chars</tt></b></span><span class="initializer">=TRUE</span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>start</tt></b>:</span></td><td>the start of a range</td></tr><tr><td><span class="term"><b class="parameter"><tt>end</tt></b>:</span></td><td>the end of a range</td></tr><tr><td><span class="term"><b class="parameter"><tt>include_hidden_chars</tt></b>:</span></td><td>if <tt class="literal">TRUE</tt> include invisible
text</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>the text in the range</td></tr></tbody></table><p>The <tt class="methodname">get_text</tt>() method returns the text
in the specified range
[<i class="parameter"><tt>start</tt></i>,<i class="parameter"><tt>end</tt></i>). Undisplayed text
(text marked with tags that set the invisibility attribute) are excluded if
<i class="parameter"><tt>include_hidden_chars</tt></i> is <tt class="literal">FALSE</tt>.
<tt class="methodname">get_text</tt>() does not return characters representing
embedded images, so byte and character indexes into the returned string do
<span class="emphasis"><em>not</em></span> correspond to byte and character indexes into the
buffer. Contrast this behavior with the <a href="class-gtktextbuffer.html#method-gtktextbuffer--get-slice" title="gtk.TextBuffer.get_slice"><tt class="methodname">get_slice</tt>()</a> 
method.</p></div><div class="refsect2" lang="en"><a name="method-gtktextbuffer--get-slice"></a><h3>gtk.TextBuffer.get_slice</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_slice</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>start</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>end</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>include_hidden_chars</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>start</tt></b>:</span></td><td>the start of a range</td></tr><tr><td><span class="term"><b class="parameter"><tt>end</tt></b>:</span></td><td>the end of a range</td></tr><tr><td><span class="term"><b class="parameter"><tt>include_hidden_chars</tt></b>:</span></td><td>if <tt class="literal">TRUE</tt> include invisible
text</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>the contents of the range including text and
indicators for pixbufs and child anchors</td></tr></tbody></table><p>The <tt class="methodname">get_slice</tt>() method returns the text
in the range [<i class="parameter"><tt>start</tt></i>,<i class="parameter"><tt>end</tt></i>).
Undisplayed text (text marked with tags that set the invisibility attribute)
is excluded if <i class="parameter"><tt>include_hidden_chars</tt></i> is
<tt class="literal">FALSE</tt>. The returned string includes a 0xFFFC character
whenever the textbuffer contains embedded images or child anchors, so byte
and character indexes into the returned string <span class="emphasis"><em>do</em></span>
correspond to byte and character indexes into the buffer. Contrast this
behavior with the <a href="class-gtktextbuffer.html#method-gtktextbuffer--get-text" title="gtk.TextBuffer.get_text"><tt class="methodname">get_text</tt>()</a> 
method. Note that 0xFFFC can occur in normal text as well, so it is not a
reliable indicator that a pixbuf or widget is in the buffer.</p></div><div class="refsect2" lang="en"><a name="method-gtktextbuffer--insert-pixbuf"></a><h3>gtk.TextBuffer.insert_pixbuf</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">insert_pixbuf</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>iter</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>pixbuf</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>iter</tt></b>:</span></td><td>the location to insert the
pixbuf</td></tr><tr><td><span class="term"><b class="parameter"><tt>pixbuf</tt></b>:</span></td><td>a <a href="class-gdkpixbuf.html" title="gtk.gdk.Pixbuf"><tt class="classname">gtk.gdk.Pixbuf</tt></a></td></tr></tbody></table><p>The <tt class="methodname">insert_pixbuf</tt>() method inserts an
image specified by <i class="parameter"><tt>pixbuf</tt></i> into the text buffer at the
location specified by <i class="parameter"><tt>iter</tt></i>. The image will be counted
as one character in character counts, and when obtaining the buffer contents
as a string, will be represented by the Unicode "object replacement
character" 0xFFFC. Note that the "slice" variants for obtaining portions of
the buffer as a string include this character for pixbufs, but the "text"
variants do not. e.g. see the <a href="class-gtktextbuffer.html#method-gtktextbuffer--get-slice" title="gtk.TextBuffer.get_slice"><tt class="methodname">get_slice</tt>()</a> 
and <a href="class-gtktextbuffer.html#method-gtktextbuffer--get-text" title="gtk.TextBuffer.get_text"><tt class="methodname">get_text</tt>()</a> 
methods.</p></div><div class="refsect2" lang="en"><a name="method-gtktextbuffer--insert-child-anchor"></a><h3>gtk.TextBuffer.insert_child_anchor</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">insert_child_anchor</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>iter</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>anchor</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>iter</tt></b>:</span></td><td>the location to insert the
anchor</td></tr><tr><td><span class="term"><b class="parameter"><tt>anchor</tt></b>:</span></td><td>a <a href="class-gtktextchildanchor.html" title="gtk.TextChildAnchor"><tt class="classname">gtk.TextChildAnchor</tt></a></td></tr></tbody></table><p>The <tt class="methodname">insert_child_anchor</tt>() method
inserts a child widget anchor specified by <i class="parameter"><tt>anchor</tt></i>
into the textbuffer at the location specified by
<i class="parameter"><tt>iter</tt></i>. The anchor will be counted as one character in
character counts, and when obtaining the buffer contents as a string, will
be represented by the Unicode "object replacement character" 0xFFFC. Note
that the "slice" variants for obtaining portions of the buffer as a string
include this character for child anchors, but the "text" variants do not.
e.g. see the <a href="class-gtktextbuffer.html#method-gtktextbuffer--get-slice" title="gtk.TextBuffer.get_slice"><tt class="methodname">get_slice</tt>()</a> 
and <a href="class-gtktextbuffer.html#method-gtktextbuffer--get-text" title="gtk.TextBuffer.get_text"><tt class="methodname">get_text</tt>()</a> 
methods. The <a href="class-gtktextbuffer.html#method-gtktextbuffer--create-child-anchor" title="gtk.TextBuffer.create_child_anchor"><tt class="methodname">create_child_anchor</tt>()</a> 
is a more convenient alternative to this function.</p></div><div class="refsect2" lang="en"><a name="method-gtktextbuffer--create-child-anchor"></a><h3>gtk.TextBuffer.create_child_anchor</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">create_child_anchor</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>iter</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>iter</tt></b>:</span></td><td>a location in the buffer</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>the new child anchor</td></tr></tbody></table><p>The <tt class="methodname">create_child_anchor</tt>() method is a
convenience function that creates a child anchor with the <a href="class-gtktextchildanchor.html#constructor-gtktextchildanchor" title="Constructor">gtk.TextChildAnchor</a>()
constructor and inserts it into the textbuffer at the location specified by
<i class="parameter"><tt>iter</tt></i> with the <a href="class-gtktextbuffer.html#method-gtktextbuffer--insert-child-anchor" title="gtk.TextBuffer.insert_child_anchor"><tt class="methodname">insert_child_anchor</tt>()</a> 
method.</p></div><div class="refsect2" lang="en"><a name="method-gtktextbuffer--create-mark"></a><h3>gtk.TextBuffer.create_mark</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">create_mark</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>mark_name</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>where</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>left_gravity</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>mark_name</tt></b>:</span></td><td>the name for the new mark, or
<tt class="literal">None</tt></td></tr><tr><td><span class="term"><b class="parameter"><tt>where</tt></b>:</span></td><td>the location to place the
mark</td></tr><tr><td><span class="term"><b class="parameter"><tt>left_gravity</tt></b>:</span></td><td>if <tt class="literal">TRUE</tt> the mark has left
gravity</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>the new <a href="class-gtktextmark.html" title="gtk.TextMark"><tt class="classname">gtk.TextMark</tt></a>
object</td></tr></tbody></table><p>The <tt class="methodname">create_mark</tt>() method creates a mark
with the name specified by <i class="parameter"><tt>mark_name</tt></i> at the position
specified by <i class="parameter"><tt>where</tt></i> and left gravity specified by
<i class="parameter"><tt>left_gravity</tt></i>. If <i class="parameter"><tt>mark_name</tt></i> is
<tt class="literal">None</tt>, the mark is anonymous; otherwise, the mark can be
retrieved by name using the <a href="class-gtktextbuffer.html#method-gtktextbuffer--get-mark" title="gtk.TextBuffer.get_mark"><tt class="methodname">get_mark</tt>()</a> 
method. If a mark has left gravity, and text is inserted at the mark's
current location, the mark will be moved to the left of the newly-inserted
text. If the mark has right gravity (<i class="parameter"><tt>left_gravity</tt></i> =
<tt class="literal">FALSE</tt>), the mark will end up on the right of
newly-inserted text. The standard left-to-right cursor is a mark with right
gravity (when you type, the cursor stays on the right side of the text
you're typing). Marks are owned by the buffer and go away when the buffer
does. This method emits the "mark_set" signal as notification of the mark's
initial placement.</p></div><div class="refsect2" lang="en"><a name="method-gtktextbuffer--move-mark"></a><h3>gtk.TextBuffer.move_mark</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">move_mark</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>mark</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>where</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>mark</tt></b>:</span></td><td>a <a href="class-gtktextmark.html" title="gtk.TextMark"><tt class="classname">gtk.TextMark</tt></a></td></tr><tr><td><span class="term"><b class="parameter"><tt>where</tt></b>:</span></td><td>a new location for
<i class="parameter"><tt>mark</tt></i></td></tr></tbody></table><p>The <tt class="methodname">move_mark</tt>() method moves the <a href="class-gtktextmark.html" title="gtk.TextMark"><tt class="classname">gtk.TextMark</tt></a>
specified by <i class="parameter"><tt>mark</tt></i> to the new location specified by
<i class="parameter"><tt>where</tt></i>.This method  emits the "mark_set" signal as
notification of the move.</p></div><div class="refsect2" lang="en"><a name="method-gtktextbuffer--delete-mark"></a><h3>gtk.TextBuffer.delete_mark</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">delete_mark</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>mark</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>mark</tt></b>:</span></td><td>a <a href="class-gtktextmark.html" title="gtk.TextMark"><tt class="classname">gtk.TextMark</tt></a> in
the textbuffer</td></tr></tbody></table><p>The <tt class="methodname">delete_mark</tt>() method deletes the
<a href="class-gtktextmark.html" title="gtk.TextMark"><tt class="classname">gtk.TextMark</tt></a>
specified by <i class="parameter"><tt>mark</tt></i>, so that it's no longer located
anywhere in the textbuffer. Most operations on <i class="parameter"><tt>mark</tt></i>
become invalid and there is no way to undelete a mark. The <a href="class-gtktextmark.html#method-gtktextmark--get-deleted" title="gtk.TextMark.get_deleted"><tt class="methodname">get_deleted</tt>()</a> 
method will return <tt class="literal">TRUE</tt> after this method has been called
on a mark to indicate that a mark no longer belongs to a textbuffer. The
"mark_deleted" signal will be emitted as notification after the mark is
deleted.</p></div><div class="refsect2" lang="en"><a name="method-gtktextbuffer--get-mark"></a><h3>gtk.TextBuffer.get_mark</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_mark</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>name</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>name</tt></b>:</span></td><td>a mark name</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>a <a href="class-gtktextmark.html" title="gtk.TextMark"><tt class="classname">gtk.TextMark</tt></a>, or
None</td></tr></tbody></table><p>The get_mark() method returns the mark named
<i class="parameter"><tt>name</tt></i> in the textbuffer, or <tt class="literal">None</tt> if
no such mark exists in the buffer.</p></div><div class="refsect2" lang="en"><a name="method-gtktextbuffer--move-mark-by-name"></a><h3>gtk.TextBuffer.move_mark_by_name</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">move_mark_by_name</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>name</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>where</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>name</tt></b>:</span></td><td>the name of a mark</td></tr><tr><td><span class="term"><b class="parameter"><tt>where</tt></b>:</span></td><td>the new location for mark</td></tr></tbody></table><p>The <tt class="methodname">move_mark_by_name</tt>() method moves
the mark named <i class="parameter"><tt>name</tt></i> (which must exist) to the
textbuffer location specified by <i class="parameter"><tt>where</tt></i>. See the <a href="class-gtktextbuffer.html#method-gtktextbuffer--move-mark" title="gtk.TextBuffer.move_mark"><tt class="methodname">move_mark</tt>()</a> 
method for details.</p></div><div class="refsect2" lang="en"><a name="method-gtktextbuffer--delete-mark-by-name"></a><h3>gtk.TextBuffer.delete_mark_by_name</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">delete_mark_by_name</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>name</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>name</tt></b>:</span></td><td>the name of a mark in
<i class="parameter"><tt>buffer</tt></i></td></tr></tbody></table><p>The <tt class="methodname">delete_mark_by_name</tt>() method
deletes the mark (which must exist) named <i class="parameter"><tt>name</tt></i>. See
the <a href="class-gtktextbuffer.html#method-gtktextbuffer--delete-mark" title="gtk.TextBuffer.delete_mark"><tt class="methodname">delete_mark</tt>()</a> 
for details.</p></div><div class="refsect2" lang="en"><a name="method-gtktextbuffer--get-insert"></a><h3>gtk.TextBuffer.get_insert</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_insert</span>(<span class="methodparam"></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>the insertion point mark</td></tr></tbody></table><p>The <tt class="methodname">get_insert</tt>() method returns the
mark that represents the cursor (insertion point). Equivalent to calling the
<a href="class-gtktextbuffer.html#method-gtktextbuffer--get-mark" title="gtk.TextBuffer.get_mark"><tt class="methodname">get_mark</tt>()</a> 
method to get the mark named "insert", but very slightly more efficient, and
involving less typing.</p></div><div class="refsect2" lang="en"><a name="method-gtktextbuffer--get-selection-bound"></a><h3>gtk.TextBuffer.get_selection_bound</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_selection_bound</span>(<span class="methodparam"></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>the selection bound mark</td></tr></tbody></table><p>The <tt class="methodname">get_selection_bound</tt>() method
returns the mark that represents the selection bound.  Equivalent to calling
the <a href="class-gtktextbuffer.html#method-gtktextbuffer--get-mark" title="gtk.TextBuffer.get_mark"><tt class="methodname">get_mark</tt>()</a> 
method to get the mark named "selection_bound", but very slightly more
efficient, and involving less typing. The currently-selected text in a
textbuffer is the region between the "selection_bound" and "insert" marks.
If "selection_bound" and "insert" are in the same place, then there is no
current selection. The <a href="class-gtktextbuffer.html#method-gtktextbuffer--get-selection-bounds" title="gtk.TextBuffer.get_selection_bounds"><tt class="methodname">get_selection_bounds</tt>()</a> 
method is a convenience method for handling the selection, if you just
want to know whether there's a selection and what its bounds are.</p></div><div class="refsect2" lang="en"><a name="method-gtktextbuffer--place-cursor"></a><h3>gtk.TextBuffer.place_cursor</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">place_cursor</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>where</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>where</tt></b>:</span></td><td>where to put the cursor</td></tr></tbody></table><p>The <tt class="methodname">place_cursor</tt>() method moves the
"insert" and "selection_bound" marks simultaneously to the location
specified by <i class="parameter"><tt>where</tt></i>.  If you move them to the same
place in two steps with the <a href="class-gtktextbuffer.html#method-gtktextbuffer--move-mark" title="gtk.TextBuffer.move_mark"><tt class="methodname">move_mark</tt>()</a> 
method, you will temporarily select a region in between their old and new
locations, which is inefficient. This method moves them as a unit, which can
be optimized.</p></div><div class="refsect2" lang="en"><a name="method-gtktextbuffer--select-range"></a><h3>gtk.TextBuffer.select_range</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">select_range</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>ins</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>bound</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>ins</tt></b>:</span></td><td>where to put the "insert" mark</td></tr><tr><td><span class="term"><b class="parameter"><tt>bound</tt></b>:</span></td><td>where to put the "selection_bound" mark</td></tr></tbody></table><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.4 and above.</p></div><p>The <tt class="methodname">select_range</tt>() method moves the
"insert" and "selection_bound" marks simultaneously to the locations
specified by <i class="parameter"><tt>ins</tt></i> and <i class="parameter"><tt>bound</tt></i>
respectively.  If you move them to the same place in two steps with the
<a href="class-gtktextbuffer.html#method-gtktextbuffer--move-mark" title="gtk.TextBuffer.move_mark"><tt class="methodname">move_mark</tt>()</a>
method, you will temporarily select a region in between their old and new
locations, which is inefficient. This method moves them as a unit, which can
be optimized.</p></div><div class="refsect2" lang="en"><a name="method-gtktextbuffer--apply-tag"></a><h3>gtk.TextBuffer.apply_tag</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">apply_tag</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>tag</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>start</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>end</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>tag</tt></b>:</span></td><td>a <a href="class-gtktexttag.html" title="gtk.TextTag"><tt class="classname">gtk.TextTag</tt></a></td></tr><tr><td><span class="term"><b class="parameter"><tt>start</tt></b>:</span></td><td>the start of the range</td></tr><tr><td><span class="term"><b class="parameter"><tt>end</tt></b>:</span></td><td>the end of the range</td></tr></tbody></table><p>The <tt class="methodname">apply_tag</tt>() method emits the
"apply-tag" signal that causes the <a href="class-gtktexttag.html" title="gtk.TextTag"><tt class="classname">gtk.TextTag</tt></a>
specified by <i class="parameter"><tt>tag</tt></i> to be applied to the range of text
between <i class="parameter"><tt>start</tt></i> and <i class="parameter"><tt>end</tt></i> by the
default signal handler. <i class="parameter"><tt>start</tt></i> and
<i class="parameter"><tt>end</tt></i> do not have to be in order.</p></div><div class="refsect2" lang="en"><a name="method-gtktextbuffer--remove-tag"></a><h3>gtk.TextBuffer.remove_tag</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">remove_tag</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>tag</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>start</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>end</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>tag</tt></b>:</span></td><td>a <a href="class-gtktexttag.html" title="gtk.TextTag"><tt class="classname">gtk.TextTag</tt></a></td></tr><tr><td><span class="term"><b class="parameter"><tt>start</tt></b>:</span></td><td>the start of the range</td></tr><tr><td><span class="term"><b class="parameter"><tt>end</tt></b>:</span></td><td>the end of the range</td></tr></tbody></table><p>The <tt class="methodname">delete_tag</tt>() method emits the
"remove_tag" signal that causes the default handler for the signal to remove
all occurrences of the <a href="class-gtktexttag.html" title="gtk.TextTag"><tt class="classname">gtk.TextTag</tt></a>
specified by <i class="parameter"><tt>tag</tt></i> from the text in the range between
<i class="parameter"><tt>start</tt></i> and <i class="parameter"><tt>end</tt></i>.
<i class="parameter"><tt>start</tt></i> and <i class="parameter"><tt>end</tt></i> don't have to be
in order.</p></div><div class="refsect2" lang="en"><a name="method-gtktextbuffer--apply-tag-by-name"></a><h3>gtk.TextBuffer.apply_tag_by_name</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">apply_tag_by_name</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>name</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>start</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>end</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>name</tt></b>:</span></td><td>the name of a <a href="class-gtktexttag.html" title="gtk.TextTag"><tt class="classname">gtk.TextTag</tt></a></td></tr><tr><td><span class="term"><b class="parameter"><tt>start</tt></b>:</span></td><td>the start of the range</td></tr><tr><td><span class="term"><b class="parameter"><tt>end</tt></b>:</span></td><td>the end of the range</td></tr></tbody></table><p>The <tt class="methodname">apply_tag_by_name</tt>() method calls
the <a href="class-gtktexttagtable.html#method-gtktexttagtable--lookup" title="gtk.TextTagTable.lookup"><tt class="methodname">gtk.TextTagTable.lookup</tt>()</a> 
method on the textbuffer's tag table to find the <a href="class-gtktexttag.html" title="gtk.TextTag"><tt class="classname">gtk.TextTag</tt></a> with
the specified <i class="parameter"><tt>name</tt></i>, then calls the <a href="class-gtktextbuffer.html#method-gtktextbuffer--apply-tag" title="gtk.TextBuffer.apply_tag"><tt class="methodname">apply_tag</tt>()</a> 
method to apply that tag to the text in the range between
<i class="parameter"><tt>start</tt></i> and <i class="parameter"><tt>end</tt></i>.
<i class="parameter"><tt>start</tt></i> and <i class="parameter"><tt>end</tt></i> don't have to be
in order.</p></div><div class="refsect2" lang="en"><a name="method-gtktextbuffer--remove-tag-by-name"></a><h3>gtk.TextBuffer.remove_tag_by_name</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">remove_tag_by_name</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>name</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>start</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>end</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>name</tt></b>:</span></td><td>the name of a <a href="class-gtktexttag.html" title="gtk.TextTag"><tt class="classname">gtk.TextTag</tt></a></td></tr><tr><td><span class="term"><b class="parameter"><tt>start</tt></b>:</span></td><td>the start of the range</td></tr><tr><td><span class="term"><b class="parameter"><tt>end</tt></b>:</span></td><td>the end of the range</td></tr></tbody></table><p>The <tt class="methodname">delete_tag_by_name</tt>() method calls
the <a href="class-gtktexttagtable.html#method-gtktexttagtable--lookup" title="gtk.TextTagTable.lookup"><tt class="methodname">gtk.TextTagTable.lookup</tt>()</a> 
method on the textbuffer's tag table to find the <a href="class-gtktexttag.html" title="gtk.TextTag"><tt class="classname">gtk.TextTag</tt></a>, then
calls the <a href="class-gtktextbuffer.html#method-gtktextbuffer--remove-tag" title="gtk.TextBuffer.remove_tag"><tt class="methodname">remove_tag</tt>()</a> 
method to remove that that tag from the text in the range between
<i class="parameter"><tt>start</tt></i> and <i class="parameter"><tt>end</tt></i>.
<i class="parameter"><tt>start</tt></i> and <i class="parameter"><tt>end</tt></i> don't have to be
in order.</p></div><div class="refsect2" lang="en"><a name="method-gtktextbuffer--remove-all-tags"></a><h3>gtk.TextBuffer.remove_all_tags</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">remove_all_tags</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>start</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>end</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>start</tt></b>:</span></td><td>the start of the range</td></tr><tr><td><span class="term"><b class="parameter"><tt>end</tt></b>:</span></td><td>the end of the range</td></tr></tbody></table><p>The <tt class="methodname">remove_all_tags</tt>() method removes
all tags in the text in the range between <i class="parameter"><tt>start</tt></i> and
<i class="parameter"><tt>end</tt></i>.  Be careful with this function; it could remove
tags added in code unrelated to the code you're currently writing. That is,
using this function is probably a bad idea if you have two or more unrelated
code sections that add tags. <i class="parameter"><tt>start</tt></i> and
<i class="parameter"><tt>end</tt></i> don't have to be in order.</p></div><div class="refsect2" lang="en"><a name="method-gtktextbuffer--create-tag"></a><h3>gtk.TextBuffer.create_tag</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">create_tag</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>tag_name</tt></i></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>...</tt></i></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><i class="parameter"><tt>tag_name</tt></i>:</span></td><td>the name of the new tag, or
<tt class="literal">None</tt> if the tag is anonymous</td></tr><tr><td><span class="term"><i class="parameter"><tt>...</tt></i>:</span></td><td>one or more property_name= value pairs
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>a new tag</td></tr></tbody></table><p>The <tt class="methodname">create_tag</tt>() method creates a tag
with the name specified by <i class="parameter"><tt>tag_name</tt></i> and adds it to
the tag table for the textbuffer. If one or more
<tt class="literal">property_name=value</tt> pairs are available they are used to
set the properties of the tag. Note the <tt class="literal">property_name</tt>
must be specified using underscores instead of dashes e.g. use
pixels_above_lines=10 instead of pixels-above-lines=10. This method is
equivalent to calling the <a href="class-gtktexttag.html#constructor-gtktexttag" title="Constructor">gtk.TextTag</a>() constructor and then
adding the tag to the buffer's tag table with the <a href="class-gtktexttagtable.html#method-gtktexttagtable--add" title="gtk.TextTagTable.add"><tt class="methodname">gtk.TextTagTable.add</tt>()</a> 
method. If <i class="parameter"><tt>tag_name</tt></i> is <tt class="literal">None</tt>, the
tag is anonymous. If <i class="parameter"><tt>tag_name</tt></i> is
non-<tt class="literal">None</tt>, a tag called <i class="parameter"><tt>tag_name</tt></i>
must not already exist in the tag table for this buffer.</p></div><div class="refsect2" lang="en"><a name="method-gtktextbuffer--get-iter-at-line-offset"></a><h3>gtk.TextBuffer.get_iter_at_line_offset</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_iter_at_line_offset</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>line_number</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>char_offset</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>line_number</tt></b>:</span></td><td>the line number counting from
0</td></tr><tr><td><span class="term"><b class="parameter"><tt>char_offset</tt></b>:</span></td><td>the char offset from start of
line</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>an iterator</td></tr></tbody></table><p>The<tt class="methodname"> get_iter_at_line_offset</tt>() returns
an iterator pointing to the position specified by
<i class="parameter"><tt>char_offset</tt></i> within the line specified by
<i class="parameter"><tt>line_number</tt></i>. The <i class="parameter"><tt>char_offset</tt></i>
must exist, offsets off the end of the line are not allowed. Note specify
<span class="emphasis"><em>characters</em></span>, not bytes; UTF-8 may encode one character
as multiple bytes.</p></div><div class="refsect2" lang="en"><a name="method-gtktextbuffer--get-iter-at-line-index"></a><h3>gtk.TextBuffer.get_iter_at_line_index</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_iter_at_line_index</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>line_number</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>byte_index</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>line_number</tt></b>:</span></td><td>the line number counting from
0</td></tr><tr><td><span class="term"><b class="parameter"><tt>byte_index</tt></b>:</span></td><td>the byte index from start of
line</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>an iterator</td></tr></tbody></table><p>The <tt class="methodname">get_iter_at_line_index</tt>() method
returns an iterator pointing to the position specified by
<i class="parameter"><tt>byte_index</tt></i> within the line specified by
<i class="parameter"><tt>line_number</tt></i>. <i class="parameter"><tt>byte_index</tt></i> must
be the start of a UTF-8 character, and must not be beyond the end of the
line.  Note specify <span class="emphasis"><em>bytes</em></span>, not characters; UTF-8 may
encode one character as multiple bytes.</p></div><div class="refsect2" lang="en"><a name="method-gtktextbuffer--get-iter-at-offset"></a><h3>gtk.TextBuffer.get_iter_at_offset</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_iter_at_offset</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>char_offset</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>char_offset</tt></b>:</span></td><td>the char offset from start of buffer, counting
from 0</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>an iterator</td></tr></tbody></table><p>The <tt class="methodname">get_iter_at_offset</tt>() method returns
an iterator pointing to the location specified by
<i class="parameter"><tt>char_offset</tt></i> characters from the start of the entire
buffer.</p></div><div class="refsect2" lang="en"><a name="method-gtktextbuffer--get-iter-at-line"></a><h3>gtk.TextBuffer.get_iter_at_line</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_iter_at_line</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>line_number</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>line_number</tt></b>:</span></td><td>line number counting from
0</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>an iterator</td></tr></tbody></table><p>The <tt class="methodname">get_iter_at_line</tt>() method returns
an iterator pointing to the start of the line specified by
<i class="parameter"><tt>line_number</tt></i>.</p></div><div class="refsect2" lang="en"><a name="method-gtktextbuffer--get-start-iter"></a><h3>gtk.TextBuffer.get_start_iter</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_start_iter</span>(<span class="methodparam"></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>an iterator</td></tr></tbody></table><p>The <tt class="methodname">get_start_iter</tt>() method returns an
iterator pointing at the location of the first position in the text buffer.
This is the same as using the <a href="class-gtktextbuffer.html#method-gtktextbuffer--get-iter-at-offset" title="gtk.TextBuffer.get_iter_at_offset"><tt class="methodname">get_iter_at_offset</tt>()</a> 
with an argument of 0.
</p></div><div class="refsect2" lang="en"><a name="method-gtktextbuffer--get-end-iter"></a><h3>gtk.TextBuffer.get_end_iter</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_end_iter</span>(<span class="methodparam"></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>an iterator</td></tr></tbody></table><p>The <tt class="methodname">get_end_iter</tt>() method returns an
iterator pointing at the "end iterator," one past the last valid character
in the text buffer. If passed to the <a href="class-gtktextiter.html#method-gtktextiter--get-char" title="gtk.TextIter.get_char"><tt class="methodname">gtk.TextIter.get_char</tt>()</a> 
method, the end iterator has a character value of 0. The entire buffer lies
in the range from the first position in the buffer (call the <a href="class-gtktextbuffer.html#method-gtktextbuffer--get-start-iter" title="gtk.TextBuffer.get_start_iter"><tt class="methodname">get_start_iter</tt>()</a> 
method to get character position 0) to the end iterator.</p></div><div class="refsect2" lang="en"><a name="method-gtktextbuffer--get-bounds"></a><h3>gtk.TextBuffer.get_bounds</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_bounds</span>(<span class="methodparam"></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>a tuple containing iterators that point at the
first and last positions in the buffer</td></tr></tbody></table><p>The <tt class="methodname">get_bounds</tt>() method returns a tuple
containing the first and last iterators in the buffer, i.e. the entire
buffer lies within the range.</p></div><div class="refsect2" lang="en"><a name="method-gtktextbuffer--get-iter-at-mark"></a><h3>gtk.TextBuffer.get_iter_at_mark</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_iter_at_mark</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>mark</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>mark</tt></b>:</span></td><td>a <a href="class-gtktextmark.html" title="gtk.TextMark"><tt class="classname">gtk.TextMark</tt></a> in
the textbuffer</td></tr></tbody></table><p>The <tt class="methodname">get_iter_at_mark</tt>() method returns
an iterator that points at the current position of
<i class="parameter"><tt>mark</tt></i>.</p></div><div class="refsect2" lang="en"><a name="method-gtktextbuffer--get-iter-at-child-anchor"></a><h3>gtk.TextBuffer.get_iter_at_child_anchor</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_iter_at_child_anchor</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>iter</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>anchor</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>anchor</tt></b>:</span></td><td>a child anchor that appears in the
textbuffer</td></tr></tbody></table><p>The get_iter_at_child_anchor() method returns an iterator that
points at the location of <i class="parameter"><tt>anchor</tt></i> within the
textbuffer.</p></div><div class="refsect2" lang="en"><a name="method-gtktextbuffer--get-modified"></a><h3>gtk.TextBuffer.get_modified</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_modified</span>(<span class="methodparam"></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td><tt class="literal">TRUE</tt> if the buffer has been
modified</td></tr></tbody></table><p>The <tt class="methodname">get_modified</tt>() method returns
<tt class="literal">TRUE</tt> if the buffer has been modified since the last call
to the <a href="class-gtktextbuffer.html#method-gtktextbuffer--set-modified" title="gtk.TextBuffer.set_modified"><tt class="methodname">set_modified</tt>()</a> 
method set the modification flag to <tt class="literal">FALSE</tt>. Used for
example to enable a "save" function in a text editor.</p></div><div class="refsect2" lang="en"><a name="method-gtktextbuffer--set-modified"></a><h3>gtk.TextBuffer.set_modified</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_modified</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>setting</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>setting</tt></b>:</span></td><td>the modification flag
setting</td></tr></tbody></table><p>The <tt class="methodname">set_modified</tt>() method sets the
modification flag of the textbuffer to the value specified by
<i class="parameter"><tt>setting</tt></i>. The modification flag is used to keep track
of whether the buffer has been modified since the last time it was saved.
Whenever the buffer is saved to disk, call this method with a
<i class="parameter"><tt>setting</tt></i> of <tt class="literal">FALSE</tt>. When the buffer
is modified, it will automatically set the modification flag to
<i class="parameter"><tt>TRUE</tt></i> and emit a "modified_changed" signal.</p></div><div class="refsect2" lang="en"><a name="method-gtktextbuffer--add-selection-clipboard"></a><h3>gtk.TextBuffer.add_selection_clipboard</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">add_selection_clipboard</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>clipboard</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>clipboard</tt></b>:</span></td><td>a <a href="class-gtkclipboard.html" title="gtk.Clipboard"><tt class="classname">gtk.Clipboard</tt></a></td></tr></tbody></table><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.2 and above.</p></div><p>The <tt class="methodname">add_selection_clipboard</tt>() method
adds the <a href="class-gtkclipboard.html" title="gtk.Clipboard"><tt class="classname">gtk.Clipboard</tt></a>
specified by <i class="parameter"><tt>clipboard</tt></i> to the list of clipboards in
which the selection contents of the buffer are available. In most cases,
<i class="parameter"><tt>clipboard</tt></i> will be the
<tt class="literal">gtk.gdk.SELECTION_PRIMARY</tt> clipboard</p></div><div class="refsect2" lang="en"><a name="method-gtktextbuffer--remove-selection-clipboard"></a><h3>gtk.TextBuffer.remove_selection_clipboard</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">remove_selection_clipboard</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>clipboard</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>clipboard</tt></b>:</span></td><td>a <a href="class-gtkclipboard.html" title="gtk.Clipboard"><tt class="classname">gtk.Clipboard</tt></a>
	  added to the buffer by the <a href="class-gtktextbuffer.html#method-gtktextbuffer--add-selection-clipboard" title="gtk.TextBuffer.add_selection_clipboard"><tt class="methodname">add_selection_clipboard()</tt></a>
	  method.</td></tr></tbody></table><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.2 and above.</p></div><p>The <tt class="methodname">remove_selection_clipboard</tt>() method
removes the <a href="class-gtkclipboard.html" title="gtk.Clipboard"><tt class="classname">gtk.Clipboard</tt></a>
added with the <a href="class-gtktextbuffer.html#method-gtktextbuffer--add-selection-clipboard" title="gtk.TextBuffer.add_selection_clipboard"><tt class="methodname">add_selection_clipboard</tt>()</a>
method.</p></div><div class="refsect2" lang="en"><a name="method-gtktextbuffer--cut-clipboard"></a><h3>gtk.TextBuffer.cut_clipboard</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">cut_clipboard</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>clipboard</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>default_editable</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>clipboard</tt></b>:</span></td><td>the <a href="class-gtkclipboard.html" title="gtk.Clipboard"><tt class="classname">gtk.Clipboard</tt></a>
	  object to cut to.</td></tr><tr><td><span class="term"><b class="parameter"><tt>default_editable</tt></b>:</span></td><td>the default editability of the
	  buffer</td></tr></tbody></table><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.2 and above.</p></div><p>The <tt class="methodname">cut_clipboard</tt>() method copies the
currently-selected text to the <a href="class-gtkclipboard.html" title="gtk.Clipboard"><tt class="classname">gtk.Clipboard</tt></a>
specified by <i class="parameter"><tt>clipboard</tt></i>, then deletes said text if
it's editable as specified by
<i class="parameter"><tt>default_editable</tt></i>. Typically the result of the <a href="class-gtktextview.html#method-gtktextview--get-editable" title="gtk.TextView.get_editable"><tt class="methodname">gtk.TextView.get_editable</tt>()</a>
method is appropriate here.</p></div><div class="refsect2" lang="en"><a name="method-gtktextbuffer--copy-clipboard"></a><h3>gtk.TextBuffer.copy_clipboard</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">copy_clipboard</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>clipboard</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>clipboard</tt></b>:</span></td><td>the <a href="class-gtkclipboard.html" title="gtk.Clipboard"><tt class="classname">gtk.Clipboard</tt></a>
	  object to copy to.</td></tr></tbody></table><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.2 and above.</p></div><p>The <tt class="methodname">copy_clipboard</tt>() method copies the
currently-selected text to the <a href="class-gtkclipboard.html" title="gtk.Clipboard"><tt class="classname">gtk.ClipBoard</tt></a>
specified by <i class="parameter"><tt>clipboard</tt></i>.</p></div><div class="refsect2" lang="en"><a name="method-gtktextbuffer--paste-clipboard"></a><h3>gtk.TextBuffer.paste_clipboard</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">paste_clipboard</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>clipboard</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>override_location</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>default_editable</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>clipboard</tt></b>:</span></td><td>the <a href="class-gtkclipboard.html" title="gtk.Clipboard"><tt class="classname">gtk.Clipboard</tt></a>
	  to paste from</td></tr><tr><td><span class="term"><b class="parameter"><tt>override_location</tt></b>:</span></td><td>the <a href="class-gtktextiter.html" title="gtk.TextIter"><tt class="classname">gtk.TextIter</tt></a>
	  specifying the location to insert pasted text, or
	  <tt class="literal">None</tt> for at the cursor</td></tr><tr><td><span class="term"><b class="parameter"><tt>default_editable</tt></b>:</span></td><td>the default editability of the
	  buffer</td></tr></tbody></table><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.2 and above.</p></div><p>The <tt class="methodname">paste_clipboard</tt>() method pastes the
contents of the <a href="class-gtkclipboard.html" title="gtk.Clipboard"><tt class="classname">gtk.ClipBoard</tt></a>
specified by <i class="parameter"><tt>clipboard</tt></i> at the insertion point, or at
the location specified by <i class="parameter"><tt>override_location</tt></i> (if not
<tt class="literal">None</tt>).  (Note: pasting is asynchronous, that is, we'll
ask for the paste data and return, and at some point later after the main
loop runs, the paste data will be inserted.)</p></div><div class="refsect2" lang="en"><a name="method-gtktextbuffer--get-selection-bounds"></a><h3>gtk.TextBuffer.get_selection_bounds</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_selection_bounds</span>(<span class="methodparam"></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>a tuple containing iterators pointing to the
selection start and end or an empty tuple if there is no
selection</td></tr></tbody></table><p>The <tt class="methodname">get_selection_bounds</tt>() method
returns a tuple containing iterators that point at the start and end of the
selection, if any. If there is no selection an empty tuple is
returned.</p></div><div class="refsect2" lang="en"><a name="method-gtktextbuffer--delete-selection"></a><h3>gtk.TextBuffer.delete_selection</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">delete_selection</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>interactive</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>default_editable</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>interactive</tt></b>:</span></td><td>if <tt class="literal">TRUE</tt> the deletion is
caused by user interaction</td></tr><tr><td><span class="term"><b class="parameter"><tt>default_editable</tt></b>:</span></td><td>if <i class="parameter"><tt>TRUE</tt></i> the buffer is
editable by default</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td><tt class="literal">TRUE</tt> if there was a
non-empty selection to delete</td></tr></tbody></table><p>The <tt class="methodname">delete_selection</tt>() method deletes
the text in the range between the "insert" and "selection_bound" marks, i.e.
the currently-selected text. If <i class="parameter"><tt>interactive</tt></i> is
<tt class="literal">TRUE</tt>, the editability of the selection will be considered
(users can't delete uneditable text) and default_editable is used to
determine the default editability of the textbuffer usually as a result of a
call to the <a href="class-gtktextview.html#method-gtktextview--get-editable" title="gtk.TextView.get_editable"><tt class="methodname">gtk.TextView.get_editable</tt>()</a> 
method.</p></div><div class="refsect2" lang="en"><a name="method-gtktextbuffer--begin-user-action"></a><h3>gtk.TextBuffer.begin_user_action</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">begin_user_action</span>(<span class="methodparam"></span>)</code></pre></td></tr></table><p>The <tt class="methodname">begin_user_action</tt>() method is
called to indicate that the textbuffer operations until a call to the <a href="class-gtktextbuffer.html#method-gtktextbuffer--end-user-action" title="gtk.TextBuffer.end_user_action"><tt class="methodname">end_user_action</tt>()</a> 
method are part of a single user-visible operation. The operations between
the <tt class="methodname">begin_user_action</tt>() and <a href="class-gtktextbuffer.html#method-gtktextbuffer--end-user-action" title="gtk.TextBuffer.end_user_action"><tt class="methodname">end_user_action</tt>()</a> 
methods can then be grouped when creating an undo stack. <a href="class-gtktextbuffer.html" title="gtk.TextBuffer"><tt class="classname">gtk.TextBuffer</tt></a>
maintains a count of calls to the
<tt class="methodname">begin_user_action</tt>() method that have not been
closed with a call to the <a href="class-gtktextbuffer.html#method-gtktextbuffer--end-user-action" title="gtk.TextBuffer.end_user_action"><tt class="methodname">end_user_action</tt>()</a> 
method, and emits the "begin_user_action" and "end_user_action" signals only
for the outermost pair of calls. This allows you to chain user
actions.</p><p>The "interactive" textbuffer mutation methods, such as the <a href="class-gtktextbuffer.html#method-gtktextbuffer--insert-interactive" title="gtk.TextBuffer.insert_interactive"><tt class="methodname">insert_interactive</tt>()</a> 
method, automatically call the begin and end user action methods around the
textbuffer operations they perform, so there's no need to add extra calls if
you user action consists solely of a single call to one of those
methods.</p></div><div class="refsect2" lang="en"><a name="method-gtktextbuffer--end-user-action"></a><h3>gtk.TextBuffer.end_user_action</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">end_user_action</span>(<span class="methodparam"></span>)</code></pre></td></tr></table><p>The <tt class="methodname">end_user_action</tt>() method should be
paired with a call to the <a href="class-gtktextbuffer.html#method-gtktextbuffer--begin-user-action" title="gtk.TextBuffer.begin_user_action"><tt class="methodname">begin_user_action</tt>()</a> 
method.</p></div><div class="refsect2" lang="en"><a name="method-gtktextbuffer--backspace"></a><h3>gtk.TextBuffer.backspace</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">backspace</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>iter</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>interactive</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>default_editable</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>iter</tt></b>:</span></td><td>a <a href="class-gtktextiter.html" title="gtk.TextIter"><tt class="classname">gtk.TextIter</tt></a></td></tr><tr><td><span class="term"><b class="parameter"><tt>interactive</tt></b>:</span></td><td>if <tt class="literal">TRUE</tt> the deletion is
caused by user interaction</td></tr><tr><td><span class="term"><b class="parameter"><tt>default_editable</tt></b>:</span></td><td>if <i class="parameter"><tt>TRUE</tt></i> the buffer is
editable by default</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td><tt class="literal">TRUE</tt> if the buffer was
modified</td></tr></tbody></table><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.6 and above.</p></div><p>The <tt class="methodname">backspace</tt>() method performs the
appropriate action as if the user hit the delete key with the cursor at the
position specified by <i class="parameter"><tt>iter</tt></i>. In the normal case a
single character will be deleted, but when combining accents are involved,
more than one character can be deleted, and when precomposed character and
accent combinations are involved, less than one character will be
deleted.</p><p>Because the buffer is modified, all outstanding iterators become
invalid after calling this function; however, <i class="parameter"><tt>iter</tt></i>
will be re-initialized to point to the location where text was
deleted.</p></div></div><div class="refsect1" lang="en"><a name="id3534091"></a><h2>Signals</h2><div class="refsect2" lang="en"><a name="signal-gtktextbuffer--apply-tag"></a><h3>The "apply-tag" gtk.TextBuffer Signal</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>textbuffer</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>texttag</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>start</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>end</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>user_param1</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>...</tt></i></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><i class="parameter"><tt>textbuffer</tt></i>:</span></td><td>the textbuffer that received the
signal</td></tr><tr><td><span class="term"><i class="parameter"><tt>texttag</tt></i>:</span></td><td>the <a href="class-gtktexttag.html" title="gtk.TextTag"><tt class="classname">gtk.TextTag</tt></a> being
applied</td></tr><tr><td><span class="term"><i class="parameter"><tt>start</tt></i>:</span></td><td>an iterator pointing to the start of the range
of text</td></tr><tr><td><span class="term"><i class="parameter"><tt>end</tt></i>:</span></td><td>an iterator pointing to the end of the range of
text</td></tr><tr><td><span class="term"><i class="parameter"><tt>user_param1</tt></i>:</span></td><td>the first user parameter (if any) specified
with the <a href="class-gobject.html#method-gobject--connect" title="gobject.GObject.connect"><tt class="methodname">connect</tt>()</a>
method</td></tr><tr><td><span class="term"><i class="parameter"><tt>...</tt></i>:</span></td><td>additional user parameters (if
any)</td></tr></tbody></table><p>The "apply-tag" signal is emitted when
<i class="parameter"><tt>texttag</tt></i> is applied to the text in
<i class="parameter"><tt>textbuffer</tt></i> in the range specified by
<i class="parameter"><tt>start</tt></i> and <i class="parameter"><tt>end</tt></i>.</p></div><div class="refsect2" lang="en"><a name="signal-gtktextbuffer--begin-user-action"></a><h3>The "begin-user-action" gtk.TextBuffer Signal</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>textbuffer</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>user_param1</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>...</tt></i></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><i class="parameter"><tt>textbuffer</tt></i>:</span></td><td>the textbuffer that received the
signal</td></tr><tr><td><span class="term"><i class="parameter"><tt>user_param1</tt></i>:</span></td><td>the first user parameter (if any) specified
with the <a href="class-gobject.html#method-gobject--connect" title="gobject.GObject.connect"><tt class="methodname">connect</tt>()</a>
method</td></tr><tr><td><span class="term"><i class="parameter"><tt>...</tt></i>:</span></td><td>additional user parameters (if
any)</td></tr></tbody></table><p>The "begin-user-action" signal is emitted on the first call to
the <a href="class-gtktextbuffer.html#method-gtktextbuffer--begin-user-action" title="gtk.TextBuffer.begin_user_action"><tt class="methodname">begin_user_action</tt>()</a> 
method.</p></div><div class="refsect2" lang="en"><a name="signal-gtktextbuffer--changed"></a><h3>The "changed" gtk.TextBuffer Signal</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>textbuffer</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>user_param1</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>...</tt></i></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><i class="parameter"><tt>textbuffer</tt></i>:</span></td><td>the textbuffer that received the
signal</td></tr><tr><td><span class="term"><i class="parameter"><tt>user_param1</tt></i>:</span></td><td>the first user parameter (if any) specified
with the <a href="class-gobject.html#method-gobject--connect" title="gobject.GObject.connect"><tt class="methodname">connect</tt>()</a>
method</td></tr><tr><td><span class="term"><i class="parameter"><tt>...</tt></i>:</span></td><td>additional user parameters (if
any)</td></tr></tbody></table><p>The "changed" signal is emitted when text is inserted in
<i class="parameter"><tt>textbuffer</tt></i>.</p></div><div class="refsect2" lang="en"><a name="signal-gtktextbuffer--delete-range"></a><h3>The "delete-range" gtk.TextBuffer Signal</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>textbuffer</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>start</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>end</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>user_param1</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>...</tt></i></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><i class="parameter"><tt>textbuffer</tt></i>:</span></td><td>the textbuffer that received the
signal</td></tr><tr><td><span class="term"><i class="parameter"><tt>start</tt></i>:</span></td><td>an iterator pointing to the start of the range
of text</td></tr><tr><td><span class="term"><i class="parameter"><tt>end</tt></i>:</span></td><td>an iterator pointing to the end of the range of
text</td></tr><tr><td><span class="term"><i class="parameter"><tt>user_param1</tt></i>:</span></td><td>the first user parameter (if any) specified
with the <a href="class-gobject.html#method-gobject--connect" title="gobject.GObject.connect"><tt class="methodname">connect</tt>()</a>
method</td></tr><tr><td><span class="term"><i class="parameter"><tt>...</tt></i>:</span></td><td>additional user parameters (if
any)</td></tr></tbody></table><p>The "delete-range" signal is emitted when the text in the range
specified by <i class="parameter"><tt>start</tt></i> and <i class="parameter"><tt>end</tt></i> is
to be deleted.</p></div><div class="refsect2" lang="en"><a name="signal-gtktextbuffer--end-user-action"></a><h3>The "end-user-action" gtk.TextBuffer Signal</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>textbuffer</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>user_param1</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>...</tt></i></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><i class="parameter"><tt>textbuffer</tt></i>:</span></td><td>the textbuffer that received the
signal</td></tr><tr><td><span class="term"><i class="parameter"><tt>user_param1</tt></i>:</span></td><td>the first user parameter (if any) specified
with the <a href="class-gobject.html#method-gobject--connect" title="gobject.GObject.connect"><tt class="methodname">connect</tt>()</a>
method</td></tr><tr><td><span class="term"><i class="parameter"><tt>...</tt></i>:</span></td><td>additional user parameters (if
any)</td></tr></tbody></table><p>The "end-user-action" signal is emitted when the call to the
<a href="class-gtktextbuffer.html#method-gtktextbuffer--end-user-action" title="gtk.TextBuffer.end_user_action"><tt class="methodname">end_user_action</tt>()</a> 
method reduces the user action count to zero i.e. undoes the first call to
the <a href="class-gtktextbuffer.html#method-gtktextbuffer--begin-user-action" title="gtk.TextBuffer.begin_user_action"><tt class="methodname">begin_user_action</tt>()</a> 
method.</p></div><div class="refsect2" lang="en"><a name="signal-gtktextbuffer--insert-child-anchor"></a><h3>The "insert-child-anchor" gtk.TextBuffer Signal</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>textbuffer</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>iter</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>anchor</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>user_param1</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>...</tt></i></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><i class="parameter"><tt>textbuffer</tt></i>:</span></td><td>the textbuffer that received the
signal</td></tr><tr><td><span class="term"><i class="parameter"><tt>iter</tt></i>:</span></td><td>a <a href="class-gtktextiter.html" title="gtk.TextIter"><tt class="classname">gtk.TextIter</tt></a></td></tr><tr><td><span class="term"><i class="parameter"><tt>anchor</tt></i>:</span></td><td>a <a href="class-gtktextchildanchor.html" title="gtk.TextChildAnchor"><tt class="classname">gtk.TextChildAnchor</tt></a></td></tr><tr><td><span class="term"><i class="parameter"><tt>user_param1</tt></i>:</span></td><td>the first user parameter (if any) specified
with the <a href="class-gobject.html#method-gobject--connect" title="gobject.GObject.connect"><tt class="methodname">connect</tt>()</a>
method</td></tr><tr><td><span class="term"><i class="parameter"><tt>...</tt></i>:</span></td><td>additional user parameters (if
any)</td></tr></tbody></table><p>The "insert-child-anchor" signal is emitted when
<i class="parameter"><tt>anchor</tt></i> is inserted into
<i class="parameter"><tt>textbuffer</tt></i> at the location specified by
<i class="parameter"><tt>iter</tt></i>.</p></div><div class="refsect2" lang="en"><a name="signal-gtktextbuffer--insert-pixbuf"></a><h3>The "insert-pixbuf" gtk.TextBuffer Signal</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>textbuffer</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>iter</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>pixbuf</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>user_param1</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>...</tt></i></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><i class="parameter"><tt>textbuffer</tt></i>:</span></td><td>the textbuffer that received the
signal</td></tr><tr><td><span class="term"><i class="parameter"><tt>iter</tt></i>:</span></td><td>a <a href="class-gtktextiter.html" title="gtk.TextIter"><tt class="classname">gtk.TextIter</tt></a></td></tr><tr><td><span class="term"><i class="parameter"><tt>pixbuf</tt></i>:</span></td><td>a <a href="class-gdkpixbuf.html" title="gtk.gdk.Pixbuf"><tt class="classname">gtk.gdk.Pixbuf</tt></a></td></tr><tr><td><span class="term"><i class="parameter"><tt>user_param1</tt></i>:</span></td><td>the first user parameter (if any) specified
with the <a href="class-gobject.html#method-gobject--connect" title="gobject.GObject.connect"><tt class="methodname">connect</tt>()</a>
method</td></tr><tr><td><span class="term"><i class="parameter"><tt>...</tt></i>:</span></td><td>additional user parameters (if
any)</td></tr></tbody></table><p>The "insert-pixbuf" signal is emitted when
<i class="parameter"><tt>pixbuf</tt></i> is inserted into
<i class="parameter"><tt>textbuffer</tt></i> at the location specified by
<i class="parameter"><tt>iter</tt></i>.</p></div><div class="refsect2" lang="en"><a name="signal-gtktextbuffer--insert-text"></a><h3>The "insert-text" gtk.TextBuffer Signal</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>textbuffer</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>iter</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>text</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>length</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>user_param1</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>...</tt></i></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><i class="parameter"><tt>textbuffer</tt></i>:</span></td><td>the textbuffer that received the
signal</td></tr><tr><td><span class="term"><i class="parameter"><tt>iter</tt></i>:</span></td><td>a <a href="class-gtktextiter.html" title="gtk.TextIter"><tt class="classname">gtk.TextIter</tt></a></td></tr><tr><td><span class="term"><i class="parameter"><tt>text</tt></i>:</span></td><td>the text inserted in
<i class="parameter"><tt>textbuffer</tt></i></td></tr><tr><td><span class="term"><i class="parameter"><tt>length</tt></i>:</span></td><td>the length of the text inserted in
<i class="parameter"><tt>textbuffer</tt></i></td></tr><tr><td><span class="term"><i class="parameter"><tt>user_param1</tt></i>:</span></td><td>the first user parameter (if any) specified
with the <a href="class-gobject.html#method-gobject--connect" title="gobject.GObject.connect"><tt class="methodname">connect</tt>()</a>
method</td></tr><tr><td><span class="term"><i class="parameter"><tt>...</tt></i>:</span></td><td>additional user parameters (if
any)</td></tr></tbody></table><p>The "insert-text" signal is emitted when
<i class="parameter"><tt>text</tt></i> of the size specified by
<i class="parameter"><tt>length</tt></i> is inserted into
<i class="parameter"><tt>textbuffer</tt></i> at the location specified by
<i class="parameter"><tt>iter</tt></i>.</p></div><div class="refsect2" lang="en"><a name="signal-gtktextbuffer--mark-deleted"></a><h3>The "mark-deleted" gtk.TextBuffer Signal</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>textbuffer</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>textmark</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>user_param1</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>...</tt></i></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><i class="parameter"><tt>textbuffer</tt></i>:</span></td><td>the textbuffer that received the
signal</td></tr><tr><td><span class="term"><i class="parameter"><tt>textmark</tt></i>:</span></td><td>the <a href="class-gtktextmark.html" title="gtk.TextMark"><tt class="classname">gtk.TextMark</tt></a>
	  that is being deleted</td></tr><tr><td><span class="term"><i class="parameter"><tt>user_param1</tt></i>:</span></td><td>the first user parameter (if any) specified
with the <a href="class-gobject.html#method-gobject--connect" title="gobject.GObject.connect"><tt class="methodname">connect</tt>()</a>
method</td></tr><tr><td><span class="term"><i class="parameter"><tt>...</tt></i>:</span></td><td>additional user parameters (if
any)</td></tr></tbody></table><p>The "mark-deleted" signal is emitted when
<i class="parameter"><tt>textmark</tt></i> is being deleted from
<i class="parameter"><tt>textbuffer</tt></i>.</p></div><div class="refsect2" lang="en"><a name="signal-gtktextbuffer--mark-set"></a><h3>The "mark-set" gtk.TextBuffer Signal</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>textbuffer</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>user_param1</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>...</tt></i></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><i class="parameter"><tt>textbuffer</tt></i>:</span></td><td>the textbuffer that received the
signal</td></tr><tr><td><span class="term"><i class="parameter"><tt>iter</tt></i>:</span></td><td>an iterator pointing at the location where
<i class="parameter"><tt>textmark</tt></i> will be set.</td></tr><tr><td><span class="term"><i class="parameter"><tt>textmark</tt></i>:</span></td><td>the <a href="class-gtktextmark.html" title="gtk.TextMark"><tt class="classname">gtk.TextMark</tt></a>
	  that is being set</td></tr><tr><td><span class="term"><i class="parameter"><tt>user_param1</tt></i>:</span></td><td>the first user parameter (if any) specified
with the <a href="class-gobject.html#method-gobject--connect" title="gobject.GObject.connect"><tt class="methodname">connect</tt>()</a>
method</td></tr><tr><td><span class="term"><i class="parameter"><tt>...</tt></i>:</span></td><td>additional user parameters (if
any)</td></tr></tbody></table><p>The "mark-set" signal is emitted when
<i class="parameter"><tt>textmark</tt></i> is being set at the location specified by
<i class="parameter"><tt>iter</tt></i> in <i class="parameter"><tt>textbuffer</tt></i>.</p></div><div class="refsect2" lang="en"><a name="signal-gtktextbuffer--modified-changed"></a><h3>The "modified-changed" gtk.TextBuffer Signal</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>textbuffer</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>user_param1</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>...</tt></i></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><i class="parameter"><tt>textbuffer</tt></i>:</span></td><td>the textbuffer that received the
signal</td></tr><tr><td><span class="term"><i class="parameter"><tt>user_param1</tt></i>:</span></td><td>the first user parameter (if any) specified
with the <a href="class-gobject.html#method-gobject--connect" title="gobject.GObject.connect"><tt class="methodname">connect</tt>()</a>
method</td></tr><tr><td><span class="term"><i class="parameter"><tt>...</tt></i>:</span></td><td>additional user parameters (if
any)</td></tr></tbody></table><p>The "modified-changed" signal is emitted when the modification
flag is changed.</p></div><div class="refsect2" lang="en"><a name="signal-gtktextbuffer--remove-tag"></a><h3>The "remove-tag" gtk.TextBuffer Signal</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>textbuffer</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>texttag</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>start</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>end</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>user_param1</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>...</tt></i></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><i class="parameter"><tt>textbuffer</tt></i>:</span></td><td>the textbuffer that received the
signal</td></tr><tr><td><span class="term"><i class="parameter"><tt>texttag</tt></i>:</span></td><td>the <a href="class-gtktexttag.html" title="gtk.TextTag"><tt class="classname">gtk.TextTag</tt></a> being
removed</td></tr><tr><td><span class="term"><i class="parameter"><tt>start</tt></i>:</span></td><td>an iterator pointing to the start of the range
of text</td></tr><tr><td><span class="term"><i class="parameter"><tt>end</tt></i>:</span></td><td>an iterator pointing to the end of the range of
text</td></tr><tr><td><span class="term"><i class="parameter"><tt>user_param1</tt></i>:</span></td><td>the first user parameter (if any) specified
with the <a href="class-gobject.html#method-gobject--connect" title="gobject.GObject.connect"><tt class="methodname">connect</tt>()</a>
method</td></tr><tr><td><span class="term"><i class="parameter"><tt>...</tt></i>:</span></td><td>additional user parameters (if
any)</td></tr></tbody></table><p>The "remove-tag" signal is emitted when
<i class="parameter"><tt>texttag</tt></i> is being removed from the
<i class="parameter"><tt>textbuffer</tt></i> text in the range specified by
<i class="parameter"><tt>start</tt></i> and <i class="parameter"><tt>end</tt></i>.</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-gtktextattributes.html">Prev</a></td><td width="20%" align="center"><a accesskey="u" href="gtk-class-reference.html">Up</a></td><td width="40%" align="right"><a accesskey="n" href="class-gtktextchildanchor.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gtk.TextAttributes</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">gtk.TextChildAnchor</td></tr></table></div></body></html>