/usr/share/gtk-doc/html/pygtk/class-gtkaspectframe.html is in python-gtk2-doc 2.24.0-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 | <html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gtk.AspectFrame</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-gtkarrow.html" title="gtk.Arrow"><link rel="next" href="class-gtkassistant.html" title="gtk.Assistant"></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.AspectFrame</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gtkarrow.html">Prev</a> </td><th width="60%" align="center">The gtk Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-gtkassistant.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gtk.AspectFrame"><a name="class-gtkaspectframe"></a><div class="titlepage"></div><div class="refnamediv"><h2>gtk.AspectFrame</h2><p>gtk.AspectFrame — A frame that constrains its child to a particular aspect
ratio.</p></div><div class="refsect1" title="Synopsis"><a name="id3458219"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gtk.AspectFrame</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-gtkframe.html" title="gtk.Frame">gtk.Frame</a></span></span>):
<code class="constructorsynopsis"> <span class="methodname"><a class="link" href="class-gtkaspectframe.html#constructor-gtkaspectframe" title="Constructor">gtk.AspectFrame</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>label</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>xalign</code></strong></span><span class="initializer">=0.5</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>yalign</code></strong></span><span class="initializer">=0.5</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>ratio</code></strong></span><span class="initializer">=1.0</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>obey_child</code></strong></span><span class="initializer">=True</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkaspectframe.html#method-gtkaspectframe--set" title="gtk.AspectFrame.set">set</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>xalign</code></strong></span><span class="initializer">=0.0</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>yalign</code></strong></span><span class="initializer">=0.0</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>ratio</code></strong></span><span class="initializer">=1.0</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>obey_child</code></strong></span><span class="initializer">=True</span></span>)</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id3420081"></a><h2>Ancestry</h2><pre class="synopsis">+-- <PYGTKDOCLINK HREF="class-gobject">gobject.GObject</PYGTKDOCLINK>
+-- <a class="link" href="class-gtkobject.html" title="gtk.Object">gtk.Object</a>
+-- <a class="link" href="class-gtkwidget.html" title="gtk.Widget">gtk.Widget</a>
+-- <a class="link" href="class-gtkcontainer.html" title="gtk.Container">gtk.Container</a>
+-- <a class="link" href="class-gtkbin.html" title="gtk.Bin">gtk.Bin</a>
+-- <a class="link" href="class-gtkframe.html" title="gtk.Frame">gtk.Frame</a>
+-- <a class="link" href="class-gtkaspectframe.html" title="gtk.AspectFrame">gtk.AspectFrame</a>
</pre></div><div class="refsect1" title="Implemented Interfaces"><a name="id3558717"></a><h2>Implemented Interfaces</h2><p>
<a class="link" href="class-gtkaspectframe.html" title="gtk.AspectFrame"><code class="classname">gtk.AspectFrame</code></a>
implements
<a class="link" href="class-gtkbuildable.html" title="gtk.Buildable"><code class="classname">gtk.Buildable</code></a>
</p></div><div class="refsect1" title="gtk.AspectFrame Properties"><a name="properties-gtkaspectframe"></a><h2>gtk.AspectFrame 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><p><a class="link" href="class-gtkcontainer.html#properties-gtkcontainer" title="gtk.Container Properties">gtk.Container Properties</a></p><p><a class="link" href="class-gtkframe.html#properties-gtkframe" title="gtk.Frame Properties">gtk.Frame 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="4.5in"></colgroup><tbody><tr valign="top"><td valign="top">"obey-child"</td><td valign="top">Read/Write</td><td valign="top">Make aspect ratio match that of the child widget</td></tr><tr valign="top"><td valign="top">"xalign"</td><td valign="top">Read/Write</td><td valign="top">The fraction of horizontal <span class="emphasis"><em>free</em></span> space
to the left of the child. 0.0 means no <span class="emphasis"><em>free</em></span>
space to the left, 1.0 means all <span class="emphasis"><em>free</em></span> space
to the left.</td></tr><tr valign="top"><td valign="top">"ratio"</td><td valign="top">Read/Write</td><td valign="top">The aspect ratio of the widget in the range of 0.0001 to
10000.0 if "obey-child" is <code class="literal">False</code>.</td></tr><tr valign="top"><td valign="top">"yalign"</td><td valign="top">Read/Write</td><td valign="top">The fraction of vertical <span class="emphasis"><em>free</em></span> space
above the child. 0.0 means no <span class="emphasis"><em>free</em></span> space
above, 1.0 means all <span class="emphasis"><em>free</em></span> space
above.</td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" title="gtk.AspectFrame Style Properties"><a name="style-properties-gtkaspectframe"></a><h2>gtk.AspectFrame 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.AspectFrame Signal Prototypes"><a name="signal-prototypes-gtkaspectframe"></a><h2>gtk.AspectFrame 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><p><a class="link" href="class-gtkcontainer.html#signal-prototypes-gtkcontainer" title="gtk.Container Signal Prototypes">gtk.Container Signal Prototypes</a></p></div><div class="refsect1" title="Description"><a name="id3547537"></a><h2>Description</h2><p>The <a class="link" href="class-gtkaspectframe.html" title="gtk.AspectFrame"><code class="classname">gtk.AspectFrame</code></a>
packs a widget so that it can resize but always retains the same aspect
ratio. For instance, one might be drawing a small preview of a larger image.
<a class="link" href="class-gtkaspectframe.html" title="gtk.AspectFrame"><code class="classname">gtk.AspectFrame</code></a>
derives from <a class="link" href="class-gtkframe.html" title="gtk.Frame"><code class="classname">gtk.Frame</code></a>, so it can
draw a label and a frame around the child. The frame will be
"shrink-wrapped" to the size of the child.</p><p>The aspect frame "ratio" property determines the widget
width:height ratio. An aspect ratio of 0.5 means the width is one half the
height; an aspect ratio of 2.0 means the width is twice the height. The
default value for the "ratio" property is 1.0.</p><p>The align properties are used to place the child widget within the
available area by specifying the fraction of <span class="emphasis"><em>free</em></span> space
(space in the aspect frame that is not used by the child widget) that is
placed above or to the left of the child widget. The values range from 0.0
(meaning no <span class="emphasis"><em>free</em></span> space above or to the left of the
child) to 1.0 (meaning all <span class="emphasis"><em>free</em></span> space above or to the
left of the child) . The default value for both align properties is
0.5.</p><p>If the "obey-child" property is True (the default value), the
"ratio" property is ignored and the aspect ratio is set by the child
widget.</p></div><div class="refsect1" title="Constructor"><a name="constructor-gtkaspectframe"></a><h2>Constructor</h2><pre class="programlisting"><code class="constructorsynopsis"> <span class="methodname">gtk.AspectFrame</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>label</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>xalign</code></strong></span><span class="initializer">=0.5</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>yalign</code></strong></span><span class="initializer">=0.5</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>ratio</code></strong></span><span class="initializer">=1.0</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>obey_child</code></strong></span><span class="initializer">=True</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>label</code></strong> :</span></p></td><td>a string used to set the aspect frame
label</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>xalign</code></strong> :</span></p></td><td>The fraction of horizontal
<span class="emphasis"><em>free</em></span> space to the left of the child. 0.0 means no
<span class="emphasis"><em>free</em></span> space to the left, 1.0 means all
<span class="emphasis"><em>free</em></span> space to the left.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>yalign</code></strong> :</span></p></td><td>The fraction of vertical
<span class="emphasis"><em>free</em></span> space above the child. 0.0 means no
<span class="emphasis"><em>free</em></span> space above, 1.0 means all
<span class="emphasis"><em>free</em></span> space above.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>ratio</code></strong> :</span></p></td><td>the ratio of the child width to height (in the
range 0.0001 to 10000.0) if <em class="parameter"><code>obey_child</code></em> is
False</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>obey_child</code></strong> :</span></p></td><td>if True, <em class="parameter"><code>ratio</code></em> is ignored,
and the aspect ratio is taken from the requisition of the
child.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a new aspect frame object</td></tr></tbody></table><p>Creates a new aspect frame object with the specified
<em class="parameter"><code>label</code></em>, <em class="parameter"><code>xalign</code></em> and
<em class="parameter"><code>yalign</code></em> values. The default values are:
<em class="parameter"><code>label</code></em>, None; <em class="parameter"><code>xalign</code></em>, 0.5; and,
<em class="parameter"><code>yalign</code></em>, 0.5. If <em class="parameter"><code>obey_child</code></em> is
True the <em class="parameter"><code>ratio</code></em> value is ignored. If
<em class="parameter"><code>obey_child</code></em> is False, <em class="parameter"><code>ratio</code></em>
sets the aspect ratio for the child widget. The default value for
<em class="parameter"><code>ratio</code></em> is 1.0. The default value for
<em class="parameter"><code>obey_child</code></em> is True.</p></div><div class="refsect1" title="Methods"><a name="id3166867"></a><h2>Methods</h2><div class="refsect2" title="gtk.AspectFrame.set"><a name="method-gtkaspectframe--set"></a><h3>gtk.AspectFrame.set</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>xalign</code></strong></span><span class="initializer">=0.0</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>yalign</code></strong></span><span class="initializer">=0.0</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>ratio</code></strong></span><span class="initializer">=1.0</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>obey_child</code></strong></span><span class="initializer">=True</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 fraction of horizontal
<span class="emphasis"><em>free</em></span> space to the left of the child. 0.0 means no
<span class="emphasis"><em>free</em></span> space to the left, 1.0 means all
<span class="emphasis"><em>free</em></span> space to the left.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>yalign</code></strong> :</span></p></td><td>The fraction of vertical
<span class="emphasis"><em>free</em></span> space above the child. 0.0 means no
<span class="emphasis"><em>free</em></span> space above, 1.0 means all
<span class="emphasis"><em>free</em></span> space above.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>ratio</code></strong> :</span></p></td><td>the ratio of the child width to height (in the
range 0.0001 to 10000.0) if <em class="parameter"><code>obey_child</code></em> is
False</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>obey_child</code></strong> :</span></p></td><td>if True, <em class="parameter"><code>ratio</code></em> is
ignored, and the aspect ratio is taken from the requisition of the
child</td></tr></tbody></table><p>The <code class="methodname">set</code>() method changes the aspect
frame properties to the values specified by <em class="parameter"><code>xalign</code></em>,
<em class="parameter"><code>yalign</code></em>, <em class="parameter"><code>ratio</code></em> and
<em class="parameter"><code>obey_child</code></em>. The default values are:
<em class="parameter"><code>xalign</code></em>, 0; <em class="parameter"><code>yalign</code></em>, 0.0;
<em class="parameter"><code>ratio</code></em>, 1.0; and, <em class="parameter"><code>obey_child</code></em>,
True.</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-gtkarrow.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-gtkassistant.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gtk.Arrow </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gtk.Assistant</td></tr></table></div></body></html>
|