1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
|
<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gtk.Border</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="gtk-class-reference.html" title="The gtk Class Reference"><link rel="prev" href="class-gtkbin.html" title="gtk.Bin"><link rel="next" href="class-gtkbox.html" title="gtk.Box"></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">gtk.Border</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gtkbin.html">Prev</a> </td><th width="60%" align="center">The gtk Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-gtkbox.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gtk.Border"><a name="class-gtkborder"></a><div class="titlepage"></div><div class="refnamediv"><h2>gtk.Border</h2><p>gtk.Border — an object containing data for a border (new in PyGTK 2.4)</p></div><div class="refsect1" title="Synopsis"><a name="id3533375"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gtk.Border</span></span>(<span class="ooclass"><span class="classname">gobject.GBoxed</span></span>):
<code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkborder.html#method-gtkborder--copy" title="gtk.Border.copy">copy</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkborder.html#method-gtkborder--free" title="gtk.Border.free">free</a></span>(<span class="methodparam"></span>)</code><br></pre></td></tr></table></div><div class="refsect1" title="Attributes"><a name="id3530889"></a><h2>Attributes</h2><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>All attributes are available in PyGTK 2.16 and above.</p></div><div class="blockquote"><table width="100%" border="0" bgcolor="#E0E0E0"><tr><td valign="top"><div class="informaltable"><table cellpadding="5" width="100%" border="0"><colgroup><col width="1in"><col width="1in"><col width="4in"></colgroup><tbody><tr valign="top"><td valign="top">"left"</td><td valign="top">Read-Write</td><td valign="top">The width of the left border margin.</td></tr><tr valign="top"><td valign="top">"right"</td><td valign="top">Read-Write</td><td valign="top">The width of the right border margin.</td></tr><tr valign="top"><td valign="top">"top"</td><td valign="top">Read-Write</td><td valign="top">The width of the bottom border margin.</td></tr><tr valign="top"><td valign="top">"bottom"</td><td valign="top">Read-Write</td><td valign="top">The width of the bottom border margin.</td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" title="Description"><a name="id3560133"></a><h2>Description</h2><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This object is available in PyGTK 2.4 and above.</p></div><p>A <a class="link" href="class-gtkborder.html" title="gtk.Border"><code class="classname">gtk.Border</code></a> object
contains the integer values for the left, right, top and bottom values of a
border. <a class="link" href="class-gtkborder.html" title="gtk.Border"><code class="classname">gtk.Border</code></a> is used
in <a class="link" href="class-gtkstyle.html" title="gtk.Style"><code class="classname">gtk.Style</code></a>
specifications. <a class="link" href="class-gtkborder.html" title="gtk.Border"><code class="classname">gtk.Border</code></a> has two
methods: <a class="link" href="class-gtkborder.html#method-gtkborder--copy" title="gtk.Border.copy"><code class="methodname">copy</code>()</a> and
<a class="link" href="class-gtkborder.html#method-gtkborder--free" title="gtk.Border.free"><code class="methodname">free</code>()</a>.</p><p>Starting with PyGTK 2.16 you can also
treat <a class="link" href="class-gtkborder.html" title="gtk.Border"><code class="classname">gtk.Border</code></a>
objects as sequences of 4 integer values. E.g. you can convert to a tuple or read
and assign individual values by index.</p></div><div class="refsect1" title="Constructor"><a name="constructor-gtkborder"></a><h2>Constructor</h2><pre class="programlisting"><code class="constructorsynopsis"> <span class="methodname">gtk.Border</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>left</code></strong></span><span class="initializer">=0</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>right</code></strong></span><span class="initializer">=0</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>top</code></strong></span><span class="initializer">=0</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>bottom</code></strong></span><span class="initializer">=0</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>left</code></strong> :</span></p></td><td>the width of the left margin</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>right</code></strong> :</span></p></td><td>the width of the right margin</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>top</code></strong> :</span></p></td><td>the width of the top margin</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>bottom</code></strong> :</span></p></td><td>the width of the bottom margin</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a new <a class="link" href="class-gdkrectangle.html" title="gtk.gdk.Rectangle"><code class="classname">gtk.gdk.Rectangle</code></a>
object</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 constructor is available in PyGTK 2.16 and above.</p></div><p>Creates a
new <a class="link" href="class-gtkborder.html" title="gtk.Border"><code class="classname">gtk.Border</code></a> with
the attributes specified
by <em class="parameter"><code>left</code></em>, <em class="parameter"><code>right</code></em>, <em class="parameter"><code>top</code></em>
and <em class="parameter"><code>bottom</code></em>. Any unspecified attributes default to 0.</p></div><div class="refsect1" title="Methods"><a name="id3068521"></a><h2>Methods</h2><div class="refsect2" title="gtk.Border.copy"><a name="method-gtkborder--copy"></a><h3>gtk.Border.copy</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">copy</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 copy of the border.</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.4 and above.</p></div><p>The <code class="methodname">copy</code>() method returns a copy of the
border object.</p></div><div class="refsect2" title="gtk.Border.free"><a name="method-gtkborder--free"></a><h3>gtk.Border.free</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">free</span>(<span class="methodparam"></span>)</code></pre><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.4 and above.</p></div><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 can
crash your application.</p></div><p>The <code class="methodname">free</code>() method frees the memory used
by the border.</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-gtkbin.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gtk-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-gtkbox.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gtk.Bin </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gtk.Box</td></tr></table></div></body></html>
|