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
|
<?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> :</term>
<listitem><simpara>the width of the left margin</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter role="keyword">right</parameter> :</term>
<listitem><simpara>the width of the right margin</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter role="keyword">top</parameter> :</term>
<listitem><simpara>the width of the top margin</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter role="keyword">bottom</parameter> :</term>
<listitem><simpara>the width of the bottom margin</simpara></listitem>
</varlistentry>
<varlistentry>
<term><emphasis>Returns</emphasis> :</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> :</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>
|