~ubuntu-branches/ubuntu/natty/pygtk/natty-proposed

« back to all changes in this revision

Viewing changes to docs/html/class-gtkmisc.html

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2010-01-07 11:08:47 UTC
  • mfrom: (1.2.8 upstream)
  • Revision ID: james.westby@ubuntu.com-20100107110847-f5av7e1ttudh7ra6
Tags: 2.17.0-0ubuntu1
New upstream version

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gtk.Misc</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.73.2"><link rel="start" 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-gtkmessagedialog.html" title="gtk.MessageDialog"><link rel="next" href="class-gtkmountoperation.html" title="gtk.MountOperation"></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.Misc</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gtkmessagedialog.html">Prev</a> </td><th width="60%" align="center">The gtk Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-gtkmountoperation.html">Next</a></td></tr></table><hr></div><div class="refentry" lang="en"><a name="class-gtkmisc"></a><div class="titlepage"></div><div class="refnamediv"><h2>gtk.Misc</h2><p>gtk.Misc — a base class for widgets with alignments and
2
 
padding.</p></div><div class="refsect1" lang="en"><a name="id3590155"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gtk.Misc</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-gtkwidget.html" title="gtk.Widget">gtk.Widget</a></span></span>):
3
 
<code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtkmisc.html#method-gtkmisc--set-alignment" title="gtk.Misc.set_alignment">set_alignment</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>xalign</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>yalign</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtkmisc.html#method-gtkmisc--get-alignment" title="gtk.Misc.get_alignment">get_alignment</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtkmisc.html#method-gtkmisc--set-padding" title="gtk.Misc.set_padding">set_padding</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>xpad</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>ypad</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtkmisc.html#method-gtkmisc--get-padding" title="gtk.Misc.get_padding">get_padding</a></span>(<span class="methodparam"></span>)</code><br></pre></td></tr></table></div><div class="refsect1" lang="en"><a name="id3590306"></a><h2>Ancestry</h2><pre class="synopsis">+-- <PYGTKDOCLINK HREF="class-gobject">gobject.GObject</PYGTKDOCLINK>
 
1
<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gtk.Misc</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.1"><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-gtkmessagedialog.html" title="gtk.MessageDialog"><link rel="next" href="class-gtkmountoperation.html" title="gtk.MountOperation"></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.Misc</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gtkmessagedialog.html">Prev</a> </td><th width="60%" align="center">The gtk Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-gtkmountoperation.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gtk.Misc"><a name="class-gtkmisc"></a><div class="titlepage"></div><div class="refnamediv"><h2>gtk.Misc</h2><p>gtk.Misc — a base class for widgets with alignments and
 
2
padding.</p></div><div class="refsect1" title="Synopsis"><a name="id3900048"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gtk.Misc</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-gtkwidget.html" title="gtk.Widget">gtk.Widget</a></span></span>):
 
3
<code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtkmisc.html#method-gtkmisc--set-alignment" title="gtk.Misc.set_alignment">set_alignment</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>xalign</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>yalign</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtkmisc.html#method-gtkmisc--get-alignment" title="gtk.Misc.get_alignment">get_alignment</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtkmisc.html#method-gtkmisc--set-padding" title="gtk.Misc.set_padding">set_padding</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>xpad</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>ypad</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtkmisc.html#method-gtkmisc--get-padding" title="gtk.Misc.get_padding">get_padding</a></span>(<span class="methodparam"></span>)</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id3900199"></a><h2>Ancestry</h2><pre class="synopsis">+-- <PYGTKDOCLINK HREF="class-gobject">gobject.GObject</PYGTKDOCLINK>
4
4
  +-- <a class="link" href="class-gtkobject.html" title="gtk.Object">gtk.Object</a>
5
5
    +-- <a class="link" href="class-gtkwidget.html" title="gtk.Widget">gtk.Widget</a>
6
6
      +-- <a class="link" href="class-gtkmisc.html" title="gtk.Misc">gtk.Misc</a>
7
 
</pre></div><div class="refsect1" lang="en"><a name="id3590344"></a><h2>Implemented Interfaces</h2><p>
 
7
</pre></div><div class="refsect1" title="Implemented Interfaces"><a name="id3900237"></a><h2>Implemented Interfaces</h2><p>
8
8
                        <a class="link" href="class-gtkmisc.html" title="gtk.Misc"><code class="classname">gtk.Misc</code></a>
9
9
                        implements 
10
10
                        <a class="link" href="class-gtkbuildable.html" title="gtk.Buildable"><code class="classname">gtk.Buildable</code></a>
11
 
                </p></div><div class="refsect1" lang="en"><a name="properties-gtkmisc"></a><h2>gtk.Misc Properties</h2><p><a class="link" href="class-gtkobject.html#properties-gtkobject" title="gtk.Object Properties">gtk.Object Properties</a></p><p><a class="link" href="class-gtkwidget.html#properties-gtkwidget" title="gtk.Widget Properties">gtk.Widget Properties</a></p><div class="blockquote"><table width="100%" border="0" bgcolor="#E0E0E0"><tr><td valign="top"><div class="informaltable"><table width="100%" border="0"><colgroup><col><col><col></colgroup><tbody><tr valign="top"><td valign="top">"xalign"</td><td valign="top">Read-Write</td><td valign="top">The horizontal alignment, from 0.0  to 1.0</td></tr><tr valign="top"><td valign="top">"xpad"</td><td valign="top">Read-Write</td><td valign="top">The amount of space to add on the left and right of the
 
11
                </p></div><div class="refsect1" title="gtk.Misc Properties"><a name="properties-gtkmisc"></a><h2>gtk.Misc Properties</h2><p><a class="link" href="class-gtkobject.html#properties-gtkobject" title="gtk.Object Properties">gtk.Object Properties</a></p><p><a class="link" href="class-gtkwidget.html#properties-gtkwidget" title="gtk.Widget Properties">gtk.Widget Properties</a></p><div class="blockquote"><table width="100%" border="0" bgcolor="#E0E0E0"><tr><td valign="top"><div class="informaltable"><table width="100%" border="0"><colgroup><col width="1in"><col width="1in"><col width="4in"></colgroup><tbody><tr valign="top"><td valign="top">"xalign"</td><td valign="top">Read-Write</td><td valign="top">The horizontal alignment, from 0.0  to 1.0</td></tr><tr valign="top"><td valign="top">"xpad"</td><td valign="top">Read-Write</td><td valign="top">The amount of space to add on the left and right of the
12
12
widget, in pixels</td></tr><tr valign="top"><td valign="top">"yalign"</td><td valign="top">Read-Write</td><td valign="top">The vertical alignment, from 0.0  to 1.0</td></tr><tr valign="top"><td valign="top">"ypad"</td><td valign="top">Read-Write</td><td valign="top">The amount of space to add above and below the widget,
13
 
in pixels</td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" lang="en"><a name="style-properties-gtkmisc"></a><h2>gtk.Misc Style Properties</h2><p><a class="link" href="class-gtkwidget.html#style-properties-gtkwidget" title="gtk.Widget Style Properties">gtk.Widget Style Properties</a></p></div><div class="refsect1" lang="en"><a name="signal-prototypes-gtkmisc"></a><h2>gtk.Misc Signal Prototypes</h2><p><PYGTKDOCLINK HREF="signal-prototypes-gobject">gobject.GObject Signal Prototypes</PYGTKDOCLINK></p><p><a class="link" href="class-gtkobject.html#signal-prototypes-gtkobject" title="gtk.Object Signal Prototypes">gtk.Object Signal Prototypes</a></p><p><a class="link" href="class-gtkwidget.html#signal-prototypes-gtkwidget" title="gtk.Widget Signal Prototypes">gtk.Widget Signal Prototypes</a></p></div><div class="refsect1" lang="en"><a name="id3590568"></a><h2>Description</h2><p>The <a class="link" href="class-gtkmisc.html" title="gtk.Misc"><code class="classname">gtk.Misc</code></a> widget is an
 
13
in pixels</td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" title="gtk.Misc Style Properties"><a name="style-properties-gtkmisc"></a><h2>gtk.Misc Style Properties</h2><p><a class="link" href="class-gtkwidget.html#style-properties-gtkwidget" title="gtk.Widget Style Properties">gtk.Widget Style Properties</a></p></div><div class="refsect1" title="gtk.Misc Signal Prototypes"><a name="signal-prototypes-gtkmisc"></a><h2>gtk.Misc Signal Prototypes</h2><p><PYGTKDOCLINK HREF="signal-prototypes-gobject">gobject.GObject Signal Prototypes</PYGTKDOCLINK></p><p><a class="link" href="class-gtkobject.html#signal-prototypes-gtkobject" title="gtk.Object Signal Prototypes">gtk.Object Signal Prototypes</a></p><p><a class="link" href="class-gtkwidget.html#signal-prototypes-gtkwidget" title="gtk.Widget Signal Prototypes">gtk.Widget Signal Prototypes</a></p></div><div class="refsect1" title="Description"><a name="id3900461"></a><h2>Description</h2><p>The <a class="link" href="class-gtkmisc.html" title="gtk.Misc"><code class="classname">gtk.Misc</code></a> widget is an
14
14
abstract widget used to derive subclasses which have alignment and padding
15
15
attributes. The horizontal and vertical padding attributes allow extra space
16
16
to be added around the widget. The horizontal and vertical alignment
19
19
minus the widget size) to place to the left or above the widget for x and y
20
20
alignment respectively. Note that if the widget is added to a container in
21
21
such a way that it expands automatically to fill its allocated area, the
22
 
alignment settings will have no effect.</p></div><div class="refsect1" lang="en"><a name="id3590597"></a><h2>Methods</h2><div class="refsect2" lang="en"><a name="method-gtkmisc--set-alignment"></a><h3>gtk.Misc.set_alignment</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_alignment</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>xalign</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>yalign</code></strong></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>xalign</code></strong> :</span></p></td><td>the horizontal alignment</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>yalign</code></strong> :</span></p></td><td>the vertical alignment</td></tr></tbody></table><p>The <code class="methodname">set_alignment</code>() method sets the
 
22
alignment settings will have no effect.</p></div><div class="refsect1" title="Methods"><a name="id3900490"></a><h2>Methods</h2><div class="refsect2" title="gtk.Misc.set_alignment"><a name="method-gtkmisc--set-alignment"></a><h3>gtk.Misc.set_alignment</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_alignment</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>xalign</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>yalign</code></strong></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>xalign</code></strong> :</span></p></td><td>the horizontal alignment</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>yalign</code></strong> :</span></p></td><td>the vertical alignment</td></tr></tbody></table><p>The <code class="methodname">set_alignment</code>() method sets the
23
23
alignment of the widget in its allocated space. <em class="parameter"><code>xalign</code></em>
24
24
sets the fraction (0.0-1.0) of free space (horizontal allocation minus
25
25
widget width) to place to the left of the widget.
26
26
<em class="parameter"><code>yalign</code></em> sets the fraction (0.0-1.0) of free space
27
 
(vertical allocation minus widget height) to place above the widget.</p></div><div class="refsect2" lang="en"><a name="method-gtkmisc--get-alignment"></a><h3>gtk.Misc.get_alignment</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_alignment</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 tuple containing the X and Y alignments of the
 
27
(vertical allocation minus widget height) to place above the widget.</p></div><div class="refsect2" title="gtk.Misc.get_alignment"><a name="method-gtkmisc--get-alignment"></a><h3>gtk.Misc.get_alignment</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_alignment</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 tuple containing the X and Y alignments of the
28
28
widget</td></tr></tbody></table><p>The <code class="methodname">get_alignment</code>() method returns a
29
29
tuple containing the X and Y alignments of the widget within its allocation.
30
 
See <a class="link" href="class-gtkmisc.html#method-gtkmisc--set-alignment" title="gtk.Misc.set_alignment"><code class="methodname">set_alignment</code>()</a>.</p></div><div class="refsect2" lang="en"><a name="method-gtkmisc--set-padding"></a><h3>gtk.Misc.set_padding</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_padding</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>xpad</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>ypad</code></strong></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>xpad</code></strong> :</span></p></td><td>the amount of space to add on the left and
 
30
See <a class="link" href="class-gtkmisc.html#method-gtkmisc--set-alignment" title="gtk.Misc.set_alignment"><code class="methodname">set_alignment</code>()</a>.</p></div><div class="refsect2" title="gtk.Misc.set_padding"><a name="method-gtkmisc--set-padding"></a><h3>gtk.Misc.set_padding</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_padding</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>xpad</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>ypad</code></strong></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>xpad</code></strong> :</span></p></td><td>the amount of space to add on the left and
31
31
right of the widget, in pixels.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>ypad</code></strong> :</span></p></td><td>the amount of space to add on the top and
32
32
bottom of the widget, in pixels.</td></tr></tbody></table><p>The <code class="methodname">set_padding</code>() method sets the
33
33
amount of space to add around the widget. The <em class="parameter"><code>xpad</code></em>
34
34
value specifies the number of pixels of padding to add to the left and right
35
35
of the widget. The <em class="parameter"><code>yalign</code></em> value specifies the number
36
 
of pixels to add above and below the widget.</p></div><div class="refsect2" lang="en"><a name="method-gtkmisc--get-padding"></a><h3>gtk.Misc.get_padding</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_padding</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 tuple containing the horizontal and vertical
 
36
of pixels to add above and below the widget.</p></div><div class="refsect2" title="gtk.Misc.get_padding"><a name="method-gtkmisc--get-padding"></a><h3>gtk.Misc.get_padding</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_padding</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 tuple containing the horizontal and vertical
37
37
padding in pixels for the widget.</td></tr></tbody></table><p>The <code class="methodname">get_padding</code>() method returns a
38
38
tuple containing the padding in the horizontal and vertical directions of
39
39
the widget. See <a class="link" href="class-gtkmisc.html#method-gtkmisc--set-padding" title="gtk.Misc.set_padding"><code class="methodname">set_padding</code>()</a>.</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-gtkmessagedialog.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-gtkmountoperation.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gtk.MessageDialog </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gtk.MountOperation</td></tr></table></div></body></html>