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 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537
|
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>gtk.TextIter</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-gtktextchildanchor.html" title="gtk.TextChildAnchor"><link rel="next" href="class-gtktextmark.html" title="gtk.TextMark"></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.TextIter</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gtktextchildanchor.html">Prev</a></td><th width="60%" align="center">The gtk Class Reference</th><td width="20%" align="right"><a accesskey="n" href="class-gtktextmark.html">Next</a></td></tr></table><hr></div><div class="refentry" lang="en"><a name="class-gtktextiter"></a><div class="titlepage"><div></div><div></div></div><div class="refnamediv"><h2>gtk.TextIter</h2><p>gtk.TextIter — an object pointing at a location in a <a href="class-gtktextbuffer.html" title="gtk.TextBuffer"><tt class="classname">gtk.TextBuffer</tt></a></p></div><div class="refsect1" lang="en"><a name="id3536274"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gtk.TextIter</span></span>(<span class="ooclass"><span class="classname">gobject.GBoxed</span></span>):
<code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktextiter.html#method-gtktextiter--get-buffer" title="gtk.TextIter.get_buffer">get_buffer</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktextiter.html#method-gtktextiter--copy" title="gtk.TextIter.copy">copy</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktextiter.html#method-gtktextiter--get-offset" title="gtk.TextIter.get_offset">get_offset</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktextiter.html#method-gtktextiter--get-line" title="gtk.TextIter.get_line">get_line</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktextiter.html#method-gtktextiter--get-line-offset" title="gtk.TextIter.get_line_offset">get_line_offset</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktextiter.html#method-gtktextiter--get-line-index" title="gtk.TextIter.get_line_index">get_line_index</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktextiter.html#method-gtktextiter--get-visible-line-offset" title="gtk.TextIter.get_visible_line_offset">get_visible_line_offset</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktextiter.html#method-gtktextiter--get-visible-line-index" title="gtk.TextIter.get_visible_line_index">get_visible_line_index</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktextiter.html#method-gtktextiter--get-char" title="gtk.TextIter.get_char">get_char</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktextiter.html#method-gtktextiter--get-slice" title="gtk.TextIter.get_slice">get_slice</a></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-gtktextiter.html#method-gtktextiter--get-text" title="gtk.TextIter.get_text">get_text</a></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-gtktextiter.html#method-gtktextiter--get-visible-slice" title="gtk.TextIter.get_visible_slice">get_visible_slice</a></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-gtktextiter.html#method-gtktextiter--get-visible-text" title="gtk.TextIter.get_visible_text">get_visible_text</a></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-gtktextiter.html#method-gtktextiter--get-pixbuf" title="gtk.TextIter.get_pixbuf">get_pixbuf</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktextiter.html#method-gtktextiter--get-marks" title="gtk.TextIter.get_marks">get_marks</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktextiter.html#method-gtktextiter--get-child-anchor" title="gtk.TextIter.get_child_anchor">get_child_anchor</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktextiter.html#method-gtktextiter--get-toggled-tags" title="gtk.TextIter.get_toggled_tags">get_toggled_tags</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>toggled_on</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktextiter.html#method-gtktextiter--begins-tag" title="gtk.TextIter.begins_tag">begins_tag</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>tag</tt></b></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktextiter.html#method-gtktextiter--ends-tag" title="gtk.TextIter.ends_tag">ends_tag</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>tag</tt></b></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktextiter.html#method-gtktextiter--toggles-tag" title="gtk.TextIter.toggles_tag">toggles_tag</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>tag</tt></b></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktextiter.html#method-gtktextiter--has-tag" title="gtk.TextIter.has_tag">has_tag</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>tag</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktextiter.html#method-gtktextiter--get-tags" title="gtk.TextIter.get_tags">get_tags</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktextiter.html#method-gtktextiter--editable" title="gtk.TextIter.editable">editable</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>default_setting</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktextiter.html#method-gtktextiter--can-insert" title="gtk.TextIter.can_insert">can_insert</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>default_editability</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktextiter.html#method-gtktextiter--starts-word" title="gtk.TextIter.starts_word">starts_word</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktextiter.html#method-gtktextiter--ends-word" title="gtk.TextIter.ends_word">ends_word</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktextiter.html#method-gtktextiter--inside-word" title="gtk.TextIter.inside_word">inside_word</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktextiter.html#method-gtktextiter--starts-sentence" title="gtk.TextIter.starts_sentence">starts_sentence</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktextiter.html#method-gtktextiter--ends-sentence" title="gtk.TextIter.ends_sentence">ends_sentence</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktextiter.html#method-gtktextiter--inside-sentence" title="gtk.TextIter.inside_sentence">inside_sentence</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktextiter.html#method-gtktextiter--starts-line" title="gtk.TextIter.starts_line">starts_line</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktextiter.html#method-gtktextiter--ends-line" title="gtk.TextIter.ends_line">ends_line</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktextiter.html#method-gtktextiter--is-cursor-position" title="gtk.TextIter.is_cursor_position">is_cursor_position</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktextiter.html#method-gtktextiter--get-chars-in-line" title="gtk.TextIter.get_chars_in_line">get_chars_in_line</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktextiter.html#method-gtktextiter--get-bytes-in-line" title="gtk.TextIter.get_bytes_in_line">get_bytes_in_line</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktextiter.html#method-gtktextiter--get-attributes" title="gtk.TextIter.get_attributes">get_attributes</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>values</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktextiter.html#method-gtktextiter--get-language" title="gtk.TextIter.get_language">get_language</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktextiter.html#method-gtktextiter--is-end" title="gtk.TextIter.is_end">is_end</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktextiter.html#method-gtktextiter--is-start" title="gtk.TextIter.is_start">is_start</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktextiter.html#method-gtktextiter--forward-char" title="gtk.TextIter.forward_char">forward_char</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktextiter.html#method-gtktextiter--backward-char" title="gtk.TextIter.backward_char">backward_char</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktextiter.html#method-gtktextiter--forward-chars" title="gtk.TextIter.forward_chars">forward_chars</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>count</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktextiter.html#method-gtktextiter--backward-chars" title="gtk.TextIter.backward_chars">backward_chars</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>count</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktextiter.html#method-gtktextiter--forward-line" title="gtk.TextIter.forward_line">forward_line</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktextiter.html#method-gtktextiter--backward-line" title="gtk.TextIter.backward_line">backward_line</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktextiter.html#method-gtktextiter--forward-lines" title="gtk.TextIter.forward_lines">forward_lines</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>count</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktextiter.html#method-gtktextiter--backward-lines" title="gtk.TextIter.backward_lines">backward_lines</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>count</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktextiter.html#method-gtktextiter--forward-word-end" title="gtk.TextIter.forward_word_end">forward_word_end</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktextiter.html#method-gtktextiter--backward-word-start" title="gtk.TextIter.backward_word_start">backward_word_start</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktextiter.html#method-gtktextiter--forward-word-ends" title="gtk.TextIter.forward_word_ends">forward_word_ends</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>count</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktextiter.html#method-gtktextiter--backward-word-starts" title="gtk.TextIter.backward_word_starts">backward_word_starts</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>count</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktextiter.html#method-gtktextiter--forward-visible-word-end" title="gtk.TextIter.forward_visible_word_end">forward_visible_word_end</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktextiter.html#method-gtktextiter--backward-visible-word-start" title="gtk.TextIter.backward_visible_word_start">backward_visible_word_start</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktextiter.html#method-gtktextiter--forward-visible-word-ends" title="gtk.TextIter.forward_visible_word_ends">forward_visible_word_ends</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>count</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktextiter.html#method-gtktextiter--backward-visible-word-starts" title="gtk.TextIter.backward_visible_word_starts">backward_visible_word_starts</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>count</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktextiter.html#method-gtktextiter--forward-sentence-end" title="gtk.TextIter.forward_sentence_end">forward_sentence_end</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktextiter.html#method-gtktextiter--backward-sentence-start" title="gtk.TextIter.backward_sentence_start">backward_sentence_start</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktextiter.html#method-gtktextiter--forward-sentence-ends" title="gtk.TextIter.forward_sentence_ends">forward_sentence_ends</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>count</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktextiter.html#method-gtktextiter--backward-sentence-starts" title="gtk.TextIter.backward_sentence_starts">backward_sentence_starts</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>count</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktextiter.html#method-gtktextiter--forward-cursor-position" title="gtk.TextIter.forward_cursor_position">forward_cursor_position</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktextiter.html#method-gtktextiter--backward-cursor-position" title="gtk.TextIter.backward_cursor_position">backward_cursor_position</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktextiter.html#method-gtktextiter--forward-cursor-positions" title="gtk.TextIter.forward_cursor_positions">forward_cursor_positions</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>count</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktextiter.html#method-gtktextiter--backward-cursor-positions" title="gtk.TextIter.backward_cursor_positions">backward_cursor_positions</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>count</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktextiter.html#method-gtktextiter--set-offset" title="gtk.TextIter.set_offset">set_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-gtktextiter.html#method-gtktextiter--set-line" title="gtk.TextIter.set_line">set_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-gtktextiter.html#method-gtktextiter--set-line-offset" title="gtk.TextIter.set_line_offset">set_line_offset</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>char_on_line</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktextiter.html#method-gtktextiter--set-line-index" title="gtk.TextIter.set_line_index">set_line_index</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>byte_on_line</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktextiter.html#method-gtktextiter--forward-to-end" title="gtk.TextIter.forward_to_end">forward_to_end</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktextiter.html#method-gtktextiter--forward-to-line-end" title="gtk.TextIter.forward_to_line_end">forward_to_line_end</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktextiter.html#method-gtktextiter--set-visible-line-offset" title="gtk.TextIter.set_visible_line_offset">set_visible_line_offset</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>char_on_line</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktextiter.html#method-gtktextiter--set-visible-line-index" title="gtk.TextIter.set_visible_line_index">set_visible_line_index</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>byte_on_line</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktextiter.html#method-gtktextiter--forward-to-tag-toggle" title="gtk.TextIter.forward_to_tag_toggle">forward_to_tag_toggle</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>tag</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktextiter.html#method-gtktextiter--backward-to-tag-toggle" title="gtk.TextIter.backward_to_tag_toggle">backward_to_tag_toggle</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>tag</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktextiter.html#method-gtktextiter--forward-find-char" title="gtk.TextIter.forward_find_char">forward_find_char</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>pred</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>user_data</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>limit</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktextiter.html#method-gtktextiter--backward-find-char" title="gtk.TextIter.backward_find_char">backward_find_char</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>pred</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>user_data</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>limit</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktextiter.html#method-gtktextiter--forward-search" title="gtk.TextIter.forward_search">forward_search</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>str</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>flags</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>limit</tt></b></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktextiter.html#method-gtktextiter--backward-search" title="gtk.TextIter.backward_search">backward_search</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>str</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>flags</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>limit</tt></b></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktextiter.html#method-gtktextiter--equal" title="gtk.TextIter.equal">equal</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>rhs</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktextiter.html#method-gtktextiter--compare" title="gtk.TextIter.compare">compare</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>rhs</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktextiter.html#method-gtktextiter--in-range" title="gtk.TextIter.in_range">in_range</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-gtktextiter.html#method-gtktextiter--order" title="gtk.TextIter.order">order</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>second</tt></b></span></span>)</code><br></pre></td></tr></table></div><div class="refsect1" lang="en"><a name="id3537867"></a><h2>Description</h2><p>A <a href="class-gtktextiter.html" title="gtk.TextIter"><tt class="classname">gtk.TextIter</tt></a>
points to a position between two characters in a <a href="class-gtktextbuffer.html" title="gtk.TextBuffer"><tt class="classname">gtk.TextBuffer</tt></a>.
A <a href="class-gtktextiter.html" title="gtk.TextIter"><tt class="classname">gtk.TextIter</tt></a> is
usually created using a <a href="class-gtktextbuffer.html" title="gtk.TextBuffer"><tt class="classname">gtk.TextBuffer</tt></a>
method and are invalidated when the number of characters in the <a href="class-gtktextbuffer.html" title="gtk.TextBuffer"><tt class="classname">gtk.TextBuffer</tt></a>
changes (with some exceptions when inserting or deleting) including
inserting or deleting pixbufs or child anchors. There are a huge number of
<a href="class-gtktextiter.html" title="gtk.TextIter"><tt class="classname">gtk.TextIter</tt></a>
methods mostly dealing with moving the textiter location in the textbuffer,
checking the location or retrieving text or objects at a location.</p></div><div class="refsect1" lang="en"><a name="id3537928"></a><h2>Methods</h2><div class="refsect2" lang="en"><a name="method-gtktextiter--get-buffer"></a><h3>gtk.TextIter.get_buffer</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_buffer</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 textbuffer</td></tr></tbody></table><p>The <tt class="methodname">get_buffer</tt>() method returns the
<a href="class-gtktextbuffer.html" title="gtk.TextBuffer"><tt class="classname">gtk.TextBuffer</tt></a>
object this iterator is associated with.</p></div><div class="refsect2" lang="en"><a name="method-gtktextiter--copy"></a><h3>gtk.TextIter.copy</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">copy</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 copy of the textiter</td></tr></tbody></table><p>The <tt class="methodname">copy</tt>() method creates a copy of the
textiter.</p></div><div class="refsect2" lang="en"><a name="method-gtktextiter--get-offset"></a><h3>gtk.TextIter.get_offset</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_offset</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 character offset</td></tr></tbody></table><p>The <tt class="methodname">get_offset</tt>() method returns the
character offset of the textiter. Each character in a <a href="class-gtktextbuffer.html" title="gtk.TextBuffer"><tt class="classname">gtk.TextBuffer</tt></a>
has an offset, starting with 0 for the first character in the textbuffer.
Use <a href="class-gtktextbuffer.html#method-gtktextbuffer--get-iter-at-offset" title="gtk.TextBuffer.get_iter_at_offset"><tt class="methodname">gtk.TextBuffer.get_iter_at_offset</tt>()</a>
to convert an offset back into a textiter.</p></div><div class="refsect2" lang="en"><a name="method-gtktextiter--get-line"></a><h3>gtk.TextIter.get_line</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_line</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 line number</td></tr></tbody></table><p>The <tt class="methodname">get_line</tt>() method returns the line
number containing the textiter. Lines in a <a href="class-gtktextbuffer.html" title="gtk.TextBuffer"><tt class="classname">gtk.TextBuffer</tt></a>
are numbered beginning with 0 for the first line.</p></div><div class="refsect2" lang="en"><a name="method-gtktextiter--get-line-offset"></a><h3>gtk.TextIter.get_line_offset</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_line_offset</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 offset from the start of the
line</td></tr></tbody></table><p>The <tt class="methodname">get_line_offset</tt>() method returns
the character offset of the textiter location, counting from the start of
the line containing the textiter location. The first character on the line
has offset 0.</p></div><div class="refsect2" lang="en"><a name="method-gtktextiter--get-line-index"></a><h3>gtk.TextIter.get_line_index</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_line_index</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 bytes from the start of the
line</td></tr></tbody></table><p>The <tt class="methodname">get_line_offset</tt>() method returns
the byte index of the textiter location, counting from the start of the line
containing the textiter location. Remember that <a href="class-gtktextbuffer.html" title="gtk.TextBuffer"><tt class="classname">gtk.TextBuffer</tt></a>
encodes text in UTF-8, and that characters can require a variable number of
bytes to represent.</p></div><div class="refsect2" lang="en"><a name="method-gtktextiter--get-visible-line-offset"></a><h3>gtk.TextIter.get_visible_line_offset</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_visible_line_offset</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 offset in visible characters from the start
of the line</td></tr></tbody></table><p>The <tt class="methodname">get_visible_line_offset</tt>() method
returns the offset in characters of the textiter location from the start of
the line containing the textiter location, not counting characters that are
invisible due to tags with the "invisible" attribute set.</p></div><div class="refsect2" lang="en"><a name="method-gtktextiter--get-visible-line-index"></a><h3>gtk.TextIter.get_visible_line_index</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_visible_line_index</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 byte index from the start of the
line</td></tr></tbody></table><p>The <tt class="methodname">get_visible_line_index</tt>() method
returns the byte index of the textiter location from the start of the line,
not counting bytes that are invisible due to tags with the "invisible"
attribute set.</p></div><div class="refsect2" lang="en"><a name="method-gtktextiter--get-char"></a><h3>gtk.TextIter.get_char</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_char</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 Unicode character, or 0 if the textiter is
not dereferenceable</td></tr></tbody></table><p>The <tt class="methodname">get_char</tt>() method returns the
Unicode character at this textiter location. If the textiter points at a
non-character element, such as an image embedded in the buffer, the Unicode
"unknown" character 0xFFFC is returned. If invoked on the end textiter, zero
is returned; zero is not a valid Unicode character. So you can write a loop
which ends when the <a href="class-gtktextiter.html#method-gtktextiter--get-char" title="gtk.TextIter.get_char"><tt class="methodname">get_char</tt>()</a>
method returns 0.</p></div><div class="refsect2" lang="en"><a name="method-gtktextiter--get-slice"></a><h3>gtk.TextIter.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>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>end</tt></b>:</span></td><td>the textiter at the end of a
range</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>a slice of text from the
textbuffer</td></tr></tbody></table><p>The <tt class="methodname">get_slice</tt>() method returns the text
in the range between the locations specified by the textiter and
<i class="parameter"><tt>end</tt></i>. A "slice" is an array of characters encoded in
UTF-8 format, including the Unicode "unknown" character 0xFFFC for iterable
non-character elements in the textbuffer, such as images. Because images
are encoded in the slice, byte and character offsets in the returned array
will correspond to byte offsets in the textbuffer. 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 textbuffer.</p></div><div class="refsect2" lang="en"><a name="method-gtktextiter--get-text"></a><h3>gtk.TextIter.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>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>end</tt></b>:</span></td><td>textiter at end of a range</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>array of characters from the
buffer</td></tr></tbody></table><p>The <tt class="methodname">get_text</tt>() method returns the text
in the range between the locations specified by the textiter and
<i class="parameter"><tt>end</tt></i>. If the range contains non-text elements such as
images, the character and byte offsets in the returned string will not
correspond to character and byte offsets in the textbuffer. If you want the
offsets to correspond, use the <a href="class-gtktextiter.html#method-gtktextiter--get-slice" title="gtk.TextIter.get_slice"><tt class="methodname">get_slice</tt>()</a>
method.</p></div><div class="refsect2" lang="en"><a name="method-gtktextiter--get-visible-slice"></a><h3>gtk.TextIter.get_visible_slice</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_visible_slice</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>end</tt></b>:</span></td><td>textiter at end of range</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>a slice of visible text from the
textbuffer</td></tr></tbody></table><p>The <tt class="methodname">get_visible_slice</tt>() method is
similar to the <a href="class-gtktextiter.html#method-gtktextiter--get-slice" title="gtk.TextIter.get_slice"><tt class="methodname">get_slice</tt>()</a>
method, but invisible text is excluded. Invisible text is text with the
"invisible" attribute set on it.</p></div><div class="refsect2" lang="en"><a name="method-gtktextiter--get-visible-text"></a><h3>gtk.TextIter.get_visible_text</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_visible_text</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>end</tt></b>:</span></td><td>textiter at end of range</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>a string containing visible text from the
textbuffer</td></tr></tbody></table><p>The <tt class="methodname">get_visible_text</tt>() method is
similar to the <a href="class-gtktextiter.html#method-gtktextiter--get-text" title="gtk.TextIter.get_text"><tt class="methodname">get_text</tt>()</a>,
but invisible text is excluded. Invisible text is text with the "invisible"
attribute set on it.</p></div><div class="refsect2" lang="en"><a name="method-gtktextiter--get-pixbuf"></a><h3>gtk.TextIter.get_pixbuf</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_pixbuf</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 pixbuf or
<tt class="literal">None</tt></td></tr></tbody></table><p>The <tt class="methodname">get_pixbuf</tt>() method returns the
<a href="class-gdkpixbuf.html" title="gtk.gdk.Pixbuf"><tt class="classname">gtk.gdk.Pixbuf</tt></a>
object at the textiter location, if any; otherwise, <tt class="literal">None</tt>
is returned.</p></div><div class="refsect2" lang="en"><a name="method-gtktextiter--get-marks"></a><h3>gtk.TextIter.get_marks</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_marks</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 list of <a href="class-gtktextmark.html" title="gtk.TextMark"><tt class="classname">gtk.TextMark</tt></a>
objects</td></tr></tbody></table><p>The <tt class="methodname">get_marks</tt>() method returns a list
of all <a href="class-gtktextmark.html" title="gtk.TextMark"><tt class="classname">gtk.TextMark</tt></a>
objects at the textiter location. Because marks don't take up any "space" in
the buffer, multiple marks can exist in the same location. The returned list
is not in any meaningful order.</p></div><div class="refsect2" lang="en"><a name="method-gtktextiter--get-child-anchor"></a><h3>gtk.TextIter.get_child_anchor</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_child_anchor</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 child anchor or
<tt class="literal">None</tt></td></tr></tbody></table><p>The <tt class="methodname">get_child_anchor</tt>() method returns
the <a href="class-gtktextchildanchor.html" title="gtk.TextChildAnchor"><tt class="classname">gtk.TextChildAnchor</tt></a>
at the textiter location, if any; otherwise, <tt class="literal">None</tt> is
returned.</p></div><div class="refsect2" lang="en"><a name="method-gtktextiter--get-toggled-tags"></a><h3>gtk.TextIter.get_toggled_tags</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_toggled_tags</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>toggled_on</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>toggled_on</tt></b>:</span></td><td>if <tt class="literal">TRUE</tt> get toggled-on tags;
otherwise get toggle-off tags</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>a list of tags toggled at this
point</td></tr></tbody></table><p>The <tt class="methodname">get_toggled_tags</tt>() method returns a
list of <a href="class-gtktexttag.html" title="gtk.TextTag"><tt class="classname">gtk.TextTag</tt></a> objects
that are toggled on or off at this point. If
<i class="parameter"><tt>toggled_on</tt></i> is <tt class="literal">TRUE</tt>, the list
contains tags that are toggled on. If a tag is toggled on at the textiter
location, some non-empty range of characters following the textiter has that
tag applied to it. If a tag is toggled off, then some non-empty range
following the textiter location does not have the tag applied to it.</p></div><div class="refsect2" lang="en"><a name="method-gtktextiter--begins-tag"></a><h3>gtk.TextIter.begins_tag</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">begins_tag</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>tag</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>tag</tt></b>:</span></td><td>a <a href="class-gtktexttag.html" title="gtk.TextTag"><tt class="classname">gtk.TextTag</tt></a>, or
<tt class="literal">None</tt></td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td><tt class="literal">TRUE</tt> if the textiter is the
start of a range tagged with <i class="parameter"><tt>tag</tt></i></td></tr></tbody></table><p>The <tt class="methodname">begins_tag</tt>() method returns
<tt class="literal">TRUE</tt> if <i class="parameter"><tt>tag</tt></i> is toggled on at
exactly this point. If <i class="parameter"><tt>tag</tt></i> is
<tt class="literal">None</tt>, this method returns <tt class="literal">TRUE</tt> if any
tag is toggled on at this point. Note that the<tt class="methodname">
begins_tag</tt>() method returns <tt class="literal">TRUE</tt> only if the
textiter location is the <span class="emphasis"><em>start</em></span> of the tagged range; the
<a href="class-gtktextiter.html#method-gtktextiter--has-tag" title="gtk.TextIter.has_tag"><tt class="methodname">has_tag</tt>()</a>
indicates if a textiter location is <span class="emphasis"><em>within</em></span> a tagged
range.</p></div><div class="refsect2" lang="en"><a name="method-gtktextiter--ends-tag"></a><h3>gtk.TextIter.ends_tag</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">ends_tag</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>tag</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>tag</tt></b>:</span></td><td>a <a href="class-gtktexttag.html" title="gtk.TextTag"><tt class="classname">gtk.TextTag</tt></a>, or
<tt class="literal">None</tt></td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td><tt class="literal">TRUE</tt> if the textiter is the
end of a range tagged with <i class="parameter"><tt>tag</tt></i></td></tr></tbody></table><p>The <tt class="methodname">ends_tag</tt>() method returns
<tt class="literal">TRUE</tt> if <i class="parameter"><tt>tag</tt></i> is toggled off at the
location the textiter points to. If <i class="parameter"><tt>tag</tt></i> is
<tt class="literal">None</tt>, this method returns <tt class="literal">TRUE</tt> if any
tag is toggled off at this point. Note that the
<tt class="methodname">ends_tag</tt>() returns <tt class="literal">TRUE</tt> only if
the textiter location is the <span class="emphasis"><em>end</em></span> of the tagged range;
the <a href="class-gtktextiter.html#method-gtktextiter--has-tag" title="gtk.TextIter.has_tag"><tt class="methodname">has_tag</tt>()</a>
indicates if a textiter location is <span class="emphasis"><em>within</em></span> a tagged
range.</p></div><div class="refsect2" lang="en"><a name="method-gtktextiter--toggles-tag"></a><h3>gtk.TextIter.toggles_tag</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">toggles_tag</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>tag</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>tag</tt></b>:</span></td><td>a <a href="class-gtktexttag.html" title="gtk.TextTag"><tt class="classname">gtk.TextTag</tt></a>, or
<tt class="literal">None</tt></td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td><tt class="literal">TRUE</tt> if
<i class="parameter"><tt>tag</tt></i> is toggled on or off at the textiter
location</td></tr></tbody></table><p>The <tt class="methodname">toggles_tag</tt>() method returns
<tt class="literal">TRUE</tt> if a range of text with <i class="parameter"><tt>tag</tt></i>
applied to it begins <span class="emphasis"><em>or</em></span> ends at the textiter location.
If <i class="parameter"><tt>tag</tt></i> is <tt class="literal">None</tt> this method returns
<tt class="literal">TRUE</tt> if any tag begins or ends at the textiter
location.</p></div><div class="refsect2" lang="en"><a name="method-gtktextiter--has-tag"></a><h3>gtk.TextIter.has_tag</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">has_tag</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>tag</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"><span class="emphasis"><em>Returns</em></span>:</span></td><td><tt class="literal">TRUE</tt> if the textiter
location is tagged with <i class="parameter"><tt>tag</tt></i></td></tr></tbody></table><p>The <tt class="methodname">has_tag</tt>() method returns
<tt class="literal">TRUE</tt> if the textiter location is within a range of text
tagged with <i class="parameter"><tt>tag</tt></i>.</p></div><div class="refsect2" lang="en"><a name="method-gtktextiter--get-tags"></a><h3>gtk.TextIter.get_tags</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_tags</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 list of <a href="class-gtktexttag.html" title="gtk.TextTag"><tt class="classname">gtk.TextTag</tt></a>
objects</td></tr></tbody></table><p>The <tt class="methodname">get_tags</tt>() method returns a list of
tags that apply to the textiter location, in ascending order of priority
(highest-priority tags are last).</p></div><div class="refsect2" lang="en"><a name="method-gtktextiter--editable"></a><h3>gtk.TextIter.editable</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">editable</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>default_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>default_setting</tt></b>:</span></td><td>if <tt class="literal">TRUE</tt> the text 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 textiter
location is inside an editable range or text</td></tr></tbody></table><p>The <tt class="methodname">editable</tt>() method returns
<tt class="literal">TRUE</tt> if the character at the textiter location is within
an editable range of text. Non-editable text is "locked" and can't be
changed by the user via a <a href="class-gtktextview.html" title="gtk.TextView"><tt class="classname">gtk.TextView</tt></a>. This
method is a convenience wrapper around the <a href="class-gtktextiter.html#method-gtktextiter--get-attributes" title="gtk.TextIter.get_attributes"><tt class="methodname">get_attributes</tt>()</a>
method. If no tags applied to this text location affect editability, the
value of <i class="parameter"><tt>default_setting</tt></i> will be returned.</p><p>Do not use this method to determine if text can be inserted at
the textiter location. For insertion you don't want to know if the char at
the textiter location is inside an editable range of text, you want to know
whether a new character inserted at the textiter location would be inside an
editable range of text. Use the <a href="class-gtktextiter.html#method-gtktextiter--can-insert" title="gtk.TextIter.can_insert"><tt class="methodname">can_insert</tt>()</a>
method to determine if text can be inserted.</p></div><div class="refsect2" lang="en"><a name="method-gtktextiter--can-insert"></a><h3>gtk.TextIter.can_insert</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">can_insert</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>default_editability</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>default_editability</tt></b>:</span></td><td>if <tt class="literal">TRUE</tt> the text 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 text inserted at
<i class="parameter"><tt>iter</tt></i> would be editable</td></tr></tbody></table><p>The <tt class="methodname">can_insert</tt>() method considers the
default editability of the buffer, and the tags that affect editability, to
determine if text inserted at the textiter location would be editable. If
so, the user should be allowed to insert text at the textiter location. The
<a href="class-gtktextbuffer.html#method-gtktextbuffer--insert-interactive" title="gtk.TextBuffer.insert_interactive"><tt class="methodname">gtk.TextBuffer.insert_interactive</tt>()</a>
uses this function to determine if insertions are allowed at a given
position.</p></div><div class="refsect2" lang="en"><a name="method-gtktextiter--starts-word"></a><h3>gtk.TextIter.starts_word</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">starts_word</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 textiter
location is at the start of a word</td></tr></tbody></table><p>The <tt class="methodname">starts_word</tt>() method returns
<tt class="literal">TRUE</tt> if the textiter location begins a natural-language
word. Word breaks are determined by Pango and should be correct for nearly
any language (if not, the correct fix would be to the Pango word break
algorithms).</p></div><div class="refsect2" lang="en"><a name="method-gtktextiter--ends-word"></a><h3>gtk.TextIter.ends_word</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">ends_word</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 textiter
location is at the end of a word</td></tr></tbody></table><p>The <tt class="methodname">ends_word</tt>() method returns
<tt class="literal">TRUE</tt> if the textiter location ends a natural-language
word. Word breaks are determined by Pango and should be correct for nearly
any language (if not, the correct fix would be to the Pango word break
algorithms).</p></div><div class="refsect2" lang="en"><a name="method-gtktextiter--inside-word"></a><h3>gtk.TextIter.inside_word</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">inside_word</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 textiter
location is inside a word</td></tr></tbody></table><p>The <tt class="methodname">inside_word</tt>() method returns
<tt class="literal">TRUE</tt> if the textiter location is inside a
natural-language word (as opposed to say inside some whitespace). Word
breaks are determined by Pango and should be correct for nearly any language
(if not, the correct fix would be to the Pango word break
algorithms).</p></div><div class="refsect2" lang="en"><a name="method-gtktextiter--starts-sentence"></a><h3>gtk.TextIter.starts_sentence</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">starts_sentence</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 textiter
location is at the start of a sentence.</td></tr></tbody></table><p>The <tt class="methodname">starts_sentence</tt>() method returns
<tt class="literal">TRUE</tt> if the textiter location begins a sentence.
Sentence boundaries are determined by Pango and should be correct for nearly
any language (if not, the correct fix would be to the Pango text boundary
algorithms).</p></div><div class="refsect2" lang="en"><a name="method-gtktextiter--ends-sentence"></a><h3>gtk.TextIter.ends_sentence</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">ends_sentence</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 textiter
location is at the end of a sentence.</td></tr></tbody></table><p>The <tt class="methodname">ends_sentence</tt>() method returns
<tt class="literal">TRUE</tt> if the textiter location ends a sentence. Sentence
boundaries are determined by Pango and should be correct for nearly any
language (if not, the correct fix would be to the Pango text boundary
algorithms).</p></div><div class="refsect2" lang="en"><a name="method-gtktextiter--inside-sentence"></a><h3>gtk.TextIter.inside_sentence</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">inside_sentence</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 textiter
location is inside a sentence.</td></tr></tbody></table><p>The <tt class="methodname">inside_sentence</tt>() method returns
<tt class="literal">TRUE</tt> if the textiter location is inside a sentence (as
opposed to in between two sentences, e.g. after a period and before the
first letter of the next sentence). Sentence boundaries are determined by
Pango and should be correct for nearly any language (if not, the correct fix
would be to the Pango text boundary algorithms).</p></div><div class="refsect2" lang="en"><a name="method-gtktextiter--starts-line"></a><h3>gtk.TextIter.starts_line</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">starts_line</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 textiter
location begins a line</td></tr></tbody></table><p>The <tt class="methodname">starts_line</tt>() method returns
<tt class="literal">TRUE</tt> if the textiter location begins a paragraph, i.e. if
the <a href="class-gtktextiter.html#method-gtktextiter--get-line-offset" title="gtk.TextIter.get_line_offset"><tt class="methodname">.get_line_offset</tt>()</a>
method would return 0.</p></div><div class="refsect2" lang="en"><a name="method-gtktextiter--ends-line"></a><h3>gtk.TextIter.ends_line</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">ends_line</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 textiter
location is at the end of a line</td></tr></tbody></table><p>The <tt class="methodname">ends_line</tt>() method returns
<tt class="literal">TRUE</tt> if the textiter location points to the start of the
paragraph delimiter characters for a line (delimiters will be either a
newline, a carriage return, a carriage return followed by a newline, or a
Unicode paragraph separator character). Note that an textiter pointing to
the \n of a \r\n pair will not be counted as the end of a line, the line
ends before the \r. The end textiter is considered to be at the end of a
line, even though there are no paragraph delimiter chars there.</p></div><div class="refsect2" lang="en"><a name="method-gtktextiter--is-cursor-position"></a><h3>gtk.TextIter.is_cursor_position</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">is_cursor_position</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 cursor can be
placed at the textiter location</td></tr></tbody></table><p>The <tt class="methodname">is_cursor_position</tt>() method returns
<tt class="literal">TRUE</tt> if the cursor can be placed at the textiter
location. See the <a href="class-gtktextiter.html#method-gtktextiter--forward-cursor-position" title="gtk.TextIter.forward_cursor_position"><tt class="methodname">forward_cursor_position</tt>()</a>
method for details on what a cursor position is.</p></div><div class="refsect2" lang="en"><a name="method-gtktextiter--get-chars-in-line"></a><h3>gtk.TextIter.get_chars_in_line</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_chars_in_line</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
line</td></tr></tbody></table><p>The <tt class="methodname">get_chars_in_line</tt>() method returns
the number of characters in the line containing the textiter location,
including the paragraph delimiters.</p></div><div class="refsect2" lang="en"><a name="method-gtktextiter--get-bytes-in-line"></a><h3>gtk.TextIter.get_bytes_in_line</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_bytes_in_line</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 bytes in the
line</td></tr></tbody></table><p>The <tt class="methodname">get_bytes_in_line</tt>() method returns
the number of bytes in the line containing the textiter location, including
the paragraph delimiters.</p></div><div class="refsect2" lang="en"><a name="method-gtktextiter--get-attributes"></a><h3>gtk.TextIter.get_attributes</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_attributes</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>values</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>values</tt></b>:</span></td><td>a <a href="class-gtktextattributes.html" title="gtk.TextAttributes"><tt class="classname">gtk.TextAttributes</tt></a>
object to be filled in</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td><tt class="literal">TRUE</tt> if
<i class="parameter"><tt>values</tt></i> was modified</td></tr></tbody></table><p>The <tt class="methodname">get_attributes</tt>() method computes
the effect of any tags applied to the textiter location and applies those
attributes to the <a href="class-gtktextattributes.html" title="gtk.TextAttributes"><tt class="classname">gtk.TextAttributes</tt></a>
object specified by <i class="parameter"><tt>values</tt></i> (which should be
initialized to the default settings you wish to use if no tags are in
effect). Typically the default attributes are obtained from the <a href="class-gtktextview.html#method-gtktextview--get-default-attributes" title="gtk.TextView.get_default_attributes"><tt class="methodname">gtk.TextView.get_default_attributes</tt>()</a>
method. If any tags affected <i class="parameter"><tt>values</tt></i>, the method
returns <tt class="literal">TRUE</tt>.</p></div><div class="refsect2" lang="en"><a name="method-gtktextiter--get-language"></a><h3>gtk.TextIter.get_language</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_language</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 pango language in effect at the textiter
location</td></tr></tbody></table><p>The <tt class="methodname">get_language</tt>() method is a
convenience wrapper around the <a href="class-gtktextiter.html#method-gtktextiter--get-attributes" title="gtk.TextIter.get_attributes"><tt class="methodname">get_attributes</tt>()</a>
method, that returns the language in effect at the textiter location. If no
tags affecting language apply to the textiter location, the return value is
identical to that of the <tt class="function">gtk.get_default_language()</tt>
function.</p></div><div class="refsect2" lang="en"><a name="method-gtktextiter--is-end"></a><h3>gtk.TextIter.is_end</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">is_end</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 textiter is the
end textiter</td></tr></tbody></table><p>The <tt class="methodname">is_end</tt>() method returns
<tt class="literal">TRUE</tt> if the textiter is the end textiter, i.e. one past
the last dereferenceable textiter in the buffer. The
<tt class="methodname">is_end</tt>() method is the most efficient way to check
whether an textiter is the end textiter.</p></div><div class="refsect2" lang="en"><a name="method-gtktextiter--is-start"></a><h3>gtk.TextIter.is_start</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">is_start</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 textiter
location is at the start of the textbuffer</td></tr></tbody></table><p>The <tt class="methodname">is_start</tt>() method returns
<tt class="literal">TRUE</tt> if the textiter location is at the start of the
textbuffer, that is if the textiter location has a character offset of
0.</p></div><div class="refsect2" lang="en"><a name="method-gtktextiter--forward-char"></a><h3>gtk.TextIter.forward_char</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">forward_char</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 textiter
location moved and is dereferenceable</td></tr></tbody></table><p>The <tt class="methodname">forward_char</tt>() method moves the
textiter location forward by one character offset and returns
<tt class="literal">TRUE</tt> if the textiter location moved and the new location
is dereferenceable. Note that images embedded in the buffer occupy 1
character slot, so the <tt class="methodname">forward_char</tt>() method may
actually move onto an image instead of a character, if you have images in
your buffer. If the textiter location is the end textiter or one character
before it, the textiter location will now point at the end textiter, and the
<tt class="methodname">forward_char</tt>() method returns
<tt class="literal">FALSE</tt>.</p></div><div class="refsect2" lang="en"><a name="method-gtktextiter--backward-char"></a><h3>gtk.TextIter.backward_char</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">backward_char</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>TRUE if the textiter location moved and is
not the start textiter</td></tr></tbody></table><p>The <tt class="methodname">backward_char</tt>() method moves the
textiter location backward by one character offset and returns
<tt class="literal">TRUE</tt> if the textiter location moved. If the old textiter
location was the first in the buffer (character offset 0), the
<tt class="methodname">backward_char</tt>() method returns
<tt class="literal">FALSE</tt>.</p></div><div class="refsect2" lang="en"><a name="method-gtktextiter--forward-chars"></a><h3>gtk.TextIter.forward_chars</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">forward_chars</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>count</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>count</tt></b>:</span></td><td>the number of characters to move, may be
negative</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td><tt class="literal">TRUE</tt> if the textiter
location moved and is dereferenceable</td></tr></tbody></table><p>The <tt class="methodname">forward_chars</tt>() method moves the
textiter location forward <i class="parameter"><tt>count</tt></i> characters if
possible. If the textiter location would move past the start or end of the
buffer, the location moves to the start or end of the textbuffer. The
<tt class="methodname">forward_chars</tt>() method returns
<tt class="literal">TRUE</tt> if the new position of the resulting textiter
location is different from its original position, and is dereferenceable
(the last textiter in the buffer is not dereferenceable). If
<i class="parameter"><tt>count</tt></i> is 0, the function does nothing and returns
<tt class="literal">FALSE</tt>.</p></div><div class="refsect2" lang="en"><a name="method-gtktextiter--backward-chars"></a><h3>gtk.TextIter.backward_chars</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">backward_chars</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>count</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>count</tt></b>:</span></td><td>the number of characters to move, may be
negative</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td><tt class="literal">TRUE</tt> if the textiter
location moved and is dereferenceable</td></tr></tbody></table><p>The <tt class="methodname">backward_chars</tt>() method moves the
textiter location backward forward <i class="parameter"><tt>count</tt></i> characters,
if possible. If the textiter location would move past the start or end of
the buffer, the location moves to the start or end of the textbuffer. The
<tt class="methodname">backward_chars</tt>() method returns
<tt class="literal">TRUE</tt> if the new position of the resulting textiter
location is different from its original position, and is dereferenceable
(the last textiter in the buffer is not dereferenceable). If
<i class="parameter"><tt>count</tt></i> is 0, the function does nothing and returns
<tt class="literal">FALSE</tt>.</p></div><div class="refsect2" lang="en"><a name="method-gtktextiter--forward-line"></a><h3>gtk.TextIter.forward_line</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">forward_line</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 textiter
location can be dereferenced</td></tr></tbody></table><p>The <tt class="methodname">forward_line</tt>() method moves the
textiter location to the start of the next line and returns
<tt class="literal">TRUE</tt> if the textiter location moved to a dereferenceable
position, and <tt class="literal">FALSE</tt> if the textiter location moved to the
end of the buffer, or if the textiter location was originally at the end of
the buffer.</p></div><div class="refsect2" lang="en"><a name="method-gtktextiter--backward-line"></a><h3>gtk.TextIter.backward_line</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">backward_line</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 textiter
location moved</td></tr></tbody></table><p>The <tt class="methodname">backward_line</tt>() method moves the
textiter location to the start of the previous line and returns
<tt class="literal">TRUE</tt> if the textiter location was moved. If the textiter
location was at the textbuffer start, this method returns
<tt class="literal">FALSE</tt>. For example if the textiter location was already
on line 0, but not at the start of the line, the textiter location is
snapped to the start of the line and the method returns
<tt class="literal">TRUE</tt>.</p></div><div class="refsect2" lang="en"><a name="method-gtktextiter--forward-lines"></a><h3>gtk.TextIter.forward_lines</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">forward_lines</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>count</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>count</tt></b>:</span></td><td>the number of lines to move forward, may be
negative</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td><tt class="literal">TRUE</tt> if the textiter
location moved and is dereferenceable</td></tr></tbody></table><p>The <tt class="methodname">forward_lines</tt>() method moves the
textiter location forward <i class="parameter"><tt>count</tt></i> lines, if possible.
If the textiter location would move past the start or end of the buffer, the
location moves to the start or end of the textbuffer. The method
returns:</p><div class="itemizedlist"><ul type="disc"><li><tt class="literal">TRUE</tt> if the textiter moved to a
dereferenceable position; or,</li><li><tt class="literal">FALSE</tt> if the textiter location didn't
move, or moved onto the end textiter or if <i class="parameter"><tt>count</tt></i> was
0.</li></ul></div><p>If <i class="parameter"><tt>count</tt></i> is negative, the textiter
location moves backward by <i class="parameter"><tt>count</tt></i> lines.</p></div><div class="refsect2" lang="en"><a name="method-gtktextiter--backward-lines"></a><h3>gtk.TextIter.backward_lines</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">backward_lines</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>count</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>count</tt></b>:</span></td><td>the number of lines to move backward, may be
negative</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td><tt class="literal">TRUE</tt> if the textiter
location moved to a dereferenceable position</td></tr></tbody></table><p>The backward_lines() method moves the textiter location backward
by <i class="parameter"><tt>count</tt></i> lines, if possible. If the textiter location
would move past the start or end of the buffer, the location moves to the
start or end of the textbuffer. The method returns:</p><div class="itemizedlist"><ul type="disc"><li><tt class="literal">TRUE</tt> if the textiter moved to a
dereferenceable position; or,</li><li><tt class="literal">FALSE</tt> if the textiter location didn't
move, or moved onto the end textiter or if <i class="parameter"><tt>count</tt></i> was
0.</li></ul></div><p>If <i class="parameter"><tt>count</tt></i> is negative, the textiter
location moves forward by <i class="parameter"><tt>count</tt></i> lines.</p></div><div class="refsect2" lang="en"><a name="method-gtktextiter--forward-word-end"></a><h3>gtk.TextIter.forward_word_end</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">forward_word_end</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 textiter
location moved to a dereferenceable position</td></tr></tbody></table><p>The <tt class="methodname">forward_word_end</tt>() method moves the
textiter location forward to the next word end. If the textiter location is
currently on a word end, the location moves forward to the next one after
that. Word breaks are determined by Pango and should be correct for nearly
any language (if not, the correct fix would be to the Pango word break
algorithms). The method returns TRUE if the textiter location moved to a
dereferenceable position</p></div><div class="refsect2" lang="en"><a name="method-gtktextiter--backward-word-start"></a><h3>gtk.TextIter.backward_word_start</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">backward_word_start</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 textiter
location moved</td></tr></tbody></table><p>The <tt class="methodname">backward_word_start</tt>() method moves
the textiter location backward to the previous word start. If the textiter
location is currently on a word start, the location moves backward to the
next one before that. Word breaks are determined by Pango and should be
correct for nearly any language (if not, the correct fix would be to the
Pango word break algorithms). The method returns <tt class="literal">TRUE</tt> if
the textiter location moved.</p></div><div class="refsect2" lang="en"><a name="method-gtktextiter--forward-word-ends"></a><h3>gtk.TextIter.forward_word_ends</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">forward_word_ends</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>count</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>count</tt></b>:</span></td><td>the number of times to
move</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td><tt class="literal">TRUE</tt> if the textiter
location moved and is not the end textiter</td></tr></tbody></table><p>The <tt class="methodname">forward_word_ends</tt>() method calls
the <a href="class-gtktextiter.html#method-gtktextiter--forward-word-end" title="gtk.TextIter.forward_word_end"><tt class="methodname">forward_word_end</tt>()</a>
method up to <i class="parameter"><tt>count</tt></i> times or the <a href="class-gtktextiter.html#method-gtktextiter--backward-word-starts" title="gtk.TextIter.backward_word_starts"><tt class="methodname">backward_word_starts</tt>()</a>
method if <i class="parameter"><tt>count</tt></i> is negative. The method returns
<tt class="literal">TRUE</tt> if the textiter location changed and the resulting
location is not at the end of the textbuffer.</p></div><div class="refsect2" lang="en"><a name="method-gtktextiter--backward-word-starts"></a><h3>gtk.TextIter.backward_word_starts</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">backward_word_starts</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>count</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>count</tt></b>:</span></td><td>the number of times to
move</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td><tt class="literal">TRUE</tt> if the textiter
location moved and is not the end textiter</td></tr></tbody></table><p>The <tt class="methodname">backward_word_starts(</tt>) method calls the
<a href="class-gtktextiter.html#method-gtktextiter--backward-word-start" title="gtk.TextIter.backward_word_start"><tt class="methodname">backward_word_start</tt>()</a>
method up to <i class="parameter"><tt>count</tt></i> times or the <a href="class-gtktextiter.html#method-gtktextiter--forward-word-ends" title="gtk.TextIter.forward_word_ends"><tt class="methodname">forward_word_ends</tt>()</a>
method if <i class="parameter"><tt>count</tt></i> is negative. The method returns
<tt class="literal">TRUE</tt> if the textiter location changed and the resulting
location is not at the end of the textbuffer.</p></div><div class="refsect2" lang="en"><a name="method-gtktextiter--forward-visible-word-end"></a><h3>gtk.TextIter.forward_visible_word_end</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">forward_visible_word_end</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 textiter moved
and is not the end iterator</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">forward_visible_word_end</tt>() method
moves the textiter forward to the next visible word end. (If the textiter is
currently on a word end, it moves forward to the next one after that.) Word
breaks are determined by Pango and should be correct for nearly any language
(if not, the correct fix would be to the Pango word break
algorithms).</p></div><div class="refsect2" lang="en"><a name="method-gtktextiter--backward-visible-word-start"></a><h3>gtk.TextIter.backward_visible_word_start</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">backward_visible_word_start</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 textiter moved
and is not the end iterator</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">backward_visible_word_start</tt>()
method moves the textiter backward to the previous visible word start. (If
textiter is currently on a word start, it moves backward to the next one
after that.) Word breaks are determined by Pango and should be correct for
nearly any language (if not, the correct fix would be to the Pango word
break algorithms).</p></div><div class="refsect2" lang="en"><a name="method-gtktextiter--forward-visible-word-ends"></a><h3>gtk.TextIter.forward_visible_word_ends</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">forward_visible_word_ends</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>count</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>count</tt></b>:</span></td><td>the number of times to move</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td><tt class="literal">TRUE</tt> if the textiter moved
and is not the end iterator</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">forward_visible_word_ends</tt>() method
calls the <a href="class-gtktextiter.html#method-gtktextiter--forward-visible-word-end" title="gtk.TextIter.forward_visible_word_end"><tt class="methodname">forward_visible_word_end()</tt></a>
method the number of times specified by <i class="parameter"><tt>count</tt></i>.</p></div><div class="refsect2" lang="en"><a name="method-gtktextiter--backward-visible-word-starts"></a><h3>gtk.TextIter.backward_visible_word_starts</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">backward_visible_word_starts</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>count</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>count</tt></b>:</span></td><td>the number of times to move</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td><tt class="literal">TRUE</tt> if the textiter moved
and is not the end iterator</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">backward_visible_word_starts</tt>()
method calls the <a href="class-gtktextiter.html#method-gtktextiter--backward-visible-word-start" title="gtk.TextIter.backward_visible_word_start"><tt class="methodname">backward_visible_word_start()</tt></a>
method the number of times specified by <i class="parameter"><tt>count</tt></i>.</p></div><div class="refsect2" lang="en"><a name="method-gtktextiter--forward-sentence-end"></a><h3>gtk.TextIter.forward_sentence_end</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">forward_sentence_end</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 textiter
location moved and is not the end textiter</td></tr></tbody></table><p>The <tt class="methodname">forward_sentence_end</tt>() method moves
the textiter location forward to the next sentence end. (If the textiter
location is at the end of a sentence, the location moves to the next end of
sentence.) Sentence boundaries are determined by Pango and should be
correct for nearly any language (if not, the correct fix would be to the
Pango text boundary algorithms). The method returns <tt class="literal">TRUE</tt>
if the textiter location changed and the resulting location is not at the
end of the textbuffer.</p></div><div class="refsect2" lang="en"><a name="method-gtktextiter--backward-sentence-start"></a><h3>gtk.TextIter.backward_sentence_start</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">backward_sentence_start</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 textiter
location moved</td></tr></tbody></table><p>The <tt class="methodname">backward_sentence_start</tt>() method
moves the textiter location backward to the previous sentence start. If the
textiter location is already at the start of a sentence, the location moves
backward to the next one. Sentence boundaries are determined by Pango and
should be correct for nearly any language (if not, the correct fix would be
to the Pango text boundary algorithms).</p></div><div class="refsect2" lang="en"><a name="method-gtktextiter--forward-sentence-ends"></a><h3>gtk.TextIter.forward_sentence_ends</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">forward_sentence_ends</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>count</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>count</tt></b>:</span></td><td>the number of sentences to
move</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td><tt class="literal">TRUE</tt> if the textiter
location moved and is not the end textiter</td></tr></tbody></table><p>The <tt class="methodname">forward_sentence_ends</tt>() method
calls the <a href="class-gtktextiter.html#method-gtktextiter--forward-sentence-end" title="gtk.TextIter.forward_sentence_end"><tt class="methodname">forward_sentence_end</tt>()</a>
method <i class="parameter"><tt>count</tt></i> times (or until the <a href="class-gtktextiter.html#method-gtktextiter--forward-sentence-end" title="gtk.TextIter.forward_sentence_end"><tt class="methodname">forward_sentence_end</tt>()</a>
method returns <tt class="literal">FALSE</tt>). If <i class="parameter"><tt>count</tt></i> is
negative, the location moves backward instead of forward. The method returns
<tt class="literal">TRUE</tt> if the textiter location changed and the resulting
location is not at the end of the textbuffer.</p></div><div class="refsect2" lang="en"><a name="method-gtktextiter--backward-sentence-starts"></a><h3>gtk.TextIter.backward_sentence_starts</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">backward_sentence_starts</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>count</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>count</tt></b>:</span></td><td>the number of sentences to
move</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td><tt class="literal">TRUE</tt> if the textiter
location moved and is not the end textiter</td></tr></tbody></table><p>The <tt class="methodname">backward_sentence_starts</tt>() method
calls the <a href="class-gtktextiter.html#method-gtktextiter--backward-sentence-start" title="gtk.TextIter.backward_sentence_start"><tt class="methodname">backward_sentence_start</tt>()</a>
method (or the <a href="class-gtktextiter.html#method-gtktextiter--forward-sentence-end" title="gtk.TextIter.forward_sentence_end"><tt class="methodname">forward_sentence_end</tt>()</a>()
method if count is negative) up to <i class="parameter"><tt>count</tt></i> times, or
until it returns <tt class="literal">FALSE</tt>. If <i class="parameter"><tt>count</tt></i>
is negative, the location moves forward instead of backward. The method
returns <tt class="literal">TRUE</tt> if the textiter location changed and the
resulting location is not at the end of the textbuffer.</p></div><div class="refsect2" lang="en"><a name="method-gtktextiter--forward-cursor-position"></a><h3>gtk.TextIter.forward_cursor_position</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">forward_cursor_position</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 we moved and the new
position is dereferenceable</td></tr></tbody></table><p>The <tt class="methodname">forward_cursor_position</tt>() method
moves the textiter location forward by a single cursor position. Cursor
positions are (unsurprisingly) positions where the cursor can appear.
Surprisingly, there may not be a cursor position between all characters. The
most common example for European languages would be a carriage
return/newline sequence. For some Unicode characters, the equivalent of say
the letter "a" with an accent mark will be represented as two characters,
first the letter then a "combining mark" that causes the accent to be
rendered; so the cursor can't go between those two characters. The method
returns <tt class="literal">TRUE</tt> if the textiter location changed and the
resulting location is not at the end of the textbuffer.</p></div><div class="refsect2" lang="en"><a name="method-gtktextiter--backward-cursor-position"></a><h3>gtk.TextIter.backward_cursor_position</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">backward_cursor_position</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 we moved and the new
position is dereferenceable</td></tr></tbody></table><p>The <tt class="methodname">backward_cursor_position</tt>() method
is similar to the <a href="class-gtktextiter.html#method-gtktextiter--forward-cursor-position" title="gtk.TextIter.forward_cursor_position"><tt class="methodname">forward_cursor_position</tt>()</a>
method, except the location moves backward.</p></div><div class="refsect2" lang="en"><a name="method-gtktextiter--forward-cursor-positions"></a><h3>gtk.TextIter.forward_cursor_positions</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">forward_cursor_positions</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>count</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>count</tt></b>:</span></td><td>the number of positions to
move</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td><tt class="literal">TRUE</tt> if the textiter
location moved and the new position is dereferenceable</td></tr></tbody></table><p>The <tt class="methodname">forward_cursor_positions</tt>() method
moves up to <i class="parameter"><tt>count</tt></i> cursor positions. See the <a href="class-gtktextiter.html#method-gtktextiter--forward-cursor-position" title="gtk.TextIter.forward_cursor_position"><tt class="methodname">forward_cursor_position</tt>()</a>
method for more details. The method returns <tt class="literal">TRUE</tt> if the
textiter moved to a dereferenceable location.</p></div><div class="refsect2" lang="en"><a name="method-gtktextiter--backward-cursor-positions"></a><h3>gtk.TextIter.backward_cursor_positions</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">backward_cursor_positions</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>count</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>count</tt></b>:</span></td><td>the number of positions to
move</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td><tt class="literal">TRUE</tt> if the textiter
location moved and the new position is dereferenceable</td></tr></tbody></table><p>The <tt class="methodname">backward_cursor_positions</tt>() method
moves the textiter location up to <i class="parameter"><tt>count</tt></i> cursor
positions. See the <a href="class-gtktextiter.html#method-gtktextiter--forward-cursor-position" title="gtk.TextIter.forward_cursor_position"><tt class="methodname">forward_cursor_position</tt>()</a>
method for details.</p></div><div class="refsect2" lang="en"><a name="method-gtktextiter--set-offset"></a><h3>gtk.TextIter.set_offset</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_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>a character number</td></tr></tbody></table><p>The <tt class="methodname">set_offset</tt>() method sets the
textiter location to point to the location that is
<i class="parameter"><tt>char_offset</tt></i> counts from the start of the textbuffer
(starting with 0).</p></div><div class="refsect2" lang="en"><a name="method-gtktextiter--set-line"></a><h3>gtk.TextIter.set_line</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_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>a line number (counted from
0)</td></tr></tbody></table><p>The <tt class="methodname">set_line</tt>() method sets the textiter
location to the start of the line specified by
<i class="parameter"><tt>line_number</tt></i>. If <i class="parameter"><tt>line_number</tt></i>
is negative or larger than the number of lines in the textbuffer, the method
moves the textiter location to the start of the last line in the
buffer.</p></div><div class="refsect2" lang="en"><a name="method-gtktextiter--set-line-offset"></a><h3>gtk.TextIter.set_line_offset</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_line_offset</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>char_on_line</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_on_line</tt></b>:</span></td><td>a character offset relative to the start of the
textiter location's current line</td></tr></tbody></table><p>The <tt class="methodname">set_line_offset</tt>() method moves the
textiter location within a line, to the new <span class="emphasis"><em>character</em></span>
(not byte) offset specified by <i class="parameter"><tt>char_on_line</tt></i>. The
character offset must be less than or equal to the number of characters in
the line; if equal, the textiter location moves to the start of the next
line. See the <a href="class-gtktextiter.html#method-gtktextiter--set-line-index" title="gtk.TextIter.set_line_index"><tt class="methodname">set_line_index</tt>()</a>
method if you have a byte index rather than a character offset.</p></div><div class="refsect2" lang="en"><a name="method-gtktextiter--set-line-index"></a><h3>gtk.TextIter.set_line_index</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_line_index</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>byte_on_line</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>byte_on_line</tt></b>:</span></td><td>a byte index relative to the start of the
textiter location's current line</td></tr></tbody></table><p>The <tt class="methodname">set_line_index</tt>() method is similar
to the <a href="class-gtktextiter.html#method-gtktextiter--set-line-offset" title="gtk.TextIter.set_line_offset"><tt class="methodname">set_line_offset</tt>()</a>,
but works with a <span class="emphasis"><em>byte</em></span> index instead of a character
index. The given byte index must be at the start of a character, it can't be
in the middle of a UTF-8 encoded character.</p></div><div class="refsect2" lang="en"><a name="method-gtktextiter--forward-to-end"></a><h3>gtk.TextIter.forward_to_end</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">forward_to_end</span>(<span class="methodparam"></span>)</code></pre></td></tr></table><p>The <tt class="methodname">forward_to_end</tt>() method moves the
textiter location forward to the "end textiter," that points one past the
last valid character in the buffer. The <a href="class-gtktextiter.html#method-gtktextiter--get-char" title="gtk.TextIter.get_char"><tt class="methodname">get_char</tt>()</a>
method called on the end textiter returns 0, which is convenient for writing
loops.</p></div><div class="refsect2" lang="en"><a name="method-gtktextiter--forward-to-line-end"></a><h3>gtk.TextIter.forward_to_line_end</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">forward_to_line_end</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 we moved and the new
location is not the end textiter</td></tr></tbody></table><p>The <tt class="methodname">forward_to_line_end</tt>() method moves
the textiter to point to the paragraph delimiter characters at the end of
the current line. The paragraph delimiter characters are a newline, a
carriage return, a carriage return-newline in sequence, or the Unicode
paragraph separator character. If the textiter is already at the paragraph
delimiter characters, moves to the paragraph delimiter characters for the
next line. If the textiter location is on the last line in the buffer, which
does not end in paragraph delimiters, moves to the end textiter (end of the
last line), and returns <tt class="literal">FALSE</tt>.</p></div><div class="refsect2" lang="en"><a name="method-gtktextiter--set-visible-line-offset"></a><h3>gtk.TextIter.set_visible_line_offset</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_visible_line_offset</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>char_on_line</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_on_line</tt></b>:</span></td><td>a character offset</td></tr></tbody></table><p>The <tt class="methodname">set_visible_char_offset</tt>() method is
similar to the <a href="class-gtktextiter.html#method-gtktextiter--set-line-offset" title="gtk.TextIter.set_line_offset"><tt class="methodname">set_line_offset</tt>()</a>
method, but the offset is in visible characters, i.e. text with the
invisible attribute set is not counted in the offset.</p></div><div class="refsect2" lang="en"><a name="method-gtktextiter--set-visible-line-index"></a><h3>gtk.TextIter.set_visible_line_index</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_visible_line_index</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>byte_on_line</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>byte_on_line</tt></b>:</span></td><td>a byte index</td></tr></tbody></table><p>The <tt class="methodname">set_visible_line_index</tt>() method is
similar to the <a href="class-gtktextiter.html#method-gtktextiter--set-line-index" title="gtk.TextIter.set_line_index"><tt class="methodname">set_line_index</tt>()</a>
method, but the index is in visible bytes, i.e. text with the attribute set
is not counted in the index.</p></div><div class="refsect2" lang="en"><a name="method-gtktextiter--forward-to-tag-toggle"></a><h3>gtk.TextIter.forward_to_tag_toggle</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">forward_to_tag_toggle</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>tag</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>, or
<tt class="literal">None</tt></td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td><tt class="literal">TRUE</tt> if a tag toggle was
found after the textiter location</td></tr></tbody></table><p>The <tt class="methodname">forward_to_tag_toggle</tt>() method
moves the textiter location forward to the next toggle (on or off) 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>, or to the next toggle of any tag if
<i class="parameter"><tt>tag</tt></i> is <tt class="literal">None</tt>. If no matching tag
toggles are found, this method returns <tt class="literal">FALSE</tt> and sets the
textiter location to the end of the textbuffer; otherwise, returns
<tt class="literal">TRUE</tt>. The
<tt class="methodname">forward_to_tag_toggle</tt>() method does not recognize
toggles located at the textiter location, only toggles after the textiter
location.</p></div><div class="refsect2" lang="en"><a name="method-gtktextiter--backward-to-tag-toggle"></a><h3>gtk.TextIter.backward_to_tag_toggle</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">backward_to_tag_toggle</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>tag</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>, or
<tt class="literal">None</tt></td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td><tt class="literal">TRUE</tt> if a tag toggle was
found before the textiter location</td></tr></tbody></table><p>The <tt class="methodname">backward_to_tag_toggle</tt>() method
moves the textiter location backward to the next toggle (on or off) 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>, or to the next toggle of any tag if
<i class="parameter"><tt>tag</tt></i> is <tt class="literal">None</tt>. If no matching tag
toggles are found, this method returns <tt class="literal">FALSE</tt> and sets the
textiter location to the start of the textbuffer; otherwise, returns
<tt class="literal">TRUE</tt>. The
<tt class="methodname">backward_to_tag_toggle</tt>() method does not recognize
toggles located at the textiter location, only toggles before the textiter
location.</p></div><div class="refsect2" lang="en"><a name="method-gtktextiter--forward-find-char"></a><h3>gtk.TextIter.forward_find_char</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">forward_find_char</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>pred</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>user_data</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>limit</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>pred</tt></b>:</span></td><td>a function to be called on each
character</td></tr><tr><td><span class="term"><b class="parameter"><tt>user_data</tt></b>:</span></td><td>user data for
<i class="parameter"><tt>pred</tt></i></td></tr><tr><td><span class="term"><b class="parameter"><tt>limit</tt></b>:</span></td><td>a <a href="class-gtktextiter.html" title="gtk.TextIter"><tt class="classname">gtk.TextIter</tt></a>
pointing at a position to end the search, or
<tt class="literal">None</tt> for the end 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 a match was
found</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">forward_find_char</tt>() method advances
the textiter, calling the function specified by <i class="parameter"><tt>pred</tt></i>
on each character. If <i class="parameter"><tt>pred</tt></i> returns
<tt class="literal">TRUE</tt>, <tt class="methodname">forward_find_char</tt> stops
scanning and returns <tt class="literal">TRUE</tt>. If <i class="parameter"><tt>pred</tt></i>
never returns <tt class="literal">TRUE</tt>, the textiter location is set to
<i class="parameter"><tt>limit</tt></i> or the end textiter, if
<i class="parameter"><tt>limit</tt></i> is <tt class="literal">None</tt>.</p><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p> This method is likely to be very slow since the Python
function <i class="parameter"><tt>pred</tt></i> is called for every character.</p></div></div><div class="refsect2" lang="en"><a name="method-gtktextiter--backward-find-char"></a><h3>gtk.TextIter.backward_find_char</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">backward_find_char</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>pred</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>user_data</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>limit</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>pred</tt></b>:</span></td><td>a function to be called on each
character</td></tr><tr><td><span class="term"><b class="parameter"><tt>user_data</tt></b>:</span></td><td>user data for <i class="parameter"><tt>pred</tt></i></td></tr><tr><td><span class="term"><b class="parameter"><tt>limit</tt></b>:</span></td><td>a <a href="class-gtktextiter.html" title="gtk.TextIter"><tt class="classname">gtk.TextIter</tt></a>
pointing at a position to end the search, or
<tt class="literal">None</tt> for the beginning 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 a match was
found</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">backward_find_char</tt>() method is
similar to the <a href="class-gtktextiter.html#method-gtktextiter--forward-find-char" title="gtk.TextIter.forward_find_char"><tt class="methodname">forward_find_char()</tt></a>
method, but goes backward from the textiter location.</p><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p> This method is likely to be very slow since the Python
function <i class="parameter"><tt>pred</tt></i> is called for every character.</p></div></div><div class="refsect2" lang="en"><a name="method-gtktextiter--forward-search"></a><h3>gtk.TextIter.forward_search</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">forward_search</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>str</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>flags</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>limit</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>str</tt></b>:</span></td><td>a search string</td></tr><tr><td><span class="term"><b class="parameter"><tt>flags</tt></b>:</span></td><td>the flags affecting how the search is
done</td></tr><tr><td><span class="term"><b class="parameter"><tt>limit</tt></b>:</span></td><td>a bound for the search, or
<tt class="literal">None</tt> to set the bound to the end of the buffer</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>a tuple containing <a href="class-gtktextiter.html" title="gtk.TextIter"><tt class="classname">gtk.TextIter</tt></a>
objects pointing at the start and end locations of the
match</td></tr></tbody></table><p>The <tt class="methodname">forward_search</tt>() method searches
forward for the text string specified by <i class="parameter"><tt>str</tt></i> and
returns a tuple containing <a href="class-gtktextiter.html" title="gtk.TextIter"><tt class="classname">gtk.TextIter</tt></a>
objects that point at the start and end locations of the match. The search
will stop at the location specified by <i class="parameter"><tt>limit</tt></i> or the
end of the textbuffer if <i class="parameter"><tt>limit</tt></i> is
<tt class="literal">None</tt> or is not specified. Note that a search is a linear
or O(n) operation, so you may wish to use <i class="parameter"><tt>limit</tt></i> to
avoid locking up your UI when searching large buffers.</p><p>If the <tt class="literal">gtk.TEXT_SEARCH_VISIBLE_ONLY</tt> flag is
present, the match may have invisible text interspersed in
<i class="parameter"><tt>str</tt></i> (i.e. <i class="parameter"><tt>str</tt></i> will be a
possibly-noncontiguous subsequence of the matched range). Likewise, if
<tt class="literal">gtk.TEXT_SEARCH_TEXT_ONLY</tt> is present, the match may have
pixbufs or child anchors mixed inside the matched range. If these flags are
not given, the match must be exact i.e. the special 0xFFFC character in
<i class="parameter"><tt>str</tt></i> will match embedded pixbufs or child
widgets.</p></div><div class="refsect2" lang="en"><a name="method-gtktextiter--backward-search"></a><h3>gtk.TextIter.backward_search</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">backward_search</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>str</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>flags</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>limit</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>str</tt></b>:</span></td><td>a search string</td></tr><tr><td><span class="term"><b class="parameter"><tt>flags</tt></b>:</span></td><td>the flags affecting the
search</td></tr><tr><td><span class="term"><b class="parameter"><tt>limit</tt></b>:</span></td><td>a bound for the search, or
<tt class="literal">None</tt> to set the bound to the end of the
buffer</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>start of match and end of
match</td></tr></tbody></table><p>The <tt class="methodname">backward_search</tt>() method is the
same as the <a href="class-gtktextiter.html#method-gtktextiter--forward-search" title="gtk.TextIter.forward_search"><tt class="methodname">forward_search</tt>()</a>
method, except searches backward.</p></div><div class="refsect2" lang="en"><a name="method-gtktextiter--equal"></a><h3>gtk.TextIter.equal</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">equal</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>rhs</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>rhs</tt></b>:</span></td><td>another <a href="class-gtktextiter.html" title="gtk.TextIter"><tt class="classname">gtk.TextIter</tt></a>
object</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td><tt class="literal">TRUE</tt> if the textiters point
to the same place in the buffer</td></tr></tbody></table><p>The <tt class="methodname">equal</tt>() method tests if the
textiter specified by <i class="parameter"><tt>rhs</tt></i> points to the same location
in the textbuffer as the textiter.</p></div><div class="refsect2" lang="en"><a name="method-gtktextiter--compare"></a><h3>gtk.TextIter.compare</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">compare</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>rhs</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>rhs</tt></b>:</span></td><td>another <a href="class-gtktextiter.html" title="gtk.TextIter"><tt class="classname">gtk.TextIter</tt></a>
object</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>-1 if the textiter location is less than the
<i class="parameter"><tt>rhs</tt></i> location, 1 if the textiter location is greater,
0 if they are equal</td></tr></tbody></table><p>The <tt class="methodname">compare</tt>() method returns:</p><div class="itemizedlist"><ul type="disc"><li>-1 if the textiter location is less than the location of
the textiter specified by <i class="parameter"><tt>rhs</tt></i>;</li><li>1 if the textiter location is greater than the location
of the textiter specified by <i class="parameter"><tt>rhs</tt></i>; and,</li><li>0 if the textiter location is equal to the location of
the textiter specified by <i class="parameter"><tt>rhs</tt></i>.</li></ul></div><p>Ordering is in character offset order, i.e. the first character
in the buffer is less than the second character in the buffer.</p></div><div class="refsect2" lang="en"><a name="method-gtktextiter--in-range"></a><h3>gtk.TextIter.in_range</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">in_range</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 text
range</td></tr><tr><td><span class="term"><b class="parameter"><tt>end</tt></b>:</span></td><td>the end of the text range</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td><tt class="literal">TRUE</tt> if the textiter
location is in the text range</td></tr></tbody></table><p>The <tt class="methodname">in_range</tt>() method returns
<tt class="literal">TRUE</tt> if the textiter location is in the text range
specified by the <a href="class-gtktextiter.html" title="gtk.TextIter"><tt class="classname">gtk.TextIter</tt></a>
objects <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> must be in
ascending order.</p></div><div class="refsect2" lang="en"><a name="method-gtktextiter--order"></a><h3>gtk.TextIter.order</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">order</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>second</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>second</tt></b>:</span></td><td>another <a href="class-gtktextiter.html" title="gtk.TextIter"><tt class="classname">gtk.TextIter</tt></a>
object</td></tr></tbody></table><p>The order() method swaps the locations of
<i class="parameter"><tt>first</tt></i> and <i class="parameter"><tt>second</tt></i> if
<i class="parameter"><tt>second</tt></i> comes before <i class="parameter"><tt>first</tt></i> in
the buffer. This method can be used to ensure that
<i class="parameter"><tt>first</tt></i> and <i class="parameter"><tt>second</tt></i> are in
sequence. Most text buffer methods that take a range call this
automatically, so there's no real reason to call it yourself in those cases.
There are some exceptions, such as the <a href="class-gtktextiter.html#method-gtktextiter--in-range" title="gtk.TextIter.in_range"><tt class="methodname">in_range</tt>()</a>,
that expect a pre-sorted range.</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-gtktextchildanchor.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-gtktextmark.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gtk.TextChildAnchor</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">gtk.TextMark</td></tr></table></div></body></html>
|