| 1 | <html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gtk.PaperSize</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.68.1"><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-gtkpaned.html" title="gtk.Paned"><link rel="next" href="class-gtkplug.html" title="gtk.Plug"></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.PaperSize</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gtkpaned.html">Prev</a>Â </td><th width="60%" align="center">The gtk Class Reference</th><td width="20%" align="right">Â <a accesskey="n" href="class-gtkplug.html">Next</a></td></tr></table><hr></div><div class="refentry" lang="en"><a name="class-gtkpapersize"></a><div class="titlepage"></div><div class="refnamediv"><h2>gtk.PaperSize</h2><p>gtk.PaperSize â an object providing support for named paper sizes (new in |
|---|
| 2 | PyGTK 2.10)</p></div><div class="refsect1" lang="en"><a name="id3329747"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gtk.PaperSize</span></span>(<span class="ooclass"><span class="classname">gobject.GBoxed</span></span>): |
|---|
| 3 | <code class="constructorsynopsis"> <span class="methodname"><a href="class-gtkpapersize.html#constructor-gtkpapersize" title="gtk.PaperSize">gtk.PaperSize</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>name</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtkpapersize.html#method-gtkpapersize--copy" title="gtk.PaperSize.copy">copy</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtkpapersize.html#method-gtkpapersize--is-equal" title="gtk.PaperSize.is_equal">is_equal</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>size2</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtkpapersize.html#method-gtkpapersize--get-name" title="gtk.PaperSize.get_name">get_name</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtkpapersize.html#method-gtkpapersize--get-display-name" title="gtk.PaperSize.get_display_name">get_display_name</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtkpapersize.html#method-gtkpapersize--get-ppd-name" title="gtk.PaperSize.get_ppd_name">get_ppd_name</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtkpapersize.html#method-gtkpapersize--get-width" title="gtk.PaperSize.get_width">get_width</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>unit</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtkpapersize.html#method-gtkpapersize--get-height" title="gtk.PaperSize.get_height">get_height</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>unit</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtkpapersize.html#method-gtkpapersize--is-custom" title="gtk.PaperSize.is_custom">is_custom</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtkpapersize.html#method-gtkpapersize--set-size" title="gtk.PaperSize.set_size">set_size</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>width</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>height</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>unit</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtkpapersize.html#method-gtkpapersize--get-default-top-margin" title="gtk.PaperSize.get_default_top_margin">get_default_top_margin</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>unit</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtkpapersize.html#method-gtkpapersize--get-default-bottom-margin" title="gtk.PaperSize.get_default_bottom_margin">get_default_bottom_margin</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>unit</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtkpapersize.html#method-gtkpapersize--get-default-left-margin" title="gtk.PaperSize.get_default_left_margin">get_default_left_margin</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>unit</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtkpapersize.html#method-gtkpapersize--get-default-right-margin" title="gtk.PaperSize.get_default_right_margin">get_default_right_margin</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>unit</code></strong></span></span>)</code><br></pre></td></tr></table><pre class="programlisting"> |
|---|
| 4 | <span class="bold"><strong>Functions</strong></span> |
|---|
| 5 | |
|---|
| 6 | <code class="methodsynopsis"> def <span class="methodname"><a href="class-gtkpapersize.html#function-gtk--paper-size-new-from-ppd" title="gtk.paper_size_new_from_ppd">gtk.paper_size_new_from_ppd</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>ppd_name</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>ppd_display_name</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>width</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>height</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtkpapersize.html#function-gtk--paper-size-new-custom" title="gtk.paper_size_new_custom">gtk.paper_size_new_cutom</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>name</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>display_name</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>width</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>height</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>unit</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtkpapersize.html#function-gtk--paper-size-get-default" title="gtk.paper_size_get_default">gtk.paper_size_get_default</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code></code></strong></span></span>)</code></pre></div><div class="refsect1" lang="en"><a name="id3330340"></a><h2>Description</h2><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This class is available in PyGTK 2.10 and above.</p></div><p>A <a href="class-gtkpapersize.html" title="gtk.PaperSize"><code class="classname">gtk.PaperSize</code></a> |
|---|
| 7 | handles paper sizes. It uses the standard called "PWG 5101.1-2002 PWG: |
|---|
| 8 | Standard for Media Standardized Names" to name the paper sizes (and to |
|---|
| 9 | get the data for the page sizes). The common standard paper sizes are |
|---|
| 10 | named by the <a href="gtk-constants.html#gtk-paper-name-constants">GTK Papaer Name Constants</a>. In addition to |
|---|
| 11 | standard paper sizes, <a href="class-gtkpapersize.html" title="gtk.PaperSize"><code class="classname">gtk.PaperSize</code></a> |
|---|
| 12 | allows to construct custom paper sizes with arbitrary dimensions.</p><p>The <a href="class-gtkpapersize.html" title="gtk.PaperSize"><code class="classname">gtk.PaperSize</code></a> |
|---|
| 13 | object stores not only the dimensions (width and height) of a paper size |
|---|
| 14 | and its name, it also provides default print margins. </p></div><div class="refsect1" lang="en"><a name="id3330400"></a><h2>Constructor</h2><div class="refsect2" lang="en"><a name="constructor-gtkpapersize"></a><h3>gtk.PaperSize</h3><pre class="programlisting"><code class="constructorsynopsis"> <span class="methodname">gtk.PaperSize</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>name</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><strong class="parameter"><code>name</code></strong>Â :</span></td><td>a paper size name, or <code class="literal">None</code></td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>Â :</span></td><td>a new <a href="class-gtkpapersize.html" title="gtk.PaperSize"><code class="classname">gtk.PaperSize</code></a>.</td></tr></tbody></table><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This constructor is available in PyGTK 2.10 and above.</p></div><p>Creates a new <a href="class-gtkpapersize.html" title="gtk.PaperSize"><code class="classname">gtk.PaperSize</code></a> |
|---|
| 15 | object by parsing a PWG 5101.1-2002 PWG paper name. </p><p>If <em class="parameter"><code>name</code></em> is <code class="literal">None</code>, the |
|---|
| 16 | default paper size is returned, see |
|---|
| 17 | <code class="function">paper_size_get_default</code>().</p></div></div><div class="refsect1" lang="en"><a name="id3330542"></a><h2>Methods</h2><div class="refsect2" lang="en"><a name="method-gtkpapersize--copy"></a><h3>gtk.PaperSize.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><span class="term"><span class="emphasis"><em>Returns</em></span>Â :</span></td><td>a copy of <em class="parameter"><code>other</code></em></td></tr></tbody></table><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.10 and above.</p></div><p>The <code class="methodname">copy</code>() method copies an existing <a href="class-gtkpapersize.html" title="gtk.PaperSize"><code class="classname">gtk.PaperSize</code></a>.</p></div><div class="refsect2" lang="en"><a name="method-gtkpapersize--is-equal"></a><h3>gtk.PaperSize.is_equal</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">is_equal</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>size2</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><strong class="parameter"><code>size2</code></strong>Â :</span></td><td>another <a href="class-gtkpapersize.html" title="gtk.PaperSize"><code class="classname">gtk.PaperSize</code></a> |
|---|
| 18 | object</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>Â :</span></td><td><code class="literal">True</code>, if this paper size and |
|---|
| 19 | <em class="parameter"><code>size2</code></em> represent the same paper |
|---|
| 20 | size</td></tr></tbody></table><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.10 and above.</p></div><p>The <code class="methodname">is_equal</code>() method returns the |
|---|
| 21 | result of comparing this paper size to the <a href="class-gtkpapersize.html" title="gtk.PaperSize"><code class="classname">gtk.PaperSize</code></a> |
|---|
| 22 | specified by <em class="parameter"><code>size2</code></em>.</p></div><div class="refsect2" lang="en"><a name="method-gtkpapersize--get-name"></a><h3>gtk.PaperSize.get_name</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_name</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>Â :</span></td><td>the name of the paper size</td></tr></tbody></table><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.10 and above.</p></div><p>The <code class="methodname">get_name</code>() method returns the name |
|---|
| 23 | of the paper size.</p></div><div class="refsect2" lang="en"><a name="method-gtkpapersize--get-display-name"></a><h3>gtk.PaperSize.get_display_name</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_display_name</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>Â :</span></td><td>the human-readable name of the paper |
|---|
| 24 | size.</td></tr></tbody></table><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.10 and above.</p></div><p>The <code class="methodname">get_display_name</code>() method returns |
|---|
| 25 | the human-readable name of the paper size.</p></div><div class="refsect2" lang="en"><a name="method-gtkpapersize--get-ppd-name"></a><h3>gtk.PaperSize.get_ppd_name</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_ppd_name</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>Â :</span></td><td>the PPD name of the paper |
|---|
| 26 | size or <code class="literal">None</code></td></tr></tbody></table><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.10 and above.</p></div><p>The <code class="methodname">get_ppd_name</code>() method returns the |
|---|
| 27 | PPD name of the paper size, which may be |
|---|
| 28 | <code class="literal">None</code>.</p></div><div class="refsect2" lang="en"><a name="method-gtkpapersize--get-width"></a><h3>gtk.PaperSize.get_width</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_width</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>unit</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><strong class="parameter"><code>unit</code></strong>Â :</span></td><td>the unit for the return value - one of the |
|---|
| 29 | <a href="gtk-constants.html#gtk-unit-constants">GTK Unit Constants</a>.</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>Â :</span></td><td>the paper width</td></tr></tbody></table><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.10 and above.</p></div><p>The <code class="methodname">get_width</code>() method returns the |
|---|
| 30 | paper width of the paper size, in units of |
|---|
| 31 | <em class="parameter"><code>unit</code></em>.</p></div><div class="refsect2" lang="en"><a name="method-gtkpapersize--get-height"></a><h3>gtk.PaperSize.get_height</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_height</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>unit</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><strong class="parameter"><code>unit</code></strong>Â :</span></td><td>the unit for the return value - one of the |
|---|
| 32 | <a href="gtk-constants.html#gtk-unit-constants">GTK Unit Constants</a>.</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>Â :</span></td><td>the paper height</td></tr></tbody></table><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.10 and above.</p></div><p>The <code class="methodname">get_height</code>() method returns the |
|---|
| 33 | paper height of the paper size, in units of |
|---|
| 34 | <em class="parameter"><code>unit</code></em>.</p></div><div class="refsect2" lang="en"><a name="method-gtkpapersize--is-custom"></a><h3>gtk.PaperSize.is_custom</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">is_custom</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>Â :</span></td><td><code class="literal">True</code> if the paper size is a |
|---|
| 35 | custom paper size.</td></tr></tbody></table><p>The <code class="methodname">is_custom</code>() method returns |
|---|
| 36 | <code class="literal">True</code> if paper size is not a standard paper |
|---|
| 37 | size.</p></div><div class="refsect2" lang="en"><a name="method-gtkpapersize--set-size"></a><h3>gtk.PaperSize.set_size</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_size</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>width</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>height</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>unit</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><strong class="parameter"><code>width</code></strong>Â :</span></td><td>the new width in units of |
|---|
| 38 | <em class="parameter"><code>unit</code></em></td></tr><tr><td><span class="term"><strong class="parameter"><code>height</code></strong>Â :</span></td><td>the new height in units of |
|---|
| 39 | <em class="parameter"><code>unit</code></em></td></tr><tr><td><span class="term"><strong class="parameter"><code>unit</code></strong>Â :</span></td><td>the unit for <em class="parameter"><code>width</code></em> and |
|---|
| 40 | <em class="parameter"><code>height</code></em> - one of the <a href="gtk-constants.html#gtk-unit-constants">GTK Unit Constants</a>.</td></tr></tbody></table><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.10 and above.</p></div><p>The <code class="methodname">set_size</code>() method changes the |
|---|
| 41 | dimensions of the paper size to <em class="parameter"><code>width</code></em> x |
|---|
| 42 | <em class="parameter"><code>height</code></em> in the units specified by |
|---|
| 43 | <code class="literal">unit</code>.</p></div><div class="refsect2" lang="en"><a name="method-gtkpapersize--get-default-top-margin"></a><h3>gtk.PaperSize.get_default_top_margin</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_default_top_margin</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>unit</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><strong class="parameter"><code>unit</code></strong>Â :</span></td><td>the unit for the return value - one of the |
|---|
| 44 | <a href="gtk-constants.html#gtk-unit-constants">GTK Unit Constants</a>.</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>Â :</span></td><td>the default top margin</td></tr></tbody></table><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.10 and above.</p></div><p>The <code class="methodname">get_default_top_margin</code>() method |
|---|
| 45 | returns the default top margin for the <a href="class-gtkpapersize.html" title="gtk.PaperSize"><code class="classname">gtk.PaperSize</code></a>.</p></div><div class="refsect2" lang="en"><a name="method-gtkpapersize--get-default-bottom-margin"></a><h3>gtk.PaperSize.get_default_bottom_margin</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_default_bottom_margin</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>unit</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><strong class="parameter"><code>unit</code></strong>Â :</span></td><td>the unit for the return value - one of the |
|---|
| 46 | <a href="gtk-constants.html#gtk-unit-constants">GTK Unit Constants</a>.</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>Â :</span></td><td>the default bottom margin</td></tr></tbody></table><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.10 and above.</p></div><p>The <code class="methodname">get_default_bottom_margin</code>() method |
|---|
| 47 | gets the default bottom margin for the paper size.</p></div><div class="refsect2" lang="en"><a name="method-gtkpapersize--get-default-left-margin"></a><h3>gtk.PaperSize.get_default_left_margin</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_default_left_margin</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>unit</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><strong class="parameter"><code>unit</code></strong>Â :</span></td><td>the unit for the return value - one of the |
|---|
| 48 | <a href="gtk-constants.html#gtk-unit-constants">GTK Unit Constants</a>.</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>Â :</span></td><td>the default left margin</td></tr></tbody></table><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.10 and above.</p></div><p>The <code class="methodname">get_default_left_margin</code>() method |
|---|
| 49 | gets the default left margin for the paper size.</p></div><div class="refsect2" lang="en"><a name="method-gtkpapersize--get-default-right-margin"></a><h3>gtk.PaperSize.get_default_right_margin</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_default_right_margin</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>unit</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><strong class="parameter"><code>unit</code></strong>Â :</span></td><td>the unit for the return value - one of the |
|---|
| 50 | <a href="gtk-constants.html#gtk-unit-constants">GTK Unit Constants</a>.</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>Â :</span></td><td>the default right margin</td></tr></tbody></table><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.10 and above.</p></div><p>The <code class="methodname">get_default_right_margin</code>() method |
|---|
| 51 | gets the default right margin for the paper size.</p></div></div><div class="refsect1" lang="en"><a name="id3331865"></a><h2>Functions</h2><div class="refsect2" lang="en"><a name="function-gtk--paper-size-new-from-ppd"></a><h3>gtk.paper_size_new_from_ppd</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">gtk.paper_size_new_from_ppd</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>ppd_name</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>ppd_display_name</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>width</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>height</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><strong class="parameter"><code>>ppd_name</code></strong>Â :</span></td><td>a PPD paper name</td></tr><tr><td><span class="term"><strong class="parameter"><code>ppd_display_name</code></strong>Â :</span></td><td>the corresponding human-readable |
|---|
| 52 | name</td></tr><tr><td><span class="term"><strong class="parameter"><code>width</code></strong>Â :</span></td><td>the paper width, in points</td></tr><tr><td><span class="term"><strong class="parameter"><code>height</code></strong>Â :</span></td><td>the paper height in points</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>Â :</span></td><td>a new <a href="class-gtkpapersize.html" title="gtk.PaperSize"><code class="classname">gtk.PaperSize</code></a></td></tr></tbody></table><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This function is available in PyGTK 2.10 and above.</p></div><p>The <code class="function">paper_size new__from_ppd</code>() function |
|---|
| 53 | creates a new <a href="class-gtkpapersize.html" title="gtk.PaperSize"><code class="classname">gtk.PaperSize</code></a> |
|---|
| 54 | object by using PPD information. If <em class="parameter"><code>ppd_name</code></em> |
|---|
| 55 | is not a recognized PPD paper name, |
|---|
| 56 | <em class="parameter"><code>ppd_display_name</code></em>, <em class="parameter"><code>width</code></em> |
|---|
| 57 | and <em class="parameter"><code>height</code></em> are used to construct a custom <a href="class-gtkpapersize.html" title="gtk.PaperSize"><code class="classname">gtk.PaperSize</code></a> |
|---|
| 58 | object.</p></div><div class="refsect2" lang="en"><a name="function-gtk--paper-size-new-custom"></a><h3>gtk.paper_size_new_custom</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">gtk.paper_size_new_custom</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>name</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>display_name</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>width</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>height</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>unit</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><strong class="parameter"><code>>name</code></strong>Â :</span></td><td>the paper name</td></tr><tr><td><span class="term"><strong class="parameter"><code>display_name</code></strong>Â :</span></td><td>the corresponding human-readable |
|---|
| 59 | name</td></tr><tr><td><span class="term"><strong class="parameter"><code>width</code></strong>Â :</span></td><td>the paper width, in units of |
|---|
| 60 | <em class="parameter"><code>unit</code></em></td></tr><tr><td><span class="term"><strong class="parameter"><code>height</code></strong>Â :</span></td><td>the paper height in units of |
|---|
| 61 | <em class="parameter"><code>unit</code></em></td></tr><tr><td><span class="term"><strong class="parameter"><code>unit</code></strong>Â :</span></td><td>the units - one of the <a href="gtk-constants.html#gtk-unit-constants">GTK Unit Constants</a>.</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>Â :</span></td><td>a new <a href="class-gtkpapersize.html" title="gtk.PaperSize"><code class="classname">gtk.PaperSize</code></a></td></tr></tbody></table><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This function is available in PyGTK 2.10 and above.</p></div><p>The <code class="function">paper_size_new_custom</code>() function |
|---|
| 62 | creates a new <a href="class-gtkpapersize.html" title="gtk.PaperSize"><code class="classname">gtk.PaperSize</code></a> |
|---|
| 63 | object with the given parameters.</p></div><div class="refsect2" lang="en"><a name="function-gtk--paper-size-get-default"></a><h3>gtk.paper_size_get_default</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">gtk.paper_size_get_default</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code></code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>Â :</span></td><td>the name of the default paper |
|---|
| 64 | size.</td></tr></tbody></table><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This function is available in PyGTK 2.10 and above.</p></div><p>The <code class="function">paper_size_get_default</code>() function |
|---|
| 65 | returns the name of the default paper size, which depends on the |
|---|
| 66 | current locale.</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-gtkpaned.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-gtkplug.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gtk.Paned </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gtk.Plug</td></tr></table></div></body></html> |
|---|