/usr/share/gtk-doc/html/pygtk/class-gtktextiter.html is in python-gtk2-doc 2.24.0-4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 | <html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gtk.TextIter</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><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="prev" 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" title="gtk.TextIter"><a name="class-gtktextiter"></a><div class="titlepage"></div><div class="refnamediv"><h2>gtk.TextIter</h2><p>gtk.TextIter — an object pointing at a location in a <a class="link" href="class-gtktextbuffer.html" title="gtk.TextBuffer"><code class="classname">gtk.TextBuffer</code></a></p></div><div class="refsect1" title="Synopsis"><a name="id3952618"></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 class="link" 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 class="link" 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 class="link" 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 class="link" 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 class="link" 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 class="link" 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 class="link" 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 class="link" 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 class="link" 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 class="link" href="class-gtktextiter.html#method-gtktextiter--get-slice" title="gtk.TextIter.get_slice">get_slice</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>end</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtktextiter.html#method-gtktextiter--get-text" title="gtk.TextIter.get_text">get_text</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>end</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtktextiter.html#method-gtktextiter--get-visible-slice" title="gtk.TextIter.get_visible_slice">get_visible_slice</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>end</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtktextiter.html#method-gtktextiter--get-visible-text" title="gtk.TextIter.get_visible_text">get_visible_text</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>end</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-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 class="link" 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 class="link" 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 class="link" 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"><strong class="parameter"><code>toggled_on</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtktextiter.html#method-gtktextiter--begins-tag" title="gtk.TextIter.begins_tag">begins_tag</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>tag</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtktextiter.html#method-gtktextiter--ends-tag" title="gtk.TextIter.ends_tag">ends_tag</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>tag</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtktextiter.html#method-gtktextiter--toggles-tag" title="gtk.TextIter.toggles_tag">toggles_tag</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>tag</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtktextiter.html#method-gtktextiter--has-tag" title="gtk.TextIter.has_tag">has_tag</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>tag</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" 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 class="link" href="class-gtktextiter.html#method-gtktextiter--editable" title="gtk.TextIter.editable">editable</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>default_setting</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtktextiter.html#method-gtktextiter--can-insert" title="gtk.TextIter.can_insert">can_insert</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>default_editability</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" 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 class="link" 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 class="link" 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 class="link" 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 class="link" 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 class="link" 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 class="link" 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 class="link" 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 class="link" 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 class="link" 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 class="link" 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 class="link" href="class-gtktextiter.html#method-gtktextiter--get-attributes" title="gtk.TextIter.get_attributes">get_attributes</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>values</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" 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 class="link" 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 class="link" 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 class="link" 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 class="link" 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 class="link" href="class-gtktextiter.html#method-gtktextiter--forward-chars" title="gtk.TextIter.forward_chars">forward_chars</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>count</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtktextiter.html#method-gtktextiter--backward-chars" title="gtk.TextIter.backward_chars">backward_chars</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>count</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" 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 class="link" 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 class="link" href="class-gtktextiter.html#method-gtktextiter--forward-lines" title="gtk.TextIter.forward_lines">forward_lines</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>count</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtktextiter.html#method-gtktextiter--backward-lines" title="gtk.TextIter.backward_lines">backward_lines</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>count</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" 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"><strong class="parameter"><code>count</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" 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"><strong class="parameter"><code>count</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" 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 class="link" 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 class="link" 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 class="link" 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 class="link" 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"><strong class="parameter"><code>count</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" 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"><strong class="parameter"><code>count</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" 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 class="link" 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 class="link" 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"><strong class="parameter"><code>count</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" 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"><strong class="parameter"><code>count</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" 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"><strong class="parameter"><code>count</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" 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"><strong class="parameter"><code>count</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" 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 class="link" 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 class="link" href="class-gtktextiter.html#method-gtktextiter--forward-visible-cursor-position" title="gtk.TextIter.forward_visible_cursor_position">forward_visible_cursor_position</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtktextiter.html#method-gtktextiter--backward-visible-cursor-position" title="gtk.TextIter.backward_visible_cursor_position">backward_visible_cursor_position</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtktextiter.html#method-gtktextiter--forward-visible-cursor-positions" title="gtk.TextIter.forward_visible_cursor_positions">forward_visible_cursor_positions</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>count</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtktextiter.html#method-gtktextiter--backward-visible-cursor-positions" title="gtk.TextIter.backward_visible_cursor_positions">backward_visible_cursor_positions</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>count</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtktextiter.html#method-gtktextiter--forward-visible-line" title="gtk.TextIter.forward_visible_line">forward_visible_line</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtktextiter.html#method-gtktextiter--backward-visible-line" title="gtk.TextIter.backward_visible_line">backward_visible_line</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtktextiter.html#method-gtktextiter--forward-visible-lines" title="gtk.TextIter.forward_visible_lines">forward_visible_lines</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>count</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtktextiter.html#method-gtktextiter--backward-visible-lines" title="gtk.TextIter.backward_visible_lines">backward_visible_lines</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>count</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtktextiter.html#method-gtktextiter--set-offset" title="gtk.TextIter.set_offset">set_offset</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>char_offset</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtktextiter.html#method-gtktextiter--set-line" title="gtk.TextIter.set_line">set_line</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>line_number</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" 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"><strong class="parameter"><code>char_on_line</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" 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"><strong class="parameter"><code>byte_on_line</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" 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 class="link" 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 class="link" 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"><strong class="parameter"><code>char_on_line</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" 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"><strong class="parameter"><code>byte_on_line</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" 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"><strong class="parameter"><code>tag</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" 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"><strong class="parameter"><code>tag</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" 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"><strong class="parameter"><code>pred</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>limit</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" 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"><strong class="parameter"><code>pred</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>limit</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtktextiter.html#method-gtktextiter--forward-search" title="gtk.TextIter.forward_search">forward_search</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>str</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>limit</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtktextiter.html#method-gtktextiter--backward-search" title="gtk.TextIter.backward_search">backward_search</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>str</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>limit</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtktextiter.html#method-gtktextiter--equal" title="gtk.TextIter.equal">equal</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>rhs</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtktextiter.html#method-gtktextiter--compare" title="gtk.TextIter.compare">compare</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>rhs</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtktextiter.html#method-gtktextiter--in-range" title="gtk.TextIter.in_range">in_range</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>start</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>end</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtktextiter.html#method-gtktextiter--order" title="gtk.TextIter.order">order</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>second</code></strong></span></span>)</code><br></pre></td></tr></table></div><div class="refsect1" title="Description"><a name="id3954927"></a><h2>Description</h2><p>A <a class="link" href="class-gtktextiter.html" title="gtk.TextIter"><code class="classname">gtk.TextIter</code></a>
points to a position between two characters in a <a class="link" href="class-gtktextbuffer.html" title="gtk.TextBuffer"><code class="classname">gtk.TextBuffer</code></a>.
A <a class="link" href="class-gtktextiter.html" title="gtk.TextIter"><code class="classname">gtk.TextIter</code></a> is
usually created using a <a class="link" href="class-gtktextbuffer.html" title="gtk.TextBuffer"><code class="classname">gtk.TextBuffer</code></a>
method and are invalidated when the number of characters in the <a class="link" href="class-gtktextbuffer.html" title="gtk.TextBuffer"><code class="classname">gtk.TextBuffer</code></a>
changes (with some exceptions when inserting or deleting) including
inserting or deleting pixbufs or child anchors. There are a huge number of
<a class="link" href="class-gtktextiter.html" title="gtk.TextIter"><code class="classname">gtk.TextIter</code></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" title="Methods"><a name="id3954989"></a><h2>Methods</h2><div class="refsect2" title="gtk.TextIter.get_buffer"><a name="method-gtktextiter--get-buffer"></a><h3>gtk.TextIter.get_buffer</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_buffer</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the textbuffer</td></tr></tbody></table><p>The <code class="methodname">get_buffer</code>() method returns the
<a class="link" href="class-gtktextbuffer.html" title="gtk.TextBuffer"><code class="classname">gtk.TextBuffer</code></a>
object this iterator is associated with.</p></div><div class="refsect2" title="gtk.TextIter.copy"><a name="method-gtktextiter--copy"></a><h3>gtk.TextIter.copy</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">copy</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a copy of the textiter</td></tr></tbody></table><p>The <code class="methodname">copy</code>() method creates a copy of the
textiter.</p></div><div class="refsect2" title="gtk.TextIter.get_offset"><a name="method-gtktextiter--get-offset"></a><h3>gtk.TextIter.get_offset</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_offset</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a character offset</td></tr></tbody></table><p>The <code class="methodname">get_offset</code>() method returns the
character offset of the textiter. Each character in a <a class="link" href="class-gtktextbuffer.html" title="gtk.TextBuffer"><code class="classname">gtk.TextBuffer</code></a>
has an offset, starting with 0 for the first character in the textbuffer.
Use <a class="link" href="class-gtktextbuffer.html#method-gtktextbuffer--get-iter-at-offset" title="gtk.TextBuffer.get_iter_at_offset"><code class="methodname">gtk.TextBuffer.get_iter_at_offset</code>()</a>
to convert an offset back into a textiter.</p></div><div class="refsect2" title="gtk.TextIter.get_line"><a name="method-gtktextiter--get-line"></a><h3>gtk.TextIter.get_line</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_line</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a line number</td></tr></tbody></table><p>The <code class="methodname">get_line</code>() method returns the line
number containing the textiter. Lines in a <a class="link" href="class-gtktextbuffer.html" title="gtk.TextBuffer"><code class="classname">gtk.TextBuffer</code></a>
are numbered beginning with 0 for the first line.</p></div><div class="refsect2" title="gtk.TextIter.get_line_offset"><a name="method-gtktextiter--get-line-offset"></a><h3>gtk.TextIter.get_line_offset</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_line_offset</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the offset from the start of the
line</td></tr></tbody></table><p>The <code class="methodname">get_line_offset</code>() 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" title="gtk.TextIter.get_line_index"><a name="method-gtktextiter--get-line-index"></a><h3>gtk.TextIter.get_line_index</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_line_index</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the number of bytes from the start of the
line</td></tr></tbody></table><p>The <code class="methodname">get_line_offset</code>() method returns
the byte index of the textiter location, counting from the start of the line
containing the textiter location. Remember that <a class="link" href="class-gtktextbuffer.html" title="gtk.TextBuffer"><code class="classname">gtk.TextBuffer</code></a>
encodes text in UTF-8, and that characters can require a variable number of
bytes to represent.</p></div><div class="refsect2" title="gtk.TextIter.get_visible_line_offset"><a name="method-gtktextiter--get-visible-line-offset"></a><h3>gtk.TextIter.get_visible_line_offset</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_visible_line_offset</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the offset in visible characters from the start
of the line</td></tr></tbody></table><p>The <code class="methodname">get_visible_line_offset</code>() 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" title="gtk.TextIter.get_visible_line_index"><a name="method-gtktextiter--get-visible-line-index"></a><h3>gtk.TextIter.get_visible_line_index</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_visible_line_index</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a byte index from the start of the
line</td></tr></tbody></table><p>The <code class="methodname">get_visible_line_index</code>() 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" title="gtk.TextIter.get_char"><a name="method-gtktextiter--get-char"></a><h3>gtk.TextIter.get_char</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_char</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a Unicode character, or \0 character if the textiter is
not dereferenceable</td></tr></tbody></table><p>The <code class="methodname">get_char</code>() 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, the null
character is returned; \0 is not a valid Unicode character. So you can write a loop
which ends when the <a class="link" href="class-gtktextiter.html#method-gtktextiter--get-char" title="gtk.TextIter.get_char"><code class="methodname">get_char</code>()</a>
method returns \0.</p></div><div class="refsect2" title="gtk.TextIter.get_slice"><a name="method-gtktextiter--get-slice"></a><h3>gtk.TextIter.get_slice</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_slice</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>end</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>end</code></strong> :</span></p></td><td>the textiter at the end of a
range</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a slice of text from the
textbuffer</td></tr></tbody></table><p>The <code class="methodname">get_slice</code>() method returns the text
in the range between the locations specified by the textiter and
<em class="parameter"><code>end</code></em>. 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" title="gtk.TextIter.get_text"><a name="method-gtktextiter--get-text"></a><h3>gtk.TextIter.get_text</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_text</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>end</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>end</code></strong> :</span></p></td><td>textiter at end of a range</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>array of characters from the
buffer</td></tr></tbody></table><p>The <code class="methodname">get_text</code>() method returns the text
in the range between the locations specified by the textiter and
<em class="parameter"><code>end</code></em>. 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 class="link" href="class-gtktextiter.html#method-gtktextiter--get-slice" title="gtk.TextIter.get_slice"><code class="methodname">get_slice</code>()</a>
method.</p></div><div class="refsect2" title="gtk.TextIter.get_visible_slice"><a name="method-gtktextiter--get-visible-slice"></a><h3>gtk.TextIter.get_visible_slice</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_visible_slice</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>end</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>end</code></strong> :</span></p></td><td>textiter at end of range</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a slice of visible text from the
textbuffer</td></tr></tbody></table><p>The <code class="methodname">get_visible_slice</code>() method is
similar to the <a class="link" href="class-gtktextiter.html#method-gtktextiter--get-slice" title="gtk.TextIter.get_slice"><code class="methodname">get_slice</code>()</a>
method, but invisible text is excluded. Invisible text is text with the
"invisible" attribute set on it.</p></div><div class="refsect2" title="gtk.TextIter.get_visible_text"><a name="method-gtktextiter--get-visible-text"></a><h3>gtk.TextIter.get_visible_text</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_visible_text</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>end</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>end</code></strong> :</span></p></td><td>textiter at end of range</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a string containing visible text from the
textbuffer</td></tr></tbody></table><p>The <code class="methodname">get_visible_text</code>() method is
similar to the <a class="link" href="class-gtktextiter.html#method-gtktextiter--get-text" title="gtk.TextIter.get_text"><code class="methodname">get_text</code>()</a>,
but invisible text is excluded. Invisible text is text with the "invisible"
attribute set on it.</p></div><div class="refsect2" title="gtk.TextIter.get_pixbuf"><a name="method-gtktextiter--get-pixbuf"></a><h3>gtk.TextIter.get_pixbuf</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_pixbuf</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a pixbuf or
<code class="literal">None</code></td></tr></tbody></table><p>The <code class="methodname">get_pixbuf</code>() method returns the
<a class="link" href="class-gdkpixbuf.html" title="gtk.gdk.Pixbuf"><code class="classname">gtk.gdk.Pixbuf</code></a>
object at the textiter location, if any; otherwise, <code class="literal">None</code>
is returned.</p></div><div class="refsect2" title="gtk.TextIter.get_marks"><a name="method-gtktextiter--get-marks"></a><h3>gtk.TextIter.get_marks</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_marks</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a list of <a class="link" href="class-gtktextmark.html" title="gtk.TextMark"><code class="classname">gtk.TextMark</code></a>
objects</td></tr></tbody></table><p>The <code class="methodname">get_marks</code>() method returns a list
of all <a class="link" href="class-gtktextmark.html" title="gtk.TextMark"><code class="classname">gtk.TextMark</code></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" title="gtk.TextIter.get_child_anchor"><a name="method-gtktextiter--get-child-anchor"></a><h3>gtk.TextIter.get_child_anchor</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_child_anchor</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a child anchor or
<code class="literal">None</code></td></tr></tbody></table><p>The <code class="methodname">get_child_anchor</code>() method returns
the <a class="link" href="class-gtktextchildanchor.html" title="gtk.TextChildAnchor"><code class="classname">gtk.TextChildAnchor</code></a>
at the textiter location, if any; otherwise, <code class="literal">None</code> is
returned.</p></div><div class="refsect2" title="gtk.TextIter.get_toggled_tags"><a name="method-gtktextiter--get-toggled-tags"></a><h3>gtk.TextIter.get_toggled_tags</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_toggled_tags</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>toggled_on</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>toggled_on</code></strong> :</span></p></td><td>if <code class="literal">True</code> get toggled-on tags;
otherwise get toggle-off tags</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a list of tags toggled at this
point</td></tr></tbody></table><p>The <code class="methodname">get_toggled_tags</code>() method returns a
list of <a class="link" href="class-gtktexttag.html" title="gtk.TextTag"><code class="classname">gtk.TextTag</code></a> objects
that are toggled on or off at this point. If
<em class="parameter"><code>toggled_on</code></em> is <code class="literal">True</code>, 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" title="gtk.TextIter.begins_tag"><a name="method-gtktextiter--begins-tag"></a><h3>gtk.TextIter.begins_tag</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">begins_tag</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>tag</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>tag</code></strong> :</span></p></td><td>a <a class="link" href="class-gtktexttag.html" title="gtk.TextTag"><code class="classname">gtk.TextTag</code></a>, or
<code class="literal">None</code></td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the textiter is the
start of a range tagged with <em class="parameter"><code>tag</code></em></td></tr></tbody></table><p>The <code class="methodname">begins_tag</code>() method returns
<code class="literal">True</code> if <em class="parameter"><code>tag</code></em> is toggled on at
exactly this point. If <em class="parameter"><code>tag</code></em> is
<code class="literal">None</code>, this method returns <code class="literal">True</code> if any
tag is toggled on at this point. Note that the<code class="methodname">
begins_tag</code>() method returns <code class="literal">True</code> only if the
textiter location is the <span class="emphasis"><em>start</em></span> of the tagged range; the
<a class="link" href="class-gtktextiter.html#method-gtktextiter--has-tag" title="gtk.TextIter.has_tag"><code class="methodname">has_tag</code>()</a>
indicates if a textiter location is <span class="emphasis"><em>within</em></span> a tagged
range.</p></div><div class="refsect2" title="gtk.TextIter.ends_tag"><a name="method-gtktextiter--ends-tag"></a><h3>gtk.TextIter.ends_tag</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">ends_tag</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>tag</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>tag</code></strong> :</span></p></td><td>a <a class="link" href="class-gtktexttag.html" title="gtk.TextTag"><code class="classname">gtk.TextTag</code></a>, or
<code class="literal">None</code></td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the textiter is the
end of a range tagged with <em class="parameter"><code>tag</code></em></td></tr></tbody></table><p>The <code class="methodname">ends_tag</code>() method returns
<code class="literal">True</code> if <em class="parameter"><code>tag</code></em> is toggled off at the
location the textiter points to. If <em class="parameter"><code>tag</code></em> is
<code class="literal">None</code>, this method returns <code class="literal">True</code> if any
tag is toggled off at this point. Note that the
<code class="methodname">ends_tag</code>() returns <code class="literal">True</code> only if
the textiter location is the <span class="emphasis"><em>end</em></span> of the tagged range;
the <a class="link" href="class-gtktextiter.html#method-gtktextiter--has-tag" title="gtk.TextIter.has_tag"><code class="methodname">has_tag</code>()</a>
indicates if a textiter location is <span class="emphasis"><em>within</em></span> a tagged
range.</p></div><div class="refsect2" title="gtk.TextIter.toggles_tag"><a name="method-gtktextiter--toggles-tag"></a><h3>gtk.TextIter.toggles_tag</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">toggles_tag</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>tag</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>tag</code></strong> :</span></p></td><td>a <a class="link" href="class-gtktexttag.html" title="gtk.TextTag"><code class="classname">gtk.TextTag</code></a>, or
<code class="literal">None</code></td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if
<em class="parameter"><code>tag</code></em> is toggled on or off at the textiter
location</td></tr></tbody></table><p>The <code class="methodname">toggles_tag</code>() method returns
<code class="literal">True</code> if a range of text with <em class="parameter"><code>tag</code></em>
applied to it begins <span class="emphasis"><em>or</em></span> ends at the textiter location.
If <em class="parameter"><code>tag</code></em> is <code class="literal">None</code> this method returns
<code class="literal">True</code> if any tag begins or ends at the textiter
location.</p></div><div class="refsect2" title="gtk.TextIter.has_tag"><a name="method-gtktextiter--has-tag"></a><h3>gtk.TextIter.has_tag</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">has_tag</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>tag</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>tag</code></strong> :</span></p></td><td>a <a class="link" href="class-gtktexttag.html" title="gtk.TextTag"><code class="classname">gtk.TextTag</code></a></td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the textiter
location is tagged with <em class="parameter"><code>tag</code></em></td></tr></tbody></table><p>The <code class="methodname">has_tag</code>() method returns
<code class="literal">True</code> if the textiter location is within a range of text
tagged with <em class="parameter"><code>tag</code></em>.</p></div><div class="refsect2" title="gtk.TextIter.get_tags"><a name="method-gtktextiter--get-tags"></a><h3>gtk.TextIter.get_tags</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_tags</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a list of <a class="link" href="class-gtktexttag.html" title="gtk.TextTag"><code class="classname">gtk.TextTag</code></a>
objects</td></tr></tbody></table><p>The <code class="methodname">get_tags</code>() 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" title="gtk.TextIter.editable"><a name="method-gtktextiter--editable"></a><h3>gtk.TextIter.editable</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">editable</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>default_setting</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>default_setting</code></strong> :</span></p></td><td>if <code class="literal">True</code> the text is editable
by default</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the textiter
location is inside an editable range or text</td></tr></tbody></table><p>The <code class="methodname">editable</code>() method returns
<code class="literal">True</code> 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 class="link" href="class-gtktextview.html" title="gtk.TextView"><code class="classname">gtk.TextView</code></a>. This
method is a convenience wrapper around the <a class="link" href="class-gtktextiter.html#method-gtktextiter--get-attributes" title="gtk.TextIter.get_attributes"><code class="methodname">get_attributes</code>()</a>
method. If no tags applied to this text location affect editability, the
value of <em class="parameter"><code>default_setting</code></em> 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 class="link" href="class-gtktextiter.html#method-gtktextiter--can-insert" title="gtk.TextIter.can_insert"><code class="methodname">can_insert</code>()</a>
method to determine if text can be inserted.</p></div><div class="refsect2" title="gtk.TextIter.can_insert"><a name="method-gtktextiter--can-insert"></a><h3>gtk.TextIter.can_insert</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">can_insert</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>default_editability</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>default_editability</code></strong> :</span></p></td><td>if <code class="literal">True</code> the text is editable
by default</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if text inserted at
<em class="parameter"><code>iter</code></em> would be editable</td></tr></tbody></table><p>The <code class="methodname">can_insert</code>() 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 class="link" href="class-gtktextbuffer.html#method-gtktextbuffer--insert-interactive" title="gtk.TextBuffer.insert_interactive"><code class="methodname">gtk.TextBuffer.insert_interactive</code>()</a>
uses this function to determine if insertions are allowed at a given
position.</p></div><div class="refsect2" title="gtk.TextIter.starts_word"><a name="method-gtktextiter--starts-word"></a><h3>gtk.TextIter.starts_word</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">starts_word</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the textiter
location is at the start of a word</td></tr></tbody></table><p>The <code class="methodname">starts_word</code>() method returns
<code class="literal">True</code> 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" title="gtk.TextIter.ends_word"><a name="method-gtktextiter--ends-word"></a><h3>gtk.TextIter.ends_word</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">ends_word</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the textiter
location is at the end of a word</td></tr></tbody></table><p>The <code class="methodname">ends_word</code>() method returns
<code class="literal">True</code> 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" title="gtk.TextIter.inside_word"><a name="method-gtktextiter--inside-word"></a><h3>gtk.TextIter.inside_word</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">inside_word</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the textiter
location is inside a word</td></tr></tbody></table><p>The <code class="methodname">inside_word</code>() method returns
<code class="literal">True</code> 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" title="gtk.TextIter.starts_sentence"><a name="method-gtktextiter--starts-sentence"></a><h3>gtk.TextIter.starts_sentence</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">starts_sentence</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the textiter
location is at the start of a sentence.</td></tr></tbody></table><p>The <code class="methodname">starts_sentence</code>() method returns
<code class="literal">True</code> 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" title="gtk.TextIter.ends_sentence"><a name="method-gtktextiter--ends-sentence"></a><h3>gtk.TextIter.ends_sentence</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">ends_sentence</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the textiter
location is at the end of a sentence.</td></tr></tbody></table><p>The <code class="methodname">ends_sentence</code>() method returns
<code class="literal">True</code> 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" title="gtk.TextIter.inside_sentence"><a name="method-gtktextiter--inside-sentence"></a><h3>gtk.TextIter.inside_sentence</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">inside_sentence</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the textiter
location is inside a sentence.</td></tr></tbody></table><p>The <code class="methodname">inside_sentence</code>() method returns
<code class="literal">True</code> 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" title="gtk.TextIter.starts_line"><a name="method-gtktextiter--starts-line"></a><h3>gtk.TextIter.starts_line</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">starts_line</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the textiter
location begins a line</td></tr></tbody></table><p>The <code class="methodname">starts_line</code>() method returns
<code class="literal">True</code> if the textiter location begins a paragraph, i.e. if
the <a class="link" href="class-gtktextiter.html#method-gtktextiter--get-line-offset" title="gtk.TextIter.get_line_offset"><code class="methodname">.get_line_offset</code>()</a>
method would return 0.</p></div><div class="refsect2" title="gtk.TextIter.ends_line"><a name="method-gtktextiter--ends-line"></a><h3>gtk.TextIter.ends_line</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">ends_line</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the textiter
location is at the end of a line</td></tr></tbody></table><p>The <code class="methodname">ends_line</code>() method returns
<code class="literal">True</code> 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" title="gtk.TextIter.is_cursor_position"><a name="method-gtktextiter--is-cursor-position"></a><h3>gtk.TextIter.is_cursor_position</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">is_cursor_position</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the cursor can be
placed at the textiter location</td></tr></tbody></table><p>The <code class="methodname">is_cursor_position</code>() method returns
<code class="literal">True</code> if the cursor can be placed at the textiter
location. See the <a class="link" href="class-gtktextiter.html#method-gtktextiter--forward-cursor-position" title="gtk.TextIter.forward_cursor_position"><code class="methodname">forward_cursor_position</code>()</a>
method for details on what a cursor position is.</p></div><div class="refsect2" title="gtk.TextIter.get_chars_in_line"><a name="method-gtktextiter--get-chars-in-line"></a><h3>gtk.TextIter.get_chars_in_line</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_chars_in_line</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the number of characters in the
line</td></tr></tbody></table><p>The <code class="methodname">get_chars_in_line</code>() method returns
the number of characters in the line containing the textiter location,
including the paragraph delimiters.</p></div><div class="refsect2" title="gtk.TextIter.get_bytes_in_line"><a name="method-gtktextiter--get-bytes-in-line"></a><h3>gtk.TextIter.get_bytes_in_line</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_bytes_in_line</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the number of bytes in the
line</td></tr></tbody></table><p>The <code class="methodname">get_bytes_in_line</code>() method returns
the number of bytes in the line containing the textiter location, including
the paragraph delimiters.</p></div><div class="refsect2" title="gtk.TextIter.get_attributes"><a name="method-gtktextiter--get-attributes"></a><h3>gtk.TextIter.get_attributes</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_attributes</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>values</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>values</code></strong> :</span></p></td><td>a <a class="link" href="class-gtktextattributes.html" title="gtk.TextAttributes"><code class="classname">gtk.TextAttributes</code></a>
object to be filled in</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if
<em class="parameter"><code>values</code></em> was modified</td></tr></tbody></table><p>The <code class="methodname">get_attributes</code>() method computes
the effect of any tags applied to the textiter location and applies those
attributes to the <a class="link" href="class-gtktextattributes.html" title="gtk.TextAttributes"><code class="classname">gtk.TextAttributes</code></a>
object specified by <em class="parameter"><code>values</code></em> (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 class="link" href="class-gtktextview.html#method-gtktextview--get-default-attributes" title="gtk.TextView.get_default_attributes"><code class="methodname">gtk.TextView.get_default_attributes</code>()</a>
method. If any tags affected <em class="parameter"><code>values</code></em>, the method
returns <code class="literal">True</code>.</p></div><div class="refsect2" title="gtk.TextIter.get_language"><a name="method-gtktextiter--get-language"></a><h3>gtk.TextIter.get_language</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_language</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the pango language in effect at the textiter
location</td></tr></tbody></table><p>The <code class="methodname">get_language</code>() method is a
convenience wrapper around the <a class="link" href="class-gtktextiter.html#method-gtktextiter--get-attributes" title="gtk.TextIter.get_attributes"><code class="methodname">get_attributes</code>()</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 <code class="function">gtk.get_default_language()</code>
function.</p></div><div class="refsect2" title="gtk.TextIter.is_end"><a name="method-gtktextiter--is-end"></a><h3>gtk.TextIter.is_end</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">is_end</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the textiter is the
end textiter</td></tr></tbody></table><p>The <code class="methodname">is_end</code>() method returns
<code class="literal">True</code> if the textiter is the end textiter, i.e. one past
the last dereferenceable textiter in the buffer. The
<code class="methodname">is_end</code>() method is the most efficient way to check
whether an textiter is the end textiter.</p></div><div class="refsect2" title="gtk.TextIter.is_start"><a name="method-gtktextiter--is-start"></a><h3>gtk.TextIter.is_start</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">is_start</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the textiter
location is at the start of the textbuffer</td></tr></tbody></table><p>The <code class="methodname">is_start</code>() method returns
<code class="literal">True</code> 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" title="gtk.TextIter.forward_char"><a name="method-gtktextiter--forward-char"></a><h3>gtk.TextIter.forward_char</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">forward_char</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the textiter
location moved and is dereferenceable</td></tr></tbody></table><p>The <code class="methodname">forward_char</code>() method moves the
textiter location forward by one character offset and returns
<code class="literal">True</code> if the textiter location moved and the new location
is dereferenceable. Note that images embedded in the buffer occupy 1
character slot, so the <code class="methodname">forward_char</code>() 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
<code class="methodname">forward_char</code>() method returns
<code class="literal">False</code>.</p></div><div class="refsect2" title="gtk.TextIter.backward_char"><a name="method-gtktextiter--backward-char"></a><h3>gtk.TextIter.backward_char</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">backward_char</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>True if the textiter location moved and is
not the start textiter</td></tr></tbody></table><p>The <code class="methodname">backward_char</code>() method moves the
textiter location backward by one character offset and returns
<code class="literal">True</code> if the textiter location moved. If the old textiter
location was the first in the buffer (character offset 0), the
<code class="methodname">backward_char</code>() method returns
<code class="literal">False</code>.</p></div><div class="refsect2" title="gtk.TextIter.forward_chars"><a name="method-gtktextiter--forward-chars"></a><h3>gtk.TextIter.forward_chars</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">forward_chars</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>count</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>count</code></strong> :</span></p></td><td>the number of characters to move, may be
negative</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the textiter
location moved and is dereferenceable</td></tr></tbody></table><p>The <code class="methodname">forward_chars</code>() method moves the
textiter location forward <em class="parameter"><code>count</code></em> 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
<code class="methodname">forward_chars</code>() method returns
<code class="literal">True</code> 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
<em class="parameter"><code>count</code></em> is 0, the function does nothing and returns
<code class="literal">False</code>.</p></div><div class="refsect2" title="gtk.TextIter.backward_chars"><a name="method-gtktextiter--backward-chars"></a><h3>gtk.TextIter.backward_chars</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">backward_chars</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>count</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>count</code></strong> :</span></p></td><td>the number of characters to move, may be
negative</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the textiter
location moved and is dereferenceable</td></tr></tbody></table><p>The <code class="methodname">backward_chars</code>() method moves the
textiter location backward forward <em class="parameter"><code>count</code></em> 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
<code class="methodname">backward_chars</code>() method returns
<code class="literal">True</code> 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
<em class="parameter"><code>count</code></em> is 0, the function does nothing and returns
<code class="literal">False</code>.</p></div><div class="refsect2" title="gtk.TextIter.forward_line"><a name="method-gtktextiter--forward-line"></a><h3>gtk.TextIter.forward_line</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">forward_line</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the textiter
location can be dereferenced</td></tr></tbody></table><p>The <code class="methodname">forward_line</code>() method moves the
textiter location to the start of the next line and returns
<code class="literal">True</code> if the textiter location moved to a dereferenceable
position, and <code class="literal">False</code> 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" title="gtk.TextIter.backward_line"><a name="method-gtktextiter--backward-line"></a><h3>gtk.TextIter.backward_line</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">backward_line</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the textiter
location moved</td></tr></tbody></table><p>The <code class="methodname">backward_line</code>() method moves the
textiter location to the start of the previous line and returns
<code class="literal">True</code> if the textiter location was moved. If the textiter
location was at the textbuffer start, this method returns
<code class="literal">False</code>. 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
<code class="literal">True</code>.</p></div><div class="refsect2" title="gtk.TextIter.forward_lines"><a name="method-gtktextiter--forward-lines"></a><h3>gtk.TextIter.forward_lines</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">forward_lines</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>count</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>count</code></strong> :</span></p></td><td>the number of lines to move forward, may be
negative</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the textiter
location moved and is dereferenceable</td></tr></tbody></table><p>The <code class="methodname">forward_lines</code>() method moves the
textiter location forward <em class="parameter"><code>count</code></em> 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 class="itemizedlist" type="disc"><li class="listitem"><code class="literal">True</code> if the textiter moved to a
dereferenceable position; or,</li><li class="listitem"><code class="literal">False</code> if the textiter location didn't
move, or moved onto the end textiter or if <em class="parameter"><code>count</code></em> was
0.</li></ul></div><p>If <em class="parameter"><code>count</code></em> is negative, the textiter
location moves backward by <em class="parameter"><code>count</code></em> lines.</p></div><div class="refsect2" title="gtk.TextIter.backward_lines"><a name="method-gtktextiter--backward-lines"></a><h3>gtk.TextIter.backward_lines</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">backward_lines</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>count</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>count</code></strong> :</span></p></td><td>the number of lines to move backward, may be
negative</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the textiter
location moved to a dereferenceable position</td></tr></tbody></table><p>The <code class="methodname">backward_lines</code>() method moves the
textiter location backward by <em class="parameter"><code>count</code></em> 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 class="itemizedlist" type="disc"><li class="listitem"><code class="literal">True</code> if the textiter moved to a
dereferenceable position; or,</li><li class="listitem"><code class="literal">False</code> if the textiter location didn't
move, or moved onto the end textiter or if <em class="parameter"><code>count</code></em> was
0.</li></ul></div><p>If <em class="parameter"><code>count</code></em> is negative, the textiter
location moves forward by <em class="parameter"><code>count</code></em> lines.</p></div><div class="refsect2" title="gtk.TextIter.forward_word_ends"><a name="method-gtktextiter--forward-word-ends"></a><h3>gtk.TextIter.forward_word_ends</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">forward_word_ends</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>count</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>count</code></strong> :</span></p></td><td>the number of times to
move</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the textiter
location moved and is not the end textiter</td></tr></tbody></table><p>The <code class="methodname">forward_word_ends</code>() method calls
the <a class="link" href="class-gtktextiter.html#method-gtktextiter--forward-word-end" title="gtk.TextIter.forward_word_end"><code class="methodname">forward_word_end</code>()</a>
method up to <em class="parameter"><code>count</code></em> times or the <a class="link" href="class-gtktextiter.html#method-gtktextiter--backward-word-starts" title="gtk.TextIter.backward_word_starts"><code class="methodname">backward_word_starts</code>()</a>
method if <em class="parameter"><code>count</code></em> is negative. The method returns
<code class="literal">True</code> if the textiter location changed and the resulting
location is not at the end of the textbuffer.</p></div><div class="refsect2" title="gtk.TextIter.backward_word_starts"><a name="method-gtktextiter--backward-word-starts"></a><h3>gtk.TextIter.backward_word_starts</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">backward_word_starts</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>count</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>count</code></strong> :</span></p></td><td>the number of times to
move</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the textiter
location moved and is not the end textiter</td></tr></tbody></table><p>The <code class="methodname">backward_word_starts(</code>) method calls the
<a class="link" href="class-gtktextiter.html#method-gtktextiter--backward-word-start" title="gtk.TextIter.backward_word_start"><code class="methodname">backward_word_start</code>()</a>
method up to <em class="parameter"><code>count</code></em> times or the <a class="link" href="class-gtktextiter.html#method-gtktextiter--forward-word-ends" title="gtk.TextIter.forward_word_ends"><code class="methodname">forward_word_ends</code>()</a>
method if <em class="parameter"><code>count</code></em> is negative. The method returns
<code class="literal">True</code> if the textiter location changed and the resulting
location is not at the end of the textbuffer.</p></div><div class="refsect2" title="gtk.TextIter.forward_word_end"><a name="method-gtktextiter--forward-word-end"></a><h3>gtk.TextIter.forward_word_end</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">forward_word_end</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the textiter
location moved to a dereferenceable position</td></tr></tbody></table><p>The <code class="methodname">forward_word_end</code>() 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" title="gtk.TextIter.backward_word_start"><a name="method-gtktextiter--backward-word-start"></a><h3>gtk.TextIter.backward_word_start</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">backward_word_start</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the textiter
location moved</td></tr></tbody></table><p>The <code class="methodname">backward_word_start</code>() 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 <code class="literal">True</code> if
the textiter location moved.</p></div><div class="refsect2" title="gtk.TextIter.forward_cursor_position"><a name="method-gtktextiter--forward-cursor-position"></a><h3>gtk.TextIter.forward_cursor_position</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">forward_cursor_position</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if we moved and the new
position is dereferenceable</td></tr></tbody></table><p>The <code class="methodname">forward_cursor_position</code>() 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 <code class="literal">True</code> if the textiter location changed and the
resulting location is not at the end of the textbuffer.</p></div><div class="refsect2" title="gtk.TextIter.backward_cursor_position"><a name="method-gtktextiter--backward-cursor-position"></a><h3>gtk.TextIter.backward_cursor_position</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">backward_cursor_position</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if we moved and the new
position is dereferenceable</td></tr></tbody></table><p>The <code class="methodname">backward_cursor_position</code>() method
is similar to the <a class="link" href="class-gtktextiter.html#method-gtktextiter--forward-cursor-position" title="gtk.TextIter.forward_cursor_position"><code class="methodname">forward_cursor_position</code>()</a>
method, except the location moves backward.</p></div><div class="refsect2" title="gtk.TextIter.forward_cursor_positions"><a name="method-gtktextiter--forward-cursor-positions"></a><h3>gtk.TextIter.forward_cursor_positions</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">forward_cursor_positions</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>count</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>count</code></strong> :</span></p></td><td>the number of positions to
move</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the textiter
location moved and the new position is dereferenceable</td></tr></tbody></table><p>The <code class="methodname">forward_cursor_positions</code>() method
moves up to <em class="parameter"><code>count</code></em> cursor positions. See the <a class="link" href="class-gtktextiter.html#method-gtktextiter--forward-cursor-position" title="gtk.TextIter.forward_cursor_position"><code class="methodname">forward_cursor_position</code>()</a>
method for more details. The method returns <code class="literal">True</code> if the
textiter moved to a dereferenceable location.</p></div><div class="refsect2" title="gtk.TextIter.backward_cursor_positions"><a name="method-gtktextiter--backward-cursor-positions"></a><h3>gtk.TextIter.backward_cursor_positions</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">backward_cursor_positions</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>count</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>count</code></strong> :</span></p></td><td>the number of positions to
move</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the textiter
location moved and the new position is dereferenceable</td></tr></tbody></table><p>The <code class="methodname">backward_cursor_positions</code>() method
moves the textiter location up to <em class="parameter"><code>count</code></em> cursor
positions. See the <a class="link" href="class-gtktextiter.html#method-gtktextiter--forward-cursor-position" title="gtk.TextIter.forward_cursor_position"><code class="methodname">forward_cursor_position</code>()</a>
method for details.</p></div><div class="refsect2" title="gtk.TextIter.backward_sentence_start"><a name="method-gtktextiter--backward-sentence-start"></a><h3>gtk.TextIter.backward_sentence_start</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">backward_sentence_start</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the textiter
location moved</td></tr></tbody></table><p>The <code class="methodname">backward_sentence_start</code>() 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" title="gtk.TextIter.forward_sentence_end"><a name="method-gtktextiter--forward-sentence-end"></a><h3>gtk.TextIter.forward_sentence_end</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">forward_sentence_end</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the textiter
location moved and is not the end textiter</td></tr></tbody></table><p>The <code class="methodname">forward_sentence_end</code>() 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 <code class="literal">True</code>
if the textiter location changed and the resulting location is not at the
end of the textbuffer.</p></div><div class="refsect2" title="gtk.TextIter.backward_sentence_starts"><a name="method-gtktextiter--backward-sentence-starts"></a><h3>gtk.TextIter.backward_sentence_starts</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">backward_sentence_starts</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>count</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>count</code></strong> :</span></p></td><td>the number of sentences to
move</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the textiter
location moved and is not the end textiter</td></tr></tbody></table><p>The <code class="methodname">backward_sentence_starts</code>() method
calls the <a class="link" href="class-gtktextiter.html#method-gtktextiter--backward-sentence-start" title="gtk.TextIter.backward_sentence_start"><code class="methodname">backward_sentence_start</code>()</a>
method (or the <a class="link" href="class-gtktextiter.html#method-gtktextiter--forward-sentence-end" title="gtk.TextIter.forward_sentence_end"><code class="methodname">forward_sentence_end</code>()</a>()
method if count is negative) up to <em class="parameter"><code>count</code></em> times, or
until it returns <code class="literal">False</code>. If <em class="parameter"><code>count</code></em>
is negative, the location moves forward instead of backward. The method
returns <code class="literal">True</code> if the textiter location changed and the
resulting location is not at the end of the textbuffer.</p></div><div class="refsect2" title="gtk.TextIter.forward_sentence_ends"><a name="method-gtktextiter--forward-sentence-ends"></a><h3>gtk.TextIter.forward_sentence_ends</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">forward_sentence_ends</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>count</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>count</code></strong> :</span></p></td><td>the number of sentences to
move</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the textiter
location moved and is not the end textiter</td></tr></tbody></table><p>The <code class="methodname">forward_sentence_ends</code>() method
calls the <a class="link" href="class-gtktextiter.html#method-gtktextiter--forward-sentence-end" title="gtk.TextIter.forward_sentence_end"><code class="methodname">forward_sentence_end</code>()</a>
method <em class="parameter"><code>count</code></em> times (or until the <a class="link" href="class-gtktextiter.html#method-gtktextiter--forward-sentence-end" title="gtk.TextIter.forward_sentence_end"><code class="methodname">forward_sentence_end</code>()</a>
method returns <code class="literal">False</code>). If <em class="parameter"><code>count</code></em> is
negative, the location moves backward instead of forward. The method returns
<code class="literal">True</code> if the textiter location changed and the resulting
location is not at the end of the textbuffer.</p></div><div class="refsect2" title="gtk.TextIter.forward_visible_word_ends"><a name="method-gtktextiter--forward-visible-word-ends"></a><h3>gtk.TextIter.forward_visible_word_ends</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">forward_visible_word_ends</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>count</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>count</code></strong> :</span></p></td><td>the number of times to move</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the textiter moved
and is not the end iterator</td></tr></tbody></table><div class="note" title="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 <code class="methodname">forward_visible_word_ends</code>() method
calls the <a class="link" href="class-gtktextiter.html#method-gtktextiter--forward-visible-word-end" title="gtk.TextIter.forward_visible_word_end"><code class="methodname">forward_visible_word_end()</code></a>
method the number of times specified by <em class="parameter"><code>count</code></em>.</p></div><div class="refsect2" title="gtk.TextIter.backward_visible_word_starts"><a name="method-gtktextiter--backward-visible-word-starts"></a><h3>gtk.TextIter.backward_visible_word_starts</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">backward_visible_word_starts</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>count</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>count</code></strong> :</span></p></td><td>the number of times to move</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the textiter moved
and is not the end iterator</td></tr></tbody></table><div class="note" title="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 <code class="methodname">backward_visible_word_starts</code>()
method calls the <a class="link" href="class-gtktextiter.html#method-gtktextiter--backward-visible-word-start" title="gtk.TextIter.backward_visible_word_start"><code class="methodname">backward_visible_word_start()</code></a>
method the number of times specified by <em class="parameter"><code>count</code></em>.</p></div><div class="refsect2" title="gtk.TextIter.forward_visible_word_end"><a name="method-gtktextiter--forward-visible-word-end"></a><h3>gtk.TextIter.forward_visible_word_end</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">forward_visible_word_end</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the textiter moved
and is not the end iterator</td></tr></tbody></table><div class="note" title="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 <code class="methodname">forward_visible_word_end</code>() 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" title="gtk.TextIter.backward_visible_word_start"><a name="method-gtktextiter--backward-visible-word-start"></a><h3>gtk.TextIter.backward_visible_word_start</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">backward_visible_word_start</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the textiter moved
and is not the end iterator</td></tr></tbody></table><div class="note" title="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 <code class="methodname">backward_visible_word_start</code>()
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" title="gtk.TextIter.forward_visible_cursor_position"><a name="method-gtktextiter--forward-visible-cursor-position"></a><h3>gtk.TextIter.forward_visible_cursor_position</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">forward_visible_cursor_position</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if we moved and the new
position is dereferenceable</td></tr></tbody></table><div class="note" title="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 <code class="methodname">forward_visible_cursor_position</code>()
method moves the textiter location forward by a single visible 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 <code class="literal">True</code> if the textiter
location changed and the resulting location is not at the end of the
textbuffer.</p></div><div class="refsect2" title="gtk.TextIter.backward_visible_cursor_position"><a name="method-gtktextiter--backward-visible-cursor-position"></a><h3>gtk.TextIter.backward_visible_cursor_position</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">backward_visible_cursor_position</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if we moved and the new
position is dereferenceable</td></tr></tbody></table><div class="note" title="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 <code class="methodname">backward_visible_cursor_position</code>()
method is similar to the <a class="link" href="class-gtktextiter.html#method-gtktextiter--forward-visible-cursor-position" title="gtk.TextIter.forward_visible_cursor_position"><code class="methodname">forward_visible_cursor_position</code>()</a>
method, except the location moves backward.</p></div><div class="refsect2" title="gtk.TextIter.forward_visible_cursor_positions"><a name="method-gtktextiter--forward-visible-cursor-positions"></a><h3>gtk.TextIter.forward_visible_cursor_positions</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">forward_visible_cursor_positions</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>count</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>count</code></strong> :</span></p></td><td>the number of positions to
move</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the textiter
location moved and the new position is dereferenceable</td></tr></tbody></table><div class="note" title="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 <code class="methodname">forward_visible_cursor_positions</code>()
method moves up to <em class="parameter"><code>count</code></em> visible cursor
positions. See the <a class="link" href="class-gtktextiter.html#method-gtktextiter--forward-visible-cursor-position" title="gtk.TextIter.forward_visible_cursor_position"><code class="methodname">forward_visible_cursor_position</code>()</a>
method for more details. The method returns <code class="literal">True</code> if the
textiter moved to a dereferenceable location.</p></div><div class="refsect2" title="gtk.TextIter.backward_visible_cursor_positions"><a name="method-gtktextiter--backward-visible-cursor-positions"></a><h3>gtk.TextIter.backward_visible_cursor_positions</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">backward_visible_cursor_positions</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>count</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>count</code></strong> :</span></p></td><td>the number of positions to
move</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the textiter
location moved and the new position is dereferenceable</td></tr></tbody></table><div class="note" title="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 <code class="methodname">backward_visible_cursor_positions</code>()
method moves the textiter location up to <em class="parameter"><code>count</code></em>
visible cursor positions. See the <a class="link" href="class-gtktextiter.html#method-gtktextiter--forward-visible-cursor-position" title="gtk.TextIter.forward_visible_cursor_position"><code class="methodname">forward_visible_cursor_position</code>()</a>
method for details.</p></div><div class="refsect2" title="gtk.TextIter.forward_visible_line"><a name="method-gtktextiter--forward-visible-line"></a><h3>gtk.TextIter.forward_visible_line</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">forward_visible_line</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the textiter
location can be dereferenced</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.8 and above.</p></div><p>The <code class="methodname">forward_visible_line</code>() method moves
the textiter location to the start of the next visible line and returns
<code class="literal">True</code> if the textiter location moved to a dereferenceable
position, and <code class="literal">False</code> 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" title="gtk.TextIter.backward_visible_line"><a name="method-gtktextiter--backward-visible-line"></a><h3>gtk.TextIter.backward_visible_line</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">backward_visible_line</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the textiter
location moved</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.8 and above.</p></div><p>The <code class="methodname">backward_visible_line</code>() method
moves the textiter location to the start of the previous visible line and
returns <code class="literal">True</code> if the textiter location was moved. If the
textiter location was at the textbuffer start, this method returns
<code class="literal">False</code>. 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
<code class="literal">True</code>.</p></div><div class="refsect2" title="gtk.TextIter.forward_visible_lines"><a name="method-gtktextiter--forward-visible-lines"></a><h3>gtk.TextIter.forward_visible_lines</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">forward_visible_lines</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>count</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>count</code></strong> :</span></p></td><td>the number of visible lines to move forward,
may be negative</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the textiter
location moved and is dereferenceable</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.8 and above.</p></div><p>The <code class="methodname">forward_visible_lines</code>() method
moves the textiter location forward <em class="parameter"><code>count</code></em> visible
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 class="itemizedlist" type="disc"><li class="listitem"><code class="literal">True</code> if the textiter moved to a
dereferenceable position; or,</li><li class="listitem"><code class="literal">False</code> if the textiter location didn't
move, or moved onto the end textiter or if <em class="parameter"><code>count</code></em> was
0.</li></ul></div><p>If <em class="parameter"><code>count</code></em> is negative, the textiter
location moves backward by <em class="parameter"><code>count</code></em> visible lines.</p></div><div class="refsect2" title="gtk.TextIter.backward_visible_lines"><a name="method-gtktextiter--backward-visible-lines"></a><h3>gtk.TextIter.backward_visible_lines</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">backward_visible_lines</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>count</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>count</code></strong> :</span></p></td><td>the number of visible lines to move backward,
may be negative</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the textiter
location moved to a dereferenceable position</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.8 and above.</p></div><p>The <code class="methodname">backward_visible_lines</code>() method
moves the textiter location backward by <em class="parameter"><code>count</code></em> 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 class="itemizedlist" type="disc"><li class="listitem"><code class="literal">True</code> if the textiter moved to a
dereferenceable position; or,</li><li class="listitem"><code class="literal">False</code> if the textiter location didn't
move, or moved onto the end textiter or if <em class="parameter"><code>count</code></em> was
0.</li></ul></div><p>If <em class="parameter"><code>count</code></em> is negative, the textiter
location moves forward by <em class="parameter"><code>count</code></em> visible lines.</p></div><div class="refsect2" title="gtk.TextIter.set_offset"><a name="method-gtktextiter--set-offset"></a><h3>gtk.TextIter.set_offset</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_offset</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>char_offset</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>char_offset</code></strong> :</span></p></td><td>a character number</td></tr></tbody></table><p>The <code class="methodname">set_offset</code>() method sets the
textiter location to point to the location that is
<em class="parameter"><code>char_offset</code></em> counts from the start of the textbuffer
(starting with 0).</p></div><div class="refsect2" title="gtk.TextIter.set_line"><a name="method-gtktextiter--set-line"></a><h3>gtk.TextIter.set_line</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_line</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>line_number</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>line_number</code></strong> :</span></p></td><td>a line number (counted from
0)</td></tr></tbody></table><p>The <code class="methodname">set_line</code>() method sets the textiter
location to the start of the line specified by
<em class="parameter"><code>line_number</code></em>. If <em class="parameter"><code>line_number</code></em>
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" title="gtk.TextIter.set_line_offset"><a name="method-gtktextiter--set-line-offset"></a><h3>gtk.TextIter.set_line_offset</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_line_offset</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>char_on_line</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>char_on_line</code></strong> :</span></p></td><td>a character offset relative to the start of the
textiter location's current line</td></tr></tbody></table><p>The <code class="methodname">set_line_offset</code>() method moves the
textiter location within a line, to the new <span class="emphasis"><em>character</em></span>
(not byte) offset specified by <em class="parameter"><code>char_on_line</code></em>. 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 class="link" href="class-gtktextiter.html#method-gtktextiter--set-line-index" title="gtk.TextIter.set_line_index"><code class="methodname">set_line_index</code>()</a>
method if you have a byte index rather than a character offset.</p></div><div class="refsect2" title="gtk.TextIter.set_line_index"><a name="method-gtktextiter--set-line-index"></a><h3>gtk.TextIter.set_line_index</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_line_index</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>byte_on_line</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>byte_on_line</code></strong> :</span></p></td><td>a byte index relative to the start of the
textiter location's current line</td></tr></tbody></table><p>The <code class="methodname">set_line_index</code>() method is similar
to the <a class="link" href="class-gtktextiter.html#method-gtktextiter--set-line-offset" title="gtk.TextIter.set_line_offset"><code class="methodname">set_line_offset</code>()</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" title="gtk.TextIter.forward_to_end"><a name="method-gtktextiter--forward-to-end"></a><h3>gtk.TextIter.forward_to_end</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">forward_to_end</span>(<span class="methodparam"></span>)</code></pre><p>The <code class="methodname">forward_to_end</code>() method moves the
textiter location forward to the "end textiter," that points one past the
last valid character in the buffer. The <a class="link" href="class-gtktextiter.html#method-gtktextiter--get-char" title="gtk.TextIter.get_char"><code class="methodname">get_char</code>()</a>
method called on the end textiter returns 0, which is convenient for writing
loops.</p></div><div class="refsect2" title="gtk.TextIter.forward_to_line_end"><a name="method-gtktextiter--forward-to-line-end"></a><h3>gtk.TextIter.forward_to_line_end</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">forward_to_line_end</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if we moved and the new
location is not the end textiter</td></tr></tbody></table><p>The <code class="methodname">forward_to_line_end</code>() 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 <code class="literal">False</code>.</p></div><div class="refsect2" title="gtk.TextIter.set_visible_line_offset"><a name="method-gtktextiter--set-visible-line-offset"></a><h3>gtk.TextIter.set_visible_line_offset</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_visible_line_offset</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>char_on_line</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>char_on_line</code></strong> :</span></p></td><td>a character offset</td></tr></tbody></table><p>The <code class="methodname">set_visible_char_offset</code>() method is
similar to the <a class="link" href="class-gtktextiter.html#method-gtktextiter--set-line-offset" title="gtk.TextIter.set_line_offset"><code class="methodname">set_line_offset</code>()</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" title="gtk.TextIter.set_visible_line_index"><a name="method-gtktextiter--set-visible-line-index"></a><h3>gtk.TextIter.set_visible_line_index</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_visible_line_index</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>byte_on_line</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>byte_on_line</code></strong> :</span></p></td><td>a byte index</td></tr></tbody></table><p>The <code class="methodname">set_visible_line_index</code>() method is
similar to the <a class="link" href="class-gtktextiter.html#method-gtktextiter--set-line-index" title="gtk.TextIter.set_line_index"><code class="methodname">set_line_index</code>()</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" title="gtk.TextIter.forward_to_tag_toggle"><a name="method-gtktextiter--forward-to-tag-toggle"></a><h3>gtk.TextIter.forward_to_tag_toggle</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">forward_to_tag_toggle</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>tag</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>tag</code></strong> :</span></p></td><td>a <a class="link" href="class-gtktexttag.html" title="gtk.TextTag"><code class="classname">gtk.TextTag</code></a>, or
<code class="literal">None</code></td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if a tag toggle was
found after the textiter location</td></tr></tbody></table><p>The <code class="methodname">forward_to_tag_toggle</code>() method
moves the textiter location forward to the next toggle (on or off) of the
<a class="link" href="class-gtktexttag.html" title="gtk.TextTag"><code class="classname">gtk.TextTag</code></a>
specified by <em class="parameter"><code>tag</code></em>, or to the next toggle of any tag if
<em class="parameter"><code>tag</code></em> is <code class="literal">None</code>. If no matching tag
toggles are found, this method returns <code class="literal">False</code> and sets the
textiter location to the end of the textbuffer; otherwise, returns
<code class="literal">True</code>. The
<code class="methodname">forward_to_tag_toggle</code>() method does not recognize
toggles located at the textiter location, only toggles after the textiter
location.</p></div><div class="refsect2" title="gtk.TextIter.backward_to_tag_toggle"><a name="method-gtktextiter--backward-to-tag-toggle"></a><h3>gtk.TextIter.backward_to_tag_toggle</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">backward_to_tag_toggle</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>tag</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>tag</code></strong> :</span></p></td><td>a <a class="link" href="class-gtktexttag.html" title="gtk.TextTag"><code class="classname">gtk.TextTag</code></a>, or
<code class="literal">None</code></td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if a tag toggle was
found before the textiter location</td></tr></tbody></table><p>The <code class="methodname">backward_to_tag_toggle</code>() method
moves the textiter location backward to the next toggle (on or off) of the
<a class="link" href="class-gtktexttag.html" title="gtk.TextTag"><code class="classname">gtk.TextTag</code></a>
specified by <em class="parameter"><code>tag</code></em>, or to the next toggle of any tag if
<em class="parameter"><code>tag</code></em> is <code class="literal">None</code>. If no matching tag
toggles are found, this method returns <code class="literal">False</code> and sets the
textiter location to the start of the textbuffer; otherwise, returns
<code class="literal">True</code>. The
<code class="methodname">backward_to_tag_toggle</code>() method does not recognize
toggles located at the textiter location, only toggles before the textiter
location.</p></div><div class="refsect2" title="gtk.TextIter.forward_find_char"><a name="method-gtktextiter--forward-find-char"></a><h3>gtk.TextIter.forward_find_char</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">forward_find_char</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>pred</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>limit</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>pred</code></strong> :</span></p></td><td>a function to be called on each
character</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>user_data</code></strong> :</span></p></td><td>user data for
<em class="parameter"><code>pred</code></em></td></tr><tr><td><p><span class="term"><strong class="parameter"><code>limit</code></strong> :</span></p></td><td>a <a class="link" href="class-gtktextiter.html" title="gtk.TextIter"><code class="classname">gtk.TextIter</code></a>
pointing at a position to end the search, or
<code class="literal">None</code> for the end of the
buffer.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if a match was
found</td></tr></tbody></table><div class="note" title="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 <code class="methodname">forward_find_char</code>() method advances
the textiter, calling the function specified by <em class="parameter"><code>pred</code></em>
on each character. If <em class="parameter"><code>pred</code></em> returns
<code class="literal">True</code>, <code class="methodname">forward_find_char</code> stops
scanning and returns <code class="literal">True</code>. If <em class="parameter"><code>pred</code></em>
never returns <code class="literal">True</code>, the textiter location is set to
<em class="parameter"><code>limit</code></em> or the end textiter, if
<em class="parameter"><code>limit</code></em> is <code class="literal">None</code>.</p><div class="warning" title="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 <em class="parameter"><code>pred</code></em> is called for every character.</p></div></div><div class="refsect2" title="gtk.TextIter.backward_find_char"><a name="method-gtktextiter--backward-find-char"></a><h3>gtk.TextIter.backward_find_char</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">backward_find_char</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>pred</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>limit</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>pred</code></strong> :</span></p></td><td>a function to be called on each
character</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>user_data</code></strong> :</span></p></td><td>user data for <em class="parameter"><code>pred</code></em></td></tr><tr><td><p><span class="term"><strong class="parameter"><code>limit</code></strong> :</span></p></td><td>a <a class="link" href="class-gtktextiter.html" title="gtk.TextIter"><code class="classname">gtk.TextIter</code></a>
pointing at a position to end the search, or
<code class="literal">None</code> for the beginning of the
buffer.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if a match was
found</td></tr></tbody></table><div class="note" title="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 <code class="methodname">backward_find_char</code>() method is
similar to the <a class="link" href="class-gtktextiter.html#method-gtktextiter--forward-find-char" title="gtk.TextIter.forward_find_char"><code class="methodname">forward_find_char()</code></a>
method, but goes backward from the textiter location.</p><div class="warning" title="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 <em class="parameter"><code>pred</code></em> is called for every character.</p></div></div><div class="refsect2" title="gtk.TextIter.forward_search"><a name="method-gtktextiter--forward-search"></a><h3>gtk.TextIter.forward_search</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">forward_search</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>str</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>limit</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>str</code></strong> :</span></p></td><td>a search string</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>flags</code></strong> :</span></p></td><td>the flags affecting how the search is
done</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>limit</code></strong> :</span></p></td><td>a bound for the search, or
<code class="literal">None</code> to set the bound to the end of the buffer</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a tuple containing <a class="link" href="class-gtktextiter.html" title="gtk.TextIter"><code class="classname">gtk.TextIter</code></a>
objects pointing at the start and end locations of the
match</td></tr></tbody></table><p>The <code class="methodname">forward_search</code>() method searches
forward for the text string specified by <em class="parameter"><code>str</code></em> and
returns a tuple containing <a class="link" href="class-gtktextiter.html" title="gtk.TextIter"><code class="classname">gtk.TextIter</code></a>
objects that point at the start and end locations of the match. The search
will stop at the location specified by <em class="parameter"><code>limit</code></em> or the
end of the textbuffer if <em class="parameter"><code>limit</code></em> is
<code class="literal">None</code> or is not specified. Note that a search is a linear
or O(n) operation, so you may wish to use <em class="parameter"><code>limit</code></em> to
avoid locking up your UI when searching large buffers.</p><p>If the <code class="literal">gtk.TEXT_SEARCH_VISIBLE_ONLY</code> flag is
present, the match may have invisible text interspersed in
<em class="parameter"><code>str</code></em> (i.e. <em class="parameter"><code>str</code></em> will be a
possibly-noncontiguous subsequence of the matched range). Likewise, if
<code class="literal">gtk.TEXT_SEARCH_TEXT_ONLY</code> 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
<em class="parameter"><code>str</code></em> will match embedded pixbufs or child
widgets.</p></div><div class="refsect2" title="gtk.TextIter.backward_search"><a name="method-gtktextiter--backward-search"></a><h3>gtk.TextIter.backward_search</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">backward_search</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>str</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>limit</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>str</code></strong> :</span></p></td><td>a search string</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>flags</code></strong> :</span></p></td><td>the flags affecting the
search</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>limit</code></strong> :</span></p></td><td>a bound for the search, or
<code class="literal">None</code> to set the bound to the end of the
buffer</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>start of match and end of
match</td></tr></tbody></table><p>The <code class="methodname">backward_search</code>() method is the
same as the <a class="link" href="class-gtktextiter.html#method-gtktextiter--forward-search" title="gtk.TextIter.forward_search"><code class="methodname">forward_search</code>()</a>
method, except searches backward.</p></div><div class="refsect2" title="gtk.TextIter.equal"><a name="method-gtktextiter--equal"></a><h3>gtk.TextIter.equal</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">equal</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>rhs</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>rhs</code></strong> :</span></p></td><td>another <a class="link" href="class-gtktextiter.html" title="gtk.TextIter"><code class="classname">gtk.TextIter</code></a>
object</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the textiters point
to the same place in the buffer</td></tr></tbody></table><p>The <code class="methodname">equal</code>() method tests if the
textiter specified by <em class="parameter"><code>rhs</code></em> points to the same location
in the textbuffer as the textiter.</p></div><div class="refsect2" title="gtk.TextIter.compare"><a name="method-gtktextiter--compare"></a><h3>gtk.TextIter.compare</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">compare</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>rhs</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>rhs</code></strong> :</span></p></td><td>another <a class="link" href="class-gtktextiter.html" title="gtk.TextIter"><code class="classname">gtk.TextIter</code></a>
object</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>-1 if the textiter location is less than the
<em class="parameter"><code>rhs</code></em> location, 1 if the textiter location is greater,
0 if they are equal</td></tr></tbody></table><p>The <code class="methodname">compare</code>() method returns:</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">-1 if the textiter location is less than the location of
the textiter specified by <em class="parameter"><code>rhs</code></em>;</li><li class="listitem">1 if the textiter location is greater than the location
of the textiter specified by <em class="parameter"><code>rhs</code></em>; and,</li><li class="listitem">0 if the textiter location is equal to the location of
the textiter specified by <em class="parameter"><code>rhs</code></em>.</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" title="gtk.TextIter.in_range"><a name="method-gtktextiter--in-range"></a><h3>gtk.TextIter.in_range</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">in_range</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>start</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>end</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>start</code></strong> :</span></p></td><td>the start of the text
range</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>end</code></strong> :</span></p></td><td>the end of the text range</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the textiter
location is in the text range</td></tr></tbody></table><p>The <code class="methodname">in_range</code>() method returns
<code class="literal">True</code> if the textiter location is in the text range
specified by the <a class="link" href="class-gtktextiter.html" title="gtk.TextIter"><code class="classname">gtk.TextIter</code></a>
objects <em class="parameter"><code>start</code></em> and <em class="parameter"><code>end</code></em>.
<em class="parameter"><code>start</code></em> and <em class="parameter"><code>end</code></em> must be in
ascending order.</p></div><div class="refsect2" title="gtk.TextIter.order"><a name="method-gtktextiter--order"></a><h3>gtk.TextIter.order</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">order</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>second</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>second</code></strong> :</span></p></td><td>another <a class="link" href="class-gtktextiter.html" title="gtk.TextIter"><code class="classname">gtk.TextIter</code></a>
object</td></tr></tbody></table><p>The order() method swaps the locations of
<em class="parameter"><code>first</code></em> and <em class="parameter"><code>second</code></em> if
<em class="parameter"><code>second</code></em> comes before <em class="parameter"><code>first</code></em> in
the buffer. This method can be used to ensure that
<em class="parameter"><code>first</code></em> and <em class="parameter"><code>second</code></em> 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 class="link" href="class-gtktextiter.html#method-gtktextiter--in-range" title="gtk.TextIter.in_range"><code class="methodname">in_range</code>()</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>
|