/usr/share/gtk-doc/html/pygtk/class-pangolayoutiter.html is in python-gtk2-doc 2.24.0-4ubuntu1.
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 | <html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>pango.LayoutIter</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="pango-class-reference.html" title="The pango Class Reference"><link rel="prev" href="class-pangolayout.html" title="pango.Layout"><link rel="next" href="class-pangolayoutline.html" title="pango.LayoutLine"></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">pango.LayoutIter</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-pangolayout.html">Prev</a> </td><th width="60%" align="center">The pango Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-pangolayoutline.html">Next</a></td></tr></table><hr></div><div class="refentry" title="pango.LayoutIter"><a name="class-pangolayoutiter"></a><div class="titlepage"></div><div class="refnamediv"><h2>pango.LayoutIter</h2><p>pango.LayoutIter — an object used to iterate over the visual extents of a
<a class="link" href="class-pangolayout.html" title="pango.Layout"><code class="classname">pango.Layout</code></a>
(new in PyGTK 2.6)</p></div><div class="refsect1" title="Synopsis"><a name="id3270281"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">pango.LayoutIter</span></span>(<span class="ooclass"><span class="classname"><PYGTKDOCLINK HREF="class-gobjectgboxed">gobject.GBoxed</PYGTKDOCLINK></span></span>):
<code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-pangolayoutiter.html#method-pangolayoutiter--free" title="pango.LayoutIter.free">free</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-pangolayoutiter.html#method-pangolayoutiter--next-char" title="pango.LayoutIter.next_char">next_char</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-pangolayoutiter.html#method-pangolayoutiter--next-cluster" title="pango.LayoutIter.next_cluster">next_cluster</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-pangolayoutiter.html#method-pangolayoutiter--next-line" title="pango.LayoutIter.next_line">next_line</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-pangolayoutiter.html#method-pangolayoutiter--next-run" title="pango.LayoutIter.next_run">next_run</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-pangolayoutiter.html#method-pangolayoutiter--at-last-line" title="pango.LayoutIter.at_last_line">at_last_line</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-pangolayoutiter.html#method-pangolayoutiter--get-index" title="pango.LayoutIter.get_index">get_index</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-pangolayoutiter.html#method-pangolayoutiter--get-baseline" title="pango.LayoutIter.get_baseline">get_baseline</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-pangolayoutiter.html#method-pangolayoutiter--get-char-extents" title="pango.LayoutIter.get_char_extents">get_char_extents</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-pangolayoutiter.html#method-pangolayoutiter--get-cluster-extents" title="pango.LayoutIter.get_cluster_extents">get_cluster_extents</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-pangolayoutiter.html#method-pangolayoutiter--get-layout-extents" title="pango.LayoutIter.get_layout_extents">get_layout_extents</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-pangolayoutiter.html#method-pangolayoutiter--get-line-extents" title="pango.LayoutIter.get_line_extents">get_line_extents</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-pangolayoutiter.html#method-pangolayoutiter--get-run-extents" title="pango.LayoutIter.get_run_extents">get_run_extents</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-pangolayoutiter.html#method-pangolayoutiter--get-line-yrange" title="pango.LayoutIter.get_line_yrange">get_line_yrange</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-pangolayoutiter.html#method-pangolayoutiter--get-line-yrange" title="pango.LayoutIter.get_line_yrange">get_line</a></span>(<span class="methodparam"></span>)</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id2901557"></a><h2>Ancestry</h2><pre class="synopsis">+-- <PYGTKDOCLINK HREF="class-gobjectgboxed">gobject.GBoxed</PYGTKDOCLINK>
+-- <a class="link" href="class-pangolayoutiter.html" title="pango.LayoutIter">pango.LayoutIter</a>
</pre></div><div class="refsect1" title="Description"><a name="id3072312"></a><h2>Description</h2><p>A <a class="link" href="class-pangolayoutiter.html" title="pango.LayoutIter"><code class="classname">pango.LayoutIter</code></a>
object can be used to iterate over the visual elements of a <a class="link" href="class-pangolayout.html" title="pango.Layout"><code class="classname">pango.Layout</code></a>. A
<a class="link" href="class-pangolayoutiter.html" title="pango.LayoutIter"><code class="classname">pango.LayoutIter</code></a>
is created using the <a class="link" href="class-pangolayout.html#method-pangolayout--get-iter" title="pango.Layout.get_iter"><code class="methodname">pango.Layout.get_iter</code>()</a>
method.</p></div><div class="refsect1" title="Methods"><a name="id2997421"></a><h2>Methods</h2><div class="refsect2" title="pango.LayoutIter.free"><a name="method-pangolayoutiter--free"></a><h3>pango.LayoutIter.free</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">free</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 new <a class="link" href="class-pangolayout.html" title="pango.Layout"><code class="classname">pango.Layout</code></a> that
is a copy of the layout</td></tr></tbody></table><div class="warning" title="Warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p>This method is deprecated and should not be used since it may
crash your application.</p></div><p>The <code class="methodname">free</code>() method frees the <a class="link" href="class-pangolayoutiter.html" title="pango.LayoutIter"><code class="classname">pango.LayoutIter</code></a>
object.</p></div><div class="refsect2" title="pango.LayoutIter.next_char"><a name="method-pangolayoutiter--next-char"></a><h3>pango.LayoutIter.next_char</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">next_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 iter was
moved.</td></tr></tbody></table><p>The <code class="methodname">next_char</code>() method returns
<code class="literal">True</code> if the <a class="link" href="class-pangolayoutiter.html" title="pango.LayoutIter"><code class="classname">pango.LayoutIter</code></a>
is moved to the next character in visual order. If the iter was already at
the end of the layout this method returns <code class="literal">False</code>.</p></div><div class="refsect2" title="pango.LayoutIter.next_cluster"><a name="method-pangolayoutiter--next-cluster"></a><h3>pango.LayoutIter.next_cluster</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">next_cluster</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 iter was
moved.</td></tr></tbody></table><p>The <code class="methodname">next_cluster</code>() method returns
<code class="literal">True</code> if the <a class="link" href="class-pangolayoutiter.html" title="pango.LayoutIter"><code class="classname">pango.LayoutIter</code></a>
is moved to the next cluster in visual order. If the iter was already at the
end of the layout this method returns <code class="literal">False</code>.</p></div><div class="refsect2" title="pango.LayoutIter.next_line"><a name="method-pangolayoutiter--next-line"></a><h3>pango.LayoutIter.next_line</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">next_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 iter was
moved.</td></tr></tbody></table><p>The <code class="methodname">next_line</code>() method returns
<code class="literal">True</code> if the <a class="link" href="class-pangolayoutiter.html" title="pango.LayoutIter"><code class="classname">pango.LayoutIter</code></a>
is moved to the next line in visual order. If the iter was already at the
end of the layout this method returns <code class="literal">False</code>.</p></div><div class="refsect2" title="pango.LayoutIter.next_run"><a name="method-pangolayoutiter--next-run"></a><h3>pango.LayoutIter.next_run</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">next_run</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 iter was
moved.</td></tr></tbody></table><p>The <code class="methodname">next_run</code>() method returns
<code class="literal">True</code> if the <a class="link" href="class-pangolayoutiter.html" title="pango.LayoutIter"><code class="classname">pango.LayoutIter</code></a>
is moved to the next run in visual order. If the iter was already at the end
of the layout this method returns <code class="literal">False</code>.</p></div><div class="refsect2" title="pango.LayoutIter.at_last_line"><a name="method-pangolayoutiter--at-last-line"></a><h3>pango.LayoutIter.at_last_line</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">at_last_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 iter is in the
last line.</td></tr></tbody></table><p>The <code class="methodname">at_last_line</code>() method returns
<code class="literal">True</code> if the <a class="link" href="class-pangolayoutiter.html" title="pango.LayoutIter"><code class="classname">pango.LayoutIter</code></a>
points to a position in the last line of the layout.</p></div><div class="refsect2" title="pango.LayoutIter.get_index"><a name="method-pangolayoutiter--get-index"></a><h3>pango.LayoutIter.get_index</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_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 current byte index</td></tr></tbody></table><p>The <code class="methodname">get_index</code>() method returns the
current byte index. Note that iterating forward by char moves in visual
order, not logical order, so indexes may not be sequential. Also, the index
may be equal to the length of the text in the layout.</p></div><div class="refsect2" title="pango.LayoutIter.get_baseline"><a name="method-pangolayoutiter--get-baseline"></a><h3>pango.LayoutIter.get_baseline</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_baseline</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 baseline of the current
line.</td></tr></tbody></table><p>The <code class="methodname">get_baseline</code>() method returns the y
position of the current line's baseline, in layout coordinates (origin at
top left of the entire layout).</p></div><div class="refsect2" title="pango.LayoutIter.get_char_extents"><a name="method-pangolayoutiter--get-char-extents"></a><h3>pango.LayoutIter.get_char_extents</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_char_extents</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 4-tuple containing the logical extents of the
character at the iter position.</td></tr></tbody></table><p>The <code class="methodname">get_char_extents</code>() method returns a
4-tuple (x, y, width, height) containing the logical extents of the current
character, in layout coordinates (origin is the top left of the entire
layout). Only logical extents can sensibly be obtained for characters; ink
extents make sense only down to the level of clusters.</p></div><div class="refsect2" title="pango.LayoutIter.get_cluster_extents"><a name="method-pangolayoutiter--get-cluster-extents"></a><h3>pango.LayoutIter.get_cluster_extents</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_cluster_extents</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 2-tuple containing containing the
ink and logical extents as 4-tuples.</td></tr></tbody></table><p>The <code class="methodname">get_cluster_extents</code>() method
returns a 2-tuple containing the ink and logical extents (as 4-tuples: x, y,
width, height) of the cluster at the iter position.</p></div><div class="refsect2" title="pango.LayoutIter.get_layout_extents"><a name="method-pangolayoutiter--get-layout-extents"></a><h3>pango.LayoutIter.get_layout_extents</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_layout_extents</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 2-tuple containing containing the
ink and logical extents as 4-tuples.</td></tr></tbody></table><p>The <code class="methodname">get_layout_extents</code>() method returns
a 2-tuple containing the ink and logical extents (as 4-tuples: x, y, width,
height) of the layout at the iter position.</p></div><div class="refsect2" title="pango.LayoutIter.get_line_extents"><a name="method-pangolayoutiter--get-line-extents"></a><h3>pango.LayoutIter.get_line_extents</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_line_extents</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 2-tuple containing containing the
ink and logical extents as 4-tuples.</td></tr></tbody></table><p>The <code class="methodname">get_line_extents</code>() method returns a
2-tuple containing the ink and logical extents (as 4-tuples: x, y, width,
height) of the line at the iter position.</p></div><div class="refsect2" title="pango.LayoutIter.get_run_extents"><a name="method-pangolayoutiter--get-run-extents"></a><h3>pango.LayoutIter.get_run_extents</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_run_extents</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 2-tuple containing containing the
ink and logical extents as 4-tuples.</td></tr></tbody></table><p>The <code class="methodname">get_run_extents</code>() method returns a
2-tuple containing the ink and logical extents (as 4-tuples: x, y, width,
height) of the run at the iter position.</p></div><div class="refsect2" title="pango.LayoutIter.get_line_yrange"><a name="method-pangolayoutiter--get-line-yrange"></a><h3>pango.LayoutIter.get_line_yrange</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_line_yrange</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 2-tuple containing the start and end of the
layout line.</td></tr></tbody></table><p>The <code class="methodname">get_line_yrange</code>() method returns a
2-tuple containing the start and end y positions of the layout line. The
vertical space in the <a class="link" href="class-pangolayout.html" title="pango.Layout"><code class="classname">pango.Layout</code></a>
associated with the iter is devided between the lines in the layout, the
space belonging to the current line is returned in the 2-tuple. A line's
range includes the line's logical extents, plus half of the spacing above
and below the line, if the <a class="link" href="class-pangolayout.html#method-pangolayout--set-spacing" title="pango.Layout.set_spacing"><code class="methodname">pango.Layout.set_spacing</code>()</a>
method has been called to set the layout spacing. The y positions are in layout
coordinates (origin at top left of the entire layout).</p></div><div class="refsect2" title="pango.LayoutIter.get_line"><a name="method-pangolayoutiter--get-line"></a><h3>pango.LayoutIter.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 <a class="link" href="class-pangolayoutline.html" title="pango.LayoutLine"><code class="classname">pango.LayoutLine</code></a>
containing the current line.</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">get_line</code>() method returns a <a class="link" href="class-pangolayoutline.html" title="pango.LayoutLine"><code class="classname">pango.LayoutLine</code></a>
containing the current line.</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-pangolayout.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="pango-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-pangolayoutline.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">pango.Layout </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> pango.LayoutLine</td></tr></table></div></body></html>
|