This file is indexed.

/usr/share/gtk-doc/html/pygtk/class-atktext.html is in python-gtk2-doc 2.24.0-3.

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
<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>atk.Text</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="atk-class-reference.html" title="The atk Class Reference"><link rel="prev" href="class-atktable.html" title="atk.Table"><link rel="next" href="class-atkvalue.html" title="atk.Value"></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">atk.Text</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-atktable.html">Prev</a> </td><th width="60%" align="center">The atk Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-atkvalue.html">Next</a></td></tr></table><hr></div><div class="refentry" title="atk.Text"><a name="class-atktext"></a><div class="titlepage"></div><div class="refnamediv"><h2>atk.Text</h2><p>atk.Text — the ATK interface implemented by components with text
      content.</p></div><div class="refsect1" title="Synopsis"><a name="id2956843"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">atk.Text</span></span>(<span class="ooclass"><span class="classname">gobject.GInterface</span></span>):
<code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-atktext.html#method-atktext--get-text" title="atk.Text.get_text">get_text</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>start_offset</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>end_offset</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-atktext.html#method-atktext--get-character-at-offset" title="atk.Text.get_character_at_offset">get_character_at_offset</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>offset</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-atktext.html#method-atktext--get-text-after-offset" title="atk.Text.get_text_after_offset">get_text_after_offset</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>offset</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>boundary_type</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-atktext.html#method-atktext--get-text-at-offset" title="atk.Text.get_text_at_offset">get_text_at_offset</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>offset</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>boundary_type</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-atktext.html#method-atktext--get-text-before-offset" title="atk.Text.get_text_before_offset">get_text_before_offset</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>offset</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>boundary_type</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-atktext.html#method-atktext--get-caret-offset" title="atk.Text.get_caret_offset">get_caret_offset</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-atktext.html#method-atktext--get-character-extents" title="atk.Text.get_character_extents">get_character_extents</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>offset</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>coords</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-atktext.html#method-atktext--get-run-attributes" title="atk.Text.get_run_attributes">get_run_attributes</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>offset</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-atktext.html#method-atktext--get-default-attributes" title="atk.Text.get_default_attributes">get_default_attributes</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-atktext.html#method-atktext--get-character-count" title="atk.Text.get_character_count">get_character_count</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-atktext.html#method-atktext--get-offset-at-point" title="atk.Text.get_offset_at_point">get_offset_at_point</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>x</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>y</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>coords</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-atktext.html#method-atktext--get-n-selections" title="atk.Text.get_n_selections">get_n_selections</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-atktext.html#method-atktext--get-selection" title="atk.Text.get_selection">get_selection</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>selection_num</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-atktext.html#method-atktext--add-selection" title="atk.Text.add_selection">add_selection</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>start_offset</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>end_offset</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-atktext.html#method-atktext--remove-selection" title="atk.Text.remove_selection">remove_selection</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>selection_num</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-atktext.html#method-atktext--set-selection" title="atk.Text.set_selection">set_selection</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>selection_num</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>start_offset</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>end_offset</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-atktext.html#method-atktext--set-caret-offset" title="atk.Text.set_caret_offset">set_caret_offset</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>offset</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-atktext.html#method-atktext--get-range-extents" title="atk.Text.get_range_extents">get_range_extents</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>start_offset</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>end_offset</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>coord_type</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-atktext.html#method-atktext--get-bounded-ranges" title="atk.Text.get_bounded_ranges">get_bounded_ranges</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>rect</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>coord_type</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>x_clip_type</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>y_clip_type</code></strong></span></span>)</code><br></pre></td></tr></table><pre class="programlisting">
<span class="bold"><strong>Functions</strong></span>

<code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-atktext.html#function-atk--text-attribute-get-name" title="atk.text_attribute_get_name">atk.text_attribute_get_name</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attr</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-atktext.html#function-atk--text-attribute-get-value" title="atk.text_attribute_get_value">atk.text_attribute_get_value</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attr</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>index</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-atktext.html#function-atk--text-attribute-register" title="atk.text_attribute_register">atk.text_attribute_register</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>name</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-atktext.html#function-atk--text-attribute-for-name" title="atk.text_attribute_for_name">atk.text_attribute_for_name</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>name</code></strong></span></span>)</code></pre></div><div class="refsect1" title="atk.Text Signal Prototypes"><a name="signal-prototypes-atktext"></a><h2>atk.Text Signal Prototypes</h2><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term">"<a class="link" href="class-atktext.html#signal-atktext--text-attributes-changed" title='The "text-attributes-changed" atk.Text Signal'>text-attributes-changed</a>"</span></p></td><td><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>atktext</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></td></tr><tr><td><p><span class="term">"<a class="link" href="class-atktext.html#signal-atktext--text-caret-moved" title='The "text-caret-moved" atk.Text Signal'>text-caret-moved</a>"</span></p></td><td><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>atktext</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>position</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></td></tr><tr><td><p><span class="term">"<a class="link" href="class-atktext.html#signal-atktext--text-changed" title='The "text-changed" atk.Text Signal'>text-changed</a>"</span></p></td><td><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>atktext</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>position</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>length</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></td></tr><tr><td><p><span class="term">"<a class="link" href="class-atktext.html#signal-atktext--text-selection-changed" title='The "text-selection-changed" atk.Text Signal'>text-selection-changed</a>"</span></p></td><td><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>atktext</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></td></tr></tbody></table></div><div class="refsect1" title="Description"><a name="id2936129"></a><h2>Description</h2><p><a class="link" href="class-atktext.html" title="atk.Text"><code class="classname">atk.Text</code></a> should be
    implemented by <a class="link" href="class-atkobject.html" title="atk.Object"><code class="classname">atk.Object</code></a>
    objects on behalf of widgets that have text content which is either
    attributed or otherwise non-trivial.  <a class="link" href="class-atkobject.html" title="atk.Object"><code class="classname">atk.Object</code></a>
    objects whose text content is simple, unattributed, and very brief may
    expose that content via <a class="link" href="class-atkobject.html#method-atkobject--get-name" title="atk.Object.get_name"><code class="methodname">atk.Object.get_name</code></a>
    instead; however if the text is editable, multi-line, typically longer
    than three or four words, attributed, selectable, or if the object
    already uses the 'name' ATK property for other information, the <a class="link" href="class-atktext.html" title="atk.Text"><code class="classname">atk.Text</code></a> interface
    should be used to expose the text content.  In the case of editable text
    content, <a class="link" href="class-atkeditabletext.html" title="atk.EditableText"><code class="classname">atk.EditableText</code></a>
    (a subtype of the <a class="link" href="class-atktext.html" title="atk.Text"><code class="classname">atk.Text</code></a>
    interface) should be implemented instead.</p><p><a class="link" href="class-atktext.html" title="atk.Text"><code class="classname">atk.Text</code></a> provides
    not only traversal facilities and change notification for text content,
    but also caret tracking and glyph bounding box calculations.  Note that
    the text strings are exposed as UTF-8, and are therefore potentially
    multi-byte, and caret-to-byte offset mapping makes no assumptions about
    the character length; also bounding box glyph-to-offset mapping may be
    complex for languages which use ligatures.</p></div><div class="refsect1" title="Methods"><a name="id2995457"></a><h2>Methods</h2><div class="refsect2" title="atk.Text.get_text"><a name="method-atktext--get-text"></a><h3>atk.Text.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>start_offset</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>end_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>start_offset</code></strong> :</span></p></td><td>start position</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>end_offset</code></strong> :</span></p></td><td>end position</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the text from
          <em class="parameter"><code>start_offset</code></em> up to, but not including
          <em class="parameter"><code>end_offset</code></em>.</td></tr></tbody></table><p>Gets the specified text.</p></div><div class="refsect2" title="atk.Text.get_character_at_offset"><a name="method-atktext--get-character-at-offset"></a><h3>atk.Text.get_character_at_offset</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_character_at_offset</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>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>offset</code></strong> :</span></p></td><td>position</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the character at
          <em class="parameter"><code>offset</code></em>.</td></tr></tbody></table><p>Gets the specified text.</p></div><div class="refsect2" title="atk.Text.get_text_after_offset"><a name="method-atktext--get-text-after-offset"></a><h3>atk.Text.get_text_after_offset</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_text_after_offset</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>offset</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>boundary_type</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>offset</code></strong> :</span></p></td><td>position</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>boundary_type</code></strong> :</span></p></td><td>one of the <a class="xref" href="atk-constants.html#atk-text-boundary-constants" title="Atk Text Boundary Constants">Atk Text Boundary Constants</a></td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a 3-tuple containing the text after
          <em class="parameter"><code>offset</code></em> bounded by the specified
          <em class="parameter"><code>boundary_type</code></em>, the start offset of the
          returned string and the offset of the first character after the
          returned substring.</td></tr></tbody></table><p>Gets the specified text.</p><p>If the <em class="parameter"><code>boundary_type</code></em> is
      <code class="literal">atk.TEXT_BOUNDARY_CHAR</code> the character after the
      offset is returned.</p><p>If the <em class="parameter"><code>boundary_type</code></em> is
      <code class="literal">atk.TEXT_BOUNDARY_WORD_START</code> the returned string is
      from the word start after the offset to the next word start.</p><p>The returned string will contain the word after the offset if
      the offset is inside a word or if the offset is not inside a
      word.</p><p>If the <em class="parameter"><code>boundary_type</code></em> is
      <code class="literal">atk.TEXT_BOUNDARY_WORD_END</code> the returned string is
      from the word end at or after the offset to the next work end.</p><p>The returned string will contain the word after the offset if
      the offset is inside a word and will contain the word after the word
      after the offset if the offset is not inside a word.</p><p>If the <em class="parameter"><code>boundary_type</code></em> is
      <code class="literal">atk.TEXT_BOUNDARY_SENTENCE_START</code> the returned
      string is from the sentence start after the offset to the next
      sentence start.</p><p>The returned string will contain the sentence after the offset
      if the offset is inside a sentence or if the offset is not inside a
      sentence.</p><p>If the <em class="parameter"><code>boundary_type</code></em> is atk.TEXT_BOUNDARY_SENTENCE_END the
      returned string is from the sentence end at or after the offset to the
      next sentence end.</p><p>The returned string will contain the sentence after the offset
      if the offset is inside a sentence and will contain the sentence after
      the sentence after the offset if the offset is not inside a
      sentence.</p><p>If the <em class="parameter"><code>boundary_type</code></em> is
      <code class="literal">atk.TEXT_BOUNDARY_LINE_START</code> the returned string is
      from the line start after the offset to the next line start.</p><p>If the <em class="parameter"><code>boundary_type</code></em> is
      <code class="literal">atk.TEXT_BOUNDARY_LINE_END</code> the returned string is
      from the line end at or after the offset to the next line
      start.</p></div><div class="refsect2" title="atk.Text.get_text_at_offset"><a name="method-atktext--get-text-at-offset"></a><h3>atk.Text.get_text_at_offset</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_text_at_offset</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>offset</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>boundary_type</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>offset</code></strong> :</span></p></td><td>position</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>boundary_type</code></strong> :</span></p></td><td>one of the <a class="xref" href="atk-constants.html#atk-text-boundary-constants" title="Atk Text Boundary Constants">Atk Text Boundary Constants</a></td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a 3-tuple containing the text at
          <em class="parameter"><code>offset</code></em> bounded by the specified
          <em class="parameter"><code>boundary_type</code></em>, the start offset of the
          returned string and the offset of the first character after the
          returned substring.</td></tr></tbody></table><p>Gets the specified text.</p><p>If the <em class="parameter"><code>boundary_type</code></em> if
      <code class="literal">atk.TEXT_BOUNDARY_CHAR</code> the character at the offset
      is returned.</p><p>If the <em class="parameter"><code>boundary_type</code></em> is
      <code class="literal">atk.TEXT_BOUNDARY_WORD_START</code> the returned string is
      from the word start at or before the offset to the word start after
      the offset.</p><p>The returned string will contain the word at the offset if the
      offset is inside a word and will contain the word before the offset if
      the offset is not inside a word.</p><p>If the <em class="parameter"><code>boundary_type</code></em> is
      <code class="literal">atk.TEXT_BOUNDARY_WORD_END</code> the returned string is
      from the word end before the offset to the word end at or after the
      offset.</p><p>The returned string will contain the word at the offset if the
      offset is inside a word and will contain the word after to the offset
      if the offset is not inside a word.</p><p>If the <em class="parameter"><code>boundary_type</code></em> is
      <code class="literal">atk.TEXT_BOUNDARY_SENTENCE_START</code> the returned
      string is from the sentence start at or before the offset to the
      sentence start after the offset.</p><p>The returned string will contain the sentence at the offset if
      the offset is inside a sentence and will contain the sentence before
      the offset if the offset is not inside a sentence.</p><p>If the <em class="parameter"><code>boundary_type</code></em> is
      <code class="literal">atk.TEXT_BOUNDARY_SENTENCE_END</code> the returned string
      is from the sentence end before the offset to the sentence end at or
      after the offset.</p><p>The returned string will contain the sentence at the offset if
      the offset is inside a sentence and will contain the sentence after
      the offset if the offset is not inside a sentence.</p><p>If the <em class="parameter"><code>boundary_type</code></em> is
      <code class="literal">atk.TEXT_BOUNDARY_LINE_START</code> the returned string is
      from the line start at or before the offset to the line start after
      the offset.</p><p>If the <em class="parameter"><code>boundary_type</code></em> is
      <code class="literal">atk.TEXT_BOUNDARY_LINE_END</code> the returned string is
      from the line end before the offset to the line end at or after the
      offset.</p></div><div class="refsect2" title="atk.Text.get_text_before_offset"><a name="method-atktext--get-text-before-offset"></a><h3>atk.Text.get_text_before_offset</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_text_before_offset</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>offset</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>boundary_type</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>offset</code></strong> :</span></p></td><td>position</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>boundary_type</code></strong> :</span></p></td><td>one of the <a class="xref" href="atk-constants.html#atk-text-boundary-constants" title="Atk Text Boundary Constants">Atk Text Boundary Constants</a></td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a 3-tuple containing the text before
          <em class="parameter"><code>offset</code></em> bounded by the specified
          <em class="parameter"><code>boundary_type</code></em>, the start offset of the
          returned string and the offset of the first character after the
          returned substring.</td></tr></tbody></table><p>Gets the specified text.</p><p>If the <em class="parameter"><code>boundary_type</code></em> if
      <code class="literal">atk.TEXT_BOUNDARY_CHAR</code> the character before the
      offset is returned.</p><p>If the <em class="parameter"><code>boundary_type</code></em> is
      <code class="literal">atk.TEXT_BOUNDARY_WORD_START</code> the returned string is
      from the word start before the word start before the offset to the
      word start before the offset.</p><p>The returned string will contain the word before the offset if
      the offset is inside a word and will contain the word before the word
      before the offset if the offset is not inside a word.</p><p>If the <em class="parameter"><code>boundary_type</code></em> is
      <code class="literal">atk.TEXT_BOUNDARY_WORD_END</code> the returned string is
      from the word end before the word end at or before the offset to the
      word end at or before the offset.</p><p>The returned string will contain the word before the offset if
      the offset is inside a word or if the offset is not inside a
      word.</p><p>If the <em class="parameter"><code>boundary_type</code></em> is
      <code class="literal">atk.TEXT_BOUNDARY_SENTENCE_START</code> the returned
      string is from the sentence start before the sentence start before the
      offset to the sentence start before the offset.</p><p>The returned string will contain the sentence before the offset
      if the offset is inside a sentence and will contain the sentence
      before the sentence before the offset if the offset is not inside a
      sentence.</p><p>If the <em class="parameter"><code>boundary_type</code></em> is
      <code class="literal">atk.TEXT_BOUNDARY_SENTENCE_END</code> the returned string
      is from the sentence end before the sentence end at or before the
      offset to the sentence end at or before the offset.</p><p>The returned string will contain the sentence before the offset
      if the offset is inside a sentence or if the offset is not inside a
      sentence.</p><p>If the <em class="parameter"><code>boundary_type</code></em> is
      <code class="literal">atk.TEXT_BOUNDARY_LINE_START</code> the returned string is
      from the line start before the line start ar or before the offset to
      the line start ar or before the offset.</p><p>If the <em class="parameter"><code>boundary_type</code></em> is
      <code class="literal">atk.TEXT_BOUNDARY_LINE_END</code> the returned string is
      from the line end before the line end before the offset to the line
      end before the offset.</p></div><div class="refsect2" title="atk.Text.get_caret_offset"><a name="method-atktext--get-caret-offset"></a><h3>atk.Text.get_caret_offset</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_caret_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 position of the caret
          (cursor).</td></tr></tbody></table><p>Gets the offset position of the caret (cursor).</p></div><div class="refsect2" title="atk.Text.get_character_extents"><a name="method-atktext--get-character-extents"></a><h3>atk.Text.get_character_extents</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_character_extents</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>offset</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>coords</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>offset</code></strong> :</span></p></td><td>The offset of the text character for which
          bounding information is required.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>coords</code></strong> :</span></p></td><td>specify whether coordinates are relative to the
          screen or widget window - one of the <a class="xref" href="atk-constants.html#atk-coord-type-constants" title="Atk Coord Type Constants">Atk Coord Type Constants</a></td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a 4-tuple containing the x, y position and
          width and height of the bounding box.</td></tr></tbody></table><p>Get the bounding box containing the glyph representing the
      character at a particular text offset.</p></div><div class="refsect2" title="atk.Text.get_run_attributes"><a name="method-atktext--get-run-attributes"></a><h3>atk.Text.get_run_attributes</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_run_attributes</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>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>offset</code></strong> :</span></p></td><td>the offset at which to get the attributes</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>start_offset</code></strong> :</span></p></td><td>the address to put </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>end_offset</code></strong> :</span></p></td><td>the address to put </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a 3-tuple containing an attribute set tuple,
          the start offset of the range and the end offset of the range. The
          attribute set tuple contains a 2-tuple of (name, value) strings
          for each attribute explicitly set at
          <em class="parameter"><code>offset</code></em>.</td></tr></tbody></table><p>Creates a 3=tuple containing an attribute set (which consists of
      the attributes explicitly set at the position
      <em class="parameter"><code>offset</code></em> in the text), the start and end of the
      range around <em class="parameter"><code>offset</code></em> where the attributes are
      invariant. Note that the end offset is the offset of the first
      character after the range. See the <a class="xref" href="atk-constants.html#atk-text-attr-constants" title="Atk Text Attribute Constants">Atk Text Attribute Constants</a> for types of text
      attributes that can be returned. Note that other attributes may also
      be returned.</p></div><div class="refsect2" title="atk.Text.get_default_attributes"><a name="method-atktext--get-default-attributes"></a><h3>atk.Text.get_default_attributes</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_default_attributes</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 tuple containing the attribute set which
          contains the default values of attributes. The attribute set tuple
          contains a 2-tuple of (name, value) strings for each
          attribute.</td></tr></tbody></table><p>Creates a tuple containing an attribute set which consists of
      the default values of attributes for the text.  The attribute set
      tuple contains a 2-tuple of (name, value) strings for each attribute
      See the <a class="xref" href="atk-constants.html#atk-text-attr-constants" title="Atk Text Attribute Constants">Atk Text Attribute Constants</a> for types of text
      attributes that can be returned. Note that other attributes may also
      be returned.</p></div><div class="refsect2" title="atk.Text.get_character_count"><a name="method-atktext--get-character-count"></a><h3>atk.Text.get_character_count</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_character_count</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.</td></tr></tbody></table><p>Gets the character count.</p></div><div class="refsect2" title="atk.Text.get_offset_at_point"><a name="method-atktext--get-offset-at-point"></a><h3>atk.Text.get_offset_at_point</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_offset_at_point</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>x</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>y</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>coords</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>x</code></strong> :</span></p></td><td>screen x-position of
          character</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>y</code></strong> :</span></p></td><td>screen y-position of
          character</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>coords</code></strong> :</span></p></td><td>specify whether coordinates are relative to the
          screen or widget window - one of the <a class="xref" href="atk-constants.html#atk-coord-type-constants" title="Atk Coord Type Constants">Atk Coord Type Constants</a></td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the offset to the character which is located at
          the specified <em class="parameter"><code>x</code></em> and
          <em class="parameter"><code>y</code></em> coordinates.</td></tr></tbody></table><p>Gets the offset of the character located at coordinates
      <em class="parameter"><code>x</code></em> and
      <em class="parameter"><code>y</code></em>. <em class="parameter"><code>x</code></em> and
      <em class="parameter"><code>y</code></em> are interpreted as being relative to the
      screen or this widget's window depending on
      <em class="parameter"><code>coords</code></em>.</p></div><div class="refsect2" title="atk.Text.get_n_selections"><a name="method-atktext--get-n-selections"></a><h3>atk.Text.get_n_selections</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_n_selections</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 selected regions, or -1 if a
          failure occurred.</td></tr></tbody></table><p>Gets the number of selected regions.</p></div><div class="refsect2" title="atk.Text.get_selection"><a name="method-atktext--get-selection"></a><h3>atk.Text.get_selection</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_selection</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>selection_num</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>selection_num</code></strong> :</span></p></td><td>The selection number.  The selected regions are
          assigned numbers that correspond to how far the region is from the
          start of the text.  The selected region closest to the beginning
          of the text region is assigned the number 0, etc.  Note that
          adding, moving or deleting a selected region can change the
          numbering.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a 3-tuple containing the selected text, the
          start position of the selected region and the end position of
          (e.g. offset immediately past) the selected
          region.</td></tr></tbody></table><p>Gets the text from the specified selection.</p></div><div class="refsect2" title="atk.Text.add_selection"><a name="method-atktext--add-selection"></a><h3>atk.Text.add_selection</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">add_selection</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>start_offset</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>end_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>start_offset</code></strong> :</span></p></td><td>the start position of the selected
          region</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>end_offset</code></strong> :</span></p></td><td>the offset of the first character after the
          selected region.</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 success,
          <code class="literal">False</code> otherwise</td></tr></tbody></table><p>Adds a selection bounded by the specified offsets.</p></div><div class="refsect2" title="atk.Text.remove_selection"><a name="method-atktext--remove-selection"></a><h3>atk.Text.remove_selection</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">remove_selection</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>selection_num</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>selection_num</code></strong> :</span></p></td><td>The selection number.  The selected regions are
          assigned numbers that correspond to how far the region is from the
          start of the text.  The selected region closest to the beginning
          of the text region is assigned the number 0, etc.  Note that
          adding, moving or deleting a selected region can change the
          numbering.</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 success,
          <code class="literal">False</code> otherwise</td></tr></tbody></table><p>Removes the specified selection.</p></div><div class="refsect2" title="atk.Text.set_selection"><a name="method-atktext--set-selection"></a><h3>atk.Text.set_selection</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_selection</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>selection_num</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>start_offset</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>end_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>selection_num</code></strong> :</span></p></td><td>The selection number.  The selected regions are
          assigned numbers that correspond to how far the region is from the
          start of the text.  The selected region closest to the beginning
          of the text region is assigned the number 0, etc.  Note that
          adding, moving or deleting a selected region can change the
          numbering.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>start_offset</code></strong> :</span></p></td><td>the new start position of the
          selection</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>end_offset</code></strong> :</span></p></td><td>the new end position of (e.g. offset
          immediately past) the selection</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 success,
          <code class="literal">False</code> otherwise</td></tr></tbody></table><p>Changes the start and end offset of the specified
      selection.</p></div><div class="refsect2" title="atk.Text.set_caret_offset"><a name="method-atktext--set-caret-offset"></a><h3>atk.Text.set_caret_offset</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_caret_offset</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>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>offset</code></strong> :</span></p></td><td>position</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 success,
          <code class="literal">False</code> otherwise.</td></tr></tbody></table><p>Sets the caret (cursor) position to the specified
      <em class="parameter"><code>offset</code></em>.</p></div><div class="refsect2" title="atk.Text.get_range_extents"><a name="method-atktext--get-range-extents"></a><h3>atk.Text.get_range_extents</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_range_extents</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>start_offset</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>end_offset</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>coord_type</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_offset</code></strong> :</span></p></td><td>The offset of the first text character for
          which boundary information is required.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>end_offset</code></strong> :</span></p></td><td>The offset of the text character after the last
          character for which boundary information is
          required.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>coord_type</code></strong> :</span></p></td><td>Specify whether coordinates are relative to the
          screen or widget window - one of the <a class="xref" href="atk-constants.html#atk-coord-type-constants" title="Atk Coord Type Constants">Atk Coord Type Constants</a>.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a <a class="link" href="class-atkrectangle.html" title="atk.Rectangle"><code class="classname">atk.Rectangle</code></a>
          containing the extents of the range.</td></tr></tbody></table><p>Get the bounding box for text within the specified range.</p></div><div class="refsect2" title="atk.Text.get_bounded_ranges"><a name="method-atktext--get-bounded-ranges"></a><h3>atk.Text.get_bounded_ranges</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_bounded_ranges</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>rect</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>coord_type</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>x_clip_type</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>y_clip_type</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>rect</code></strong> :</span></p></td><td>An <a class="link" href="class-atkrectangle.html" title="atk.Rectangle"><code class="classname">atk.Rectangle</code></a>
          giving the dimensions of the bounding box.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>coord_type</code></strong> :</span></p></td><td>Specify whether coordinates are relative to the
          screen or widget window - one of the <a class="xref" href="atk-constants.html#atk-coord-type-constants" title="Atk Coord Type Constants">Atk Coord Type Constants</a>.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>x_clip_type</code></strong> :</span></p></td><td>Specify the horizontal clip type - one of the
          <a class="xref" href="atk-constants.html#atk-text-clip-type-constants" title="Atk Text Clip Type Constants">Atk Text Clip Type Constants</a>.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>y_clip_type</code></strong> :</span></p></td><td>Specify the vertical clip type - one of the
          <a class="xref" href="atk-constants.html#atk-text-clip-type-constants" title="Atk Text Clip Type Constants">Atk Text Clip Type Constants</a>.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a list of text ranges. The list contains a
          4-tuple for each text range. The 4-tuple contains a <a class="link" href="class-atkrectangle.html" title="atk.Rectangle"><code class="classname">atk.Rectangle</code></a>
          bounding the text range, the start and end offsets of the range
          and the text in the range.</td></tr></tbody></table><p>Get the ranges of text in the specified bounding box.</p></div></div><div class="refsect1" title="Functions"><a name="id2976096"></a><h2>Functions</h2><div class="refsect2" title="atk.text_attribute_get_name"><a name="function-atk--text-attribute-get-name"></a><h3>atk.text_attribute_get_name</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">atk.text_attribute_get_name</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attr</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>attr</code></strong> :</span></p></td><td>a text attribute (one of the <a class="xref" href="atk-constants.html#atk-text-attr-constants" title="Atk Text Attribute Constants">Atk Text Attribute Constants</a>) whose name is
	  required</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a string containing the name</td></tr></tbody></table><p>Gets the name corresponding to
      <em class="parameter"><code>attr</code></em>.</p></div><div class="refsect2" title="atk.text_attribute_get_value"><a name="function-atk--text-attribute-get-value"></a><h3>atk.text_attribute_get_value</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">atk.text_attribute_get_value</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attr</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>index</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>attr</code></strong> :</span></p></td><td>a text attribute (one of the <a class="xref" href="atk-constants.html#atk-text-attr-constants" title="Atk Text Attribute Constants">Atk Text Attribute Constants</a>) whose name is
	  required</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>index</code></strong> :</span></p></td><td>The index of the required
	  value</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a string containing the
	  value. <code class="literal">None</code> is returned if there are no values
	  maintained for the <em class="parameter"><code>attr</code></em>
	  value.</td></tr></tbody></table><p>Gets the value for the <em class="parameter"><code>index</code></em> of the text
      attribute specified by <em class="parameter"><code>attr</code></em>.</p></div><div class="refsect2" title="atk.text_attribute_register"><a name="function-atk--text-attribute-register"></a><h3>atk.text_attribute_register</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">atk.text_attribute_register</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>name</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>name</code></strong> :</span></p></td><td>a name string</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a new one of the <a class="xref" href="atk-constants.html#atk-text-attr-constants" title="Atk Text Attribute Constants">Atk Text Attribute Constants</a> that is associated
	  with name</td></tr></tbody></table><p>Associate <em class="parameter"><code>name</code></em> with a new text
      attribute.</p></div><div class="refsect2" title="atk.text_attribute_for_name"><a name="function-atk--text-attribute-for-name"></a><h3>atk.text_attribute_for_name</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">atk.text_attribute_for_name</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>name</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>name</code></strong> :</span></p></td><td>a string which is the (non-localized) name of
	  an ATK text attribute.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the text attribute (one of the <a class="xref" href="atk-constants.html#atk-text-attr-constants" title="Atk Text Attribute Constants">Atk Text Attribute Constants</a>) corresponding to
	  the specified name, or
	  <code class="literal">atk.TEXT_ATTRIBUTE_INVALID</code> if no matching text
	  attribute is found.</td></tr></tbody></table><p>Get the text attribute type corresponding to a text attribute
      name specified by <em class="parameter"><code>name</code></em>.</p></div></div><div class="refsect1" title="Signals"><a name="id2961245"></a><h2>Signals</h2><div class="refsect2" title='The "text-attributes-changed" atk.Text Signal'><a name="signal-atktext--text-attributes-changed"></a><h3>The "text-attributes-changed" atk.Text Signal</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>atktext</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>atktext</code></em> :</span></p></td><td>the object which received the
          signal.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_param1</code></em> :</span></p></td><td>the first user parameter (if any) specified
          with the <PYGTKDOCLINK HREF="method-gobject--connect"><code class="methodname">connect</code>()</PYGTKDOCLINK>
          method</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>additional user parameters (if any)</td></tr></tbody></table><p>The "text-attributes-changed" signal is emitted when the text
      attributes of the text of an object which implements <a class="link" href="class-atktext.html" title="atk.Text"><code class="classname">atk.Text</code></a>
      changes.</p></div><div class="refsect2" title='The "text-caret-moved" atk.Text Signal'><a name="signal-atktext--text-caret-moved"></a><h3>The "text-caret-moved" atk.Text Signal</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>atktext</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>position</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>atktext</code></em> :</span></p></td><td>the object which received the
          signal.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>position</code></em> :</span></p></td><td>The new position of the text
          caret.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_param1</code></em> :</span></p></td><td>the first user parameter (if any) specified
          with the <PYGTKDOCLINK HREF="method-gobject--connect"><code class="methodname">connect</code>()</PYGTKDOCLINK>
          method</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>additional user parameters (if any)</td></tr></tbody></table><p>The "text-caret-moved" signal is emitted when the caret position
      of the text of an object which implements <a class="link" href="class-atktext.html" title="atk.Text"><code class="classname">atk.Text</code></a>
      changes.</p></div><div class="refsect2" title='The "text-changed" atk.Text Signal'><a name="signal-atktext--text-changed"></a><h3>The "text-changed" atk.Text Signal</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>atktext</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>position</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>length</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>atktext</code></em> :</span></p></td><td>the object which received the signal.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>position</code></em> :</span></p></td><td>The position of the insertion or deletion.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>length</code></em> :</span></p></td><td>The length of text inserted or deleted.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_param1</code></em> :</span></p></td><td>the first user parameter (if any) specified
          with the <PYGTKDOCLINK HREF="method-gobject--connect"><code class="methodname">connect</code>()</PYGTKDOCLINK>
          method</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>additional user parameters (if any)</td></tr></tbody></table><p>The "text-changed" signal is emitted when the text of the object
      which implements the <a class="link" href="class-atktext.html" title="atk.Text"><code class="classname">atk.Text</code></a>
      interface changes, This signal will have a detail which is either
      "insert" or "delete" which identifies whether the text change was an
      insertion or a deletion</p></div><div class="refsect2" title='The "text-selection-changed" atk.Text Signal'><a name="signal-atktext--text-selection-changed"></a><h3>The "text-selection-changed" atk.Text Signal</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>atktext</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>atktext</code></em> :</span></p></td><td>the object which received the signal.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_param1</code></em> :</span></p></td><td>the first user parameter (if any) specified
          with the <PYGTKDOCLINK HREF="method-gobject--connect"><code class="methodname">connect</code>()</PYGTKDOCLINK>
          method</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>additional user parameters (if any)</td></tr></tbody></table><p>The "text-selection-changed" signal is emitted when the selected
      text of an object which implements <a class="link" href="class-atktext.html" title="atk.Text"><code class="classname">atk.Text</code></a>
      changes.</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-atktable.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="atk-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-atkvalue.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">atk.Table </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> atk.Value</td></tr></table></div></body></html>