<?xml version="1.0" standalone="no"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
    "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">

<refentry id="class-pangotabarray">
  <refnamediv>
    <refname>pango.TabArray</refname>
    <refpurpose>an object containing an array of tab stops.</refpurpose>
  </refnamediv>

  <refsect1>
    <title>Synopsis</title>

    <classsynopsis language="python">
      <ooclass><classname>pango.TabArray</classname></ooclass>
      <ooclass><classname>gobject.GBoxed</classname></ooclass>
      <constructorsynopsis language="python">
	<methodname><link
linkend="constructor-pangotabarray">pango.TabArray</link></methodname>
	<methodparam><parameter
		       role="keyword">initial_size</parameter></methodparam>
	<methodparam><parameter
		       role="keyword">positions_in_pixels</parameter></methodparam>
      </constructorsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-pangotabarray--copy">copy</link></methodname>
	<methodparam></methodparam>  </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-pangotabarray--get-size">get_size</link></methodname>
	<methodparam></methodparam>  </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-pangotabarray--resize">resize</link></methodname>
	<methodparam><parameter
		       role="keyword">new_size</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-pangotabarray--set-tab">set_tab</link></methodname>
	<methodparam><parameter
		       role="keyword">tab_index</parameter></methodparam>
	<methodparam><parameter
		       role="keyword">alignment</parameter></methodparam>
	<methodparam><parameter
		       role="keyword">location</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-pangotabarray--get-tab">get_tab</link></methodname>
	<methodparam><parameter
		       role="keyword">tab_index</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-pangotabarray--get-tabs">get_tabs</link></methodname>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-pangotabarray--get-positions-in-pixels">get_positions_in_pixels</link></methodname>
	<methodparam></methodparam>  </methodsynopsis>
    </classsynopsis>

  </refsect1>

  <refsect1>
    <title>Description</title>

    <para>A <link
linkend="class-pangotabarray"><classname>pango.TabArray</classname></link>
object contains an array of tab stops. Each tab stop has an alignment and a
position.</para>

  </refsect1>

  <refsect1 id="constructor-pangotabarray">
    <title>Constructor</title>

    <programlisting><constructorsynopsis language="python">
	<methodname>pango.TabArray</methodname>
	<methodparam><parameter
		       role="keyword">initial_size</parameter></methodparam>
	<methodparam><parameter
		       role="keyword">positions_in_pixels</parameter></methodparam>
      </constructorsynopsis></programlisting>
    <variablelist>
      <varlistentry>
	<term><parameter
role="keyword">initial_size</parameter>&nbsp;:</term>
	<listitem><simpara>Initial number of tab stops to allocate, can be
0</simpara></listitem>
      </varlistentry>
      <varlistentry>
	<term><parameter
role="keyword">positions_in_pixels</parameter>&nbsp;:</term>
	<listitem><simpara>if <literal>True</literal> the tab positions are
in pixel units</simpara></listitem>
      </varlistentry>
      <varlistentry>
	<term><emphasis>Returns</emphasis>&nbsp;:</term>
	<listitem><simpara>a <link
linkend="class-pangotabarray"><classname>pango.TabArray</classname></link></simpara></listitem>
      </varlistentry>
    </variablelist>

    <para>Creates a new <link
linkend="class-pangotabarray"><classname>pango.TabArray</classname></link>
object with the number of tab stops specified by
<parameter>initial_size</parameter>. If
<parameter>positions_in_pixels</parameter> is <literal>True</literal>, the
tab stop positions are specified in pixel units otherwise in pango units
(one pixel = <literal>pango.SCALE</literal> pango units). All tab stops are
initially at position 0.</para>

  </refsect1>

  <refsect1>
    <title>Methods</title>

    <refsect2 id="method-pangotabarray--copy">
      <title>pango.TabArray.copy</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>copy</methodname>
	  <methodparam></methodparam>  </methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara>a new <link
linkend="class-pangotabarray"><classname>pango.TabArray</classname></link>
object</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>copy</methodname>() method returns a new <link
linkend="class-pangotabarray"><classname>pango.TabArray</classname></link>
that is copy of this <link
linkend="class-pangotabarray"><classname>pango.TabArray</classname></link>.</para>

    </refsect2>

    <refsect2 id="method-pangotabarray--get-size">
      <title>pango.TabArray.get_size</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>get_size</methodname>
	  <methodparam></methodparam>  </methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara>the number of tab stops in the
array.</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>get_size</methodname>() method returns the
number of tab stops in the tab array.</para>

    </refsect2>

    <refsect2 id="method-pangotabarray--resize">
      <title>pango.TabArray.resize</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>resize</methodname>
	  <methodparam><parameter
			 role="keyword">new_size</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter role="keyword">new_size</parameter>&nbsp;:</term>
	  <listitem><simpara>the new size of the array</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>resize</methodname>() method sets the size of
the tab array to the value specified by <parameter>new_size</parameter>. You
must subsequently initialize any tabs that were added to the array.</para>

    </refsect2>

    <refsect2 id="method-pangotabarray--set-tab">
      <title>pango.TabArray.set_tab</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>set_tab</methodname>
	  <methodparam><parameter
			 role="keyword">tab_index</parameter></methodparam>
	  <methodparam><parameter
			 role="keyword">alignment</parameter></methodparam>
	  <methodparam><parameter
			 role="keyword">location</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter
role="keyword">tab_index</parameter>&nbsp;:</term>
	  <listitem><simpara>the index of a tab stop</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter
role="keyword">alignment</parameter>&nbsp;:</term>
	  <listitem><simpara>the tab alignment</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter role="keyword">location</parameter>&nbsp;:</term>
	  <listitem><simpara>the tab location in pango
units</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>set_tab</methodname>() method sets the specified
<parameter>alignment</parameter> and <parameter>location</parameter> of the
tab stop specified by <parameter>tab_index</parameter>. The value of
<parameter>alignment</parameter> must always be
<literal>pango.TAB_LEFT</literal> in the current implementation.</para>

    </refsect2>

    <refsect2 id="method-pangotabarray--get-tab">
      <title>pango.TabArray.get_tab</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>get_tab</methodname>
	  <methodparam><parameter
			 role="keyword">tab_index</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter
role="keyword">tab_index</parameter>&nbsp;:</term>
	  <listitem><simpara>the tab stop index</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara>a 2-tuple containing the tab alignment and
position</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>get_tab</methodname>() method returns a 2-tuple
containing the alignment and position of the tab stop specified by
<parameter>tab_index</parameter>.</para>

    </refsect2>

    <refsect2 id="method-pangotabarray--get-tabs">
      <title>pango.TabArray.get_tabs</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>get_tabs</methodname>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara>a tuple containing a list of 2-tuples (each
holding the alignment and position of a tab stop).</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>get_tabs</methodname>() method returns a tuple
containing a list of 2-tuples (each holding the alignment and position of a
tab stop)</para>

    </refsect2>

    <refsect2 id="method-pangotabarray--get-positions-in-pixels">
      <title>pango.TabArray.get_positions_in_pixels</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>get_positions_in_pixels</methodname>
	  <methodparam></methodparam>  </methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara><literal>True</literal> if tab stop positions
are specified in pixels</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>get_positions_in_pixels</methodname>() method
returns <parameter>True</parameter> if the tab positions are specified in
pixels and <literal>False</literal> if they are in pango units.</para>

    </refsect2>

  </refsect1>

</refentry>
