<?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-gtkborder">
  <refnamediv>
    <refname>gtk.Border</refname>
    <refpurpose>an object containing data for a border (new in PyGTK 2.4)</refpurpose>
  </refnamediv>

  <refsect1>
    <title>Synopsis</title>

    <classsynopsis language="python">
      <ooclass><classname>gtk.Border</classname></ooclass>
      <ooclass><classname>gobject.GBoxed</classname></ooclass>
      <methodsynopsis language="python">
	<methodname><link linkend="method-gtkborder--copy">copy</link></methodname>
	<methodparam></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link linkend="method-gtkborder--free">free</link></methodname>
	<methodparam></methodparam>
      </methodsynopsis>
    </classsynopsis>
  </refsect1>

  <refsect1>
    <title>Attributes</title>

    <note>
      <para>All attributes are available in PyGTK 2.16 and above.</para>
    </note>

    <blockquote role="properties">
      <informaltable pgwide="1" frame="none">
	<tgroup cols="3">
	<?dbhtml cellpadding="5"?>
	  <colspec column="1" colwidth="1in"/>
	  <colspec column="2" colwidth="1in"/>
	  <colspec column="3" colwidth="4in"/>
	  <tbody>

	    <row valign="top">
	      <entry>"left"</entry>
	      <entry>Read-Write</entry>
	      <entry>The width of the left border margin.</entry>
	    </row>

	    <row valign="top">
	      <entry>"right"</entry>
	      <entry>Read-Write</entry>
	      <entry>The width of the right border margin.</entry>
	    </row>

	    <row valign="top">
	      <entry>"top"</entry>
	      <entry>Read-Write</entry>
	      <entry>The width of the bottom border margin.</entry>
	    </row>

	    <row valign="top">
	      <entry>"bottom"</entry>
	      <entry>Read-Write</entry>
	      <entry>The width of the bottom border margin.</entry>
	    </row>
	  </tbody>
	</tgroup>
      </informaltable>
    </blockquote>
  </refsect1>

  <refsect1>
    <title>Description</title>

      <note>
	<para>This object is available in PyGTK 2.4 and above.</para>
      </note>

    <para>A <link
linkend="class-gtkborder"><classname>gtk.Border</classname></link> object
contains the integer values for the left, right, top and bottom values of a
border. <link
linkend="class-gtkborder"><classname>gtk.Border</classname></link> is used
in <link linkend="class-gtkstyle"><classname>gtk.Style</classname></link>
specifications. <link
linkend="class-gtkborder"><classname>gtk.Border</classname></link> has two
methods: <link
linkend="method-gtkborder--copy"><methodname>copy</methodname>()</link> and
<link
linkend="method-gtkborder--free"><methodname>free</methodname>()</link>.</para>

    <para>Starting with PyGTK 2.16 you can also
      treat <link linkend="class-gtkborder"><classname>gtk.Border</classname></link>
      objects as sequences of 4 integer values.  E.g. you can convert to a tuple or read
      and assign individual values by index.</para>
  </refsect1>

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

    <programlisting><constructorsynopsis language="python">
	<methodname>gtk.Border</methodname>
	<methodparam><parameter
		       role="keyword">left</parameter>
	  <initializer>0</initializer></methodparam>
	<methodparam><parameter
		       role="keyword">right</parameter>
	  <initializer>0</initializer></methodparam>
	<methodparam><parameter
		       role="keyword">top</parameter>
	  <initializer>0</initializer></methodparam>
	<methodparam><parameter
		       role="keyword">bottom</parameter>
	  <initializer>0</initializer></methodparam>
      </constructorsynopsis></programlisting>
    <variablelist>
      <varlistentry>
	<term><parameter role="keyword">left</parameter>&nbsp;:</term>
	<listitem><simpara>the width of the left margin</simpara></listitem>
      </varlistentry>
      <varlistentry>
	<term><parameter role="keyword">right</parameter>&nbsp;:</term>
	<listitem><simpara>the width of the right margin</simpara></listitem>
      </varlistentry>
      <varlistentry>
	<term><parameter role="keyword">top</parameter>&nbsp;:</term>
	<listitem><simpara>the width of the top margin</simpara></listitem>
      </varlistentry>
      <varlistentry>
	<term><parameter role="keyword">bottom</parameter>&nbsp;:</term>
	<listitem><simpara>the width of the bottom margin</simpara></listitem>
      </varlistentry>
      <varlistentry>
	<term><emphasis>Returns</emphasis>&nbsp;:</term>
	<listitem><simpara>a new <link
linkend="class-gdkrectangle"><classname>gtk.gdk.Rectangle</classname></link>
object</simpara></listitem>
      </varlistentry>
    </variablelist>

    <note>
      <para>This constructor is available in PyGTK 2.16 and above.</para>
    </note>

    <para>Creates a
      new <link linkend="class-gtkborder"><classname>gtk.Border</classname></link> with
      the attributes specified
      by <parameter>left</parameter>, <parameter>right</parameter>, <parameter>top</parameter>
      and <parameter>bottom</parameter>. Any unspecified attributes default to 0.</para>
  </refsect1>

  <refsect1>
    <title>Methods</title>

    <refsect2 id="method-gtkborder--copy">
      <title>gtk.Border.copy</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>copy</methodname>
	  <methodparam></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara>a copy of the border.</simpara></listitem>
	</varlistentry>
      </variablelist>

      <note>
	<para>This method is available in PyGTK 2.4 and above.</para>
      </note>

      <para>The <methodname>copy</methodname>() method returns a copy of the
border object.</para>

    </refsect2>

    <refsect2 id="method-gtkborder--free">
      <title>gtk.Border.free</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>free</methodname>
	  <methodparam></methodparam>
	</methodsynopsis></programlisting>
      <note>
	<para>This method is available in PyGTK 2.4 and above.</para>
      </note>

      <warning>
        <para>This method is deprecated and should not be used since it can
        crash your application.</para>
      </warning>

      <para>The <methodname>free</methodname>() method frees the memory used
      by the border.</para>

    </refsect2>

  </refsect1>

</refentry>
