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
|
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>pango.TabArray</title><meta name="generator" content="DocBook XSL Stylesheets V1.65.1"><link rel="home" href="index.html" title="PyGTK 2.0 Reference Manual"><link rel="up" href="pango-class-reference.html" title="The pango Class Reference"><link rel="previous" href="class-pangolayoutiter.html" title="pango.LayoutIter"><link rel="next" href="pango-markup-language.html" title="The Pango Markup Language"></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.TabArray</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-pangolayoutiter.html">Prev</a></td><th width="60%" align="center">The pango Class Reference</th><td width="20%" align="right"><a accesskey="n" href="pango-markup-language.html">Next</a></td></tr></table><hr></div><div class="refentry" lang="en"><a name="class-pangotabarray"></a><div class="titlepage"><div></div><div></div></div><div class="refnamediv"><h2>pango.TabArray</h2><p>pango.TabArray — an object containing an array of tab stops.</p></div><div class="refsect1" lang="en"><a name="id3116741"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">pango.TabArray</span></span>(<span class="ooclass"><span class="classname">gobject.GBoxed</span></span>):
<code class="constructorsynopsis"> <span class="methodname"><a href="class-pangotabarray.html#constructor-pangotabarray" title="Constructor">pango.TabArray</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>initial_size</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>positions_in_pixels</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-pangotabarray.html#method-pangotabarray--copy" title="pango.TabArray.copy">copy</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-pangotabarray.html#method-pangotabarray--get-size" title="pango.TabArray.get_size">get_size</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-pangotabarray.html#method-pangotabarray--resize" title="pango.TabArray.resize">resize</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>new_size</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-pangotabarray.html#method-pangotabarray--set-tab" title="pango.TabArray.set_tab">set_tab</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>tab_index</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>alignment</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>location</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-pangotabarray.html#method-pangotabarray--get-tab" title="pango.TabArray.get_tab">get_tab</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>tab_index</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-pangotabarray.html#method-pangotabarray--get-tabs" title="pango.TabArray.get_tabs">get_tabs</a></span>()</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-pangotabarray.html#method-pangotabarray--get-positions-in-pixels" title="pango.TabArray.get_positions_in_pixels">get_positions_in_pixels</a></span>(<span class="methodparam"></span>)</code><br></pre></td></tr></table></div><div class="refsect1" lang="en"><a name="id2938712"></a><h2>Description</h2><p>A <a href="class-pangotabarray.html" title="pango.TabArray"><tt class="classname">pango.TabArray</tt></a>
object contains an array of tab stops. Each tab stop has an alignment and a
position.</p></div><div class="refsect1" lang="en"><a name="constructor-pangotabarray"></a><h2>Constructor</h2><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="constructorsynopsis"> <span class="methodname">pango.TabArray</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>initial_size</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>positions_in_pixels</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>initial_size</tt></b>:</span></td><td>Initial number of tab stops to allocate, can be
0</td></tr><tr><td><span class="term"><b class="parameter"><tt>positions_in_pixels</tt></b>:</span></td><td>if <tt class="literal">TRUE</tt> the tab positions are
in pixel units</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>a <a href="class-pangotabarray.html" title="pango.TabArray"><tt class="classname">pango.TabArray</tt></a></td></tr></tbody></table><p>Creates a new <a href="class-pangotabarray.html" title="pango.TabArray"><tt class="classname">pango.TabArray</tt></a>
object with the number of tab stops specified by
<i class="parameter"><tt>initial_size</tt></i>. If
<i class="parameter"><tt>positions_in_pixels</tt></i> is <tt class="literal">TRUE</tt>, the
tab stop positions are specified in pixel units otherwise in pango units
(one pixel = <tt class="literal">pango.SCALE</tt> pango units). All tab stops are
initially at position 0.</p></div><div class="refsect1" lang="en"><a name="id3177593"></a><h2>Methods</h2><div class="refsect2" lang="en"><a name="method-pangotabarray--copy"></a><h3>pango.TabArray.copy</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">copy</span>(<span class="methodparam"></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>a new <a href="class-pangotabarray.html" title="pango.TabArray"><tt class="classname">pango.TabArray</tt></a>
object</td></tr></tbody></table><p>The <tt class="methodname">copy</tt>() method returns a new <a href="class-pangotabarray.html" title="pango.TabArray"><tt class="classname">pango.TabArray</tt></a>
that is copy of this <a href="class-pangotabarray.html" title="pango.TabArray"><tt class="classname">pango.TabArray</tt></a>.</p></div><div class="refsect2" lang="en"><a name="method-pangotabarray--get-size"></a><h3>pango.TabArray.get_size</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_size</span>(<span class="methodparam"></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>the number of tab stops in the
array.</td></tr></tbody></table><p>The <tt class="methodname">get_size</tt>() method returns the
number of tab stops in the tab array.</p></div><div class="refsect2" lang="en"><a name="method-pangotabarray--resize"></a><h3>pango.TabArray.resize</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">resize</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>new_size</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>new_size</tt></b>:</span></td><td>the new size of the array</td></tr></tbody></table><p>The <tt class="methodname">resize</tt>() method sets the size of
the tab array to the value specified by <i class="parameter"><tt>new_size</tt></i>. You
must subsequently initialize any tabs that were added to the array.</p></div><div class="refsect2" lang="en"><a name="method-pangotabarray--set-tab"></a><h3>pango.TabArray.set_tab</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_tab</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>tab_index</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>alignment</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>location</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>tab_index</tt></b>:</span></td><td>the index of a tab stop</td></tr><tr><td><span class="term"><b class="parameter"><tt>alignment</tt></b>:</span></td><td>the tab alignment</td></tr><tr><td><span class="term"><b class="parameter"><tt>location</tt></b>:</span></td><td>the tab location in pango
units</td></tr></tbody></table><p>The <tt class="methodname">set_tab</tt>() method sets the specified
<i class="parameter"><tt>alignment</tt></i> and <i class="parameter"><tt>location</tt></i> of the
tab stop specified by <i class="parameter"><tt>tab_index</tt></i>. The value of
<i class="parameter"><tt>alignment</tt></i> must always be
<tt class="literal">pango.TAB_LEFT</tt> in the current implementation.</p></div><div class="refsect2" lang="en"><a name="method-pangotabarray--get-tab"></a><h3>pango.TabArray.get_tab</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_tab</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>tab_index</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>tab_index</tt></b>:</span></td><td>the tab stop index</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>a 2-tuple containing the tab alignment and
position</td></tr></tbody></table><p>The <tt class="methodname">get_tab</tt>() method returns a 2-tuple
containing the alignment and position of the tab stop specified by
<i class="parameter"><tt>tab_index</tt></i>.</p></div><div class="refsect2" lang="en"><a name="method-pangotabarray--get-tabs"></a><h3>pango.TabArray.get_tabs</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_tabs</span>()</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>a tuple containing a list of 2-tuples (each
holding the alignment and position of a tab stop).</td></tr></tbody></table><p>The <tt class="methodname">get_tabs</tt>() method returns a tuple
containing a list of 2-tuples (each holding the alignment and position of a
tab stop)</p></div><div class="refsect2" lang="en"><a name="method-pangotabarray--get-positions-in-pixels"></a><h3>pango.TabArray.get_positions_in_pixels</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_positions_in_pixels</span>(<span class="methodparam"></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td><tt class="literal">TRUE</tt> if tab stop positions
are specified in pixels</td></tr></tbody></table><p>The <tt class="methodname">get_positions_in_pixels</tt>() method
returns <i class="parameter"><tt>TRUE</tt></i> if the tab positions are specified in
pixels and <tt class="literal">FALSE</tt> if they are in pango units.</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-pangolayoutiter.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="pango-markup-language.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">pango.LayoutIter</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">The Pango Markup Language</td></tr></table></div></body></html>
|