File: class-gtkpapersize.html

package info (click to toggle)
pygtk 2.24.0-5.1
  • links: PTS, VCS
  • area: main
  • in suites: buster, stretch
  • size: 26,760 kB
  • ctags: 8,260
  • sloc: xml: 182,079; sh: 10,297; python: 10,161; ansic: 2,861; makefile: 1,358
file content (66 lines) | stat: -rw-r--r-- 33,130 bytes parent folder | download | duplicates (3)
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
<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.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-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" title="gtk.PaperSize"><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
      PyGTK 2.10)</p></div><div class="refsect1" title="Synopsis"><a name="id3826968"></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>):
<code class="constructorsynopsis">    <span class="methodname"><a class="link" 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 class="link" 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 class="link" 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 class="link" 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 class="link" 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 class="link" 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 class="link" 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 class="link" 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 class="link" 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 class="link" 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 class="link" 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 class="link" 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 class="link" 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 class="link" 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">
<span class="bold"><strong>Functions</strong></span>

<code class="methodsynopsis">    def <span class="methodname"><a class="link" 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 class="link" 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 class="link" 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" title="Description"><a name="id3827562"></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 class is available in PyGTK 2.10 and above.</p></div><p>A <a class="link" href="class-gtkpapersize.html" title="gtk.PaperSize"><code class="classname">gtk.PaperSize</code></a>
    handles paper sizes. It uses the standard called "PWG 5101.1-2002 PWG:
    Standard for Media Standardized Names" to name the paper sizes (and to
    get the data for the page sizes). The common standard paper sizes are
    named by the <a class="xref" href="gtk-constants.html#gtk-paper-name-constants" title="GTK Papaer Name Constants">GTK Papaer Name Constants</a>. In addition to
    standard paper sizes, <a class="link" href="class-gtkpapersize.html" title="gtk.PaperSize"><code class="classname">gtk.PaperSize</code></a>
    allows to construct custom paper sizes with arbitrary dimensions.</p><p>The <a class="link" href="class-gtkpapersize.html" title="gtk.PaperSize"><code class="classname">gtk.PaperSize</code></a>
    object stores not only the dimensions (width and height) of a paper size
    and its name, it also provides default print margins. </p></div><div class="refsect1" title="Constructor"><a name="id3827622"></a><h2>Constructor</h2><div class="refsect2" title="gtk.PaperSize"><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><p><span class="term"><strong class="parameter"><code>name</code></strong> :</span></p></td><td>a paper size name, or <code class="literal">None</code></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-gtkpapersize.html" title="gtk.PaperSize"><code class="classname">gtk.PaperSize</code></a>.</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.10 and above.</p></div><p>Creates a new <a class="link" href="class-gtkpapersize.html" title="gtk.PaperSize"><code class="classname">gtk.PaperSize</code></a>
      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
      default paper size is returned, see
      <code class="function">paper_size_get_default</code>().</p></div></div><div class="refsect1" title="Methods"><a name="id3827763"></a><h2>Methods</h2><div class="refsect2" title="gtk.PaperSize.copy"><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><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a copy of <em class="parameter"><code>other</code></em></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.10 and above.</p></div><p>The <code class="methodname">copy</code>() method copies an existing <a class="link" href="class-gtkpapersize.html" title="gtk.PaperSize"><code class="classname">gtk.PaperSize</code></a>.</p></div><div class="refsect2" title="gtk.PaperSize.is_equal"><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><p><span class="term"><strong class="parameter"><code>size2</code></strong> :</span></p></td><td>another <a class="link" href="class-gtkpapersize.html" title="gtk.PaperSize"><code class="classname">gtk.PaperSize</code></a>
          object</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code>, if this paper size and
          <em class="parameter"><code>size2</code></em> represent the same paper
          size</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.10 and above.</p></div><p>The <code class="methodname">is_equal</code>() method returns the
      result of comparing this paper size to the <a class="link" href="class-gtkpapersize.html" title="gtk.PaperSize"><code class="classname">gtk.PaperSize</code></a>
      specified by <em class="parameter"><code>size2</code></em>.</p></div><div class="refsect2" title="gtk.PaperSize.get_name"><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><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the name of the paper size</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.10 and above.</p></div><p>The <code class="methodname">get_name</code>() method returns the name
      of the paper size.</p></div><div class="refsect2" title="gtk.PaperSize.get_display_name"><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><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the human-readable name of the paper
          size.</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.10 and above.</p></div><p>The <code class="methodname">get_display_name</code>() method returns
      the human-readable name of the paper size.</p></div><div class="refsect2" title="gtk.PaperSize.get_ppd_name"><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><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the PPD name of the paper
          size or <code class="literal">None</code></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.10 and above.</p></div><p>The <code class="methodname">get_ppd_name</code>() method returns the
      PPD name of the paper size, which may be
      <code class="literal">None</code>.</p></div><div class="refsect2" title="gtk.PaperSize.get_width"><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><p><span class="term"><strong class="parameter"><code>unit</code></strong> :</span></p></td><td>the unit for the return value - one of the
          <a class="xref" href="gtk-constants.html#gtk-unit-constants" title="GTK Unit Constants">GTK Unit Constants</a>.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the paper width</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.10 and above.</p></div><p>The <code class="methodname">get_width</code>() method returns the
      paper width of the paper size, in units of
      <em class="parameter"><code>unit</code></em>.</p></div><div class="refsect2" title="gtk.PaperSize.get_height"><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><p><span class="term"><strong class="parameter"><code>unit</code></strong> :</span></p></td><td>the unit for the return value - one of the
          <a class="xref" href="gtk-constants.html#gtk-unit-constants" title="GTK Unit Constants">GTK Unit Constants</a>.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the paper height</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.10 and above.</p></div><p>The <code class="methodname">get_height</code>() method returns the
      paper height of the paper size, in units of
      <em class="parameter"><code>unit</code></em>.</p></div><div class="refsect2" title="gtk.PaperSize.is_custom"><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><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the paper size is a
          custom paper size.</td></tr></tbody></table><p>The <code class="methodname">is_custom</code>() method returns
      <code class="literal">True</code> if paper size is not a standard paper
      size.</p></div><div class="refsect2" title="gtk.PaperSize.set_size"><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><p><span class="term"><strong class="parameter"><code>width</code></strong> :</span></p></td><td>the new width in units of
          <em class="parameter"><code>unit</code></em></td></tr><tr><td><p><span class="term"><strong class="parameter"><code>height</code></strong> :</span></p></td><td>the new height in units of
          <em class="parameter"><code>unit</code></em></td></tr><tr><td><p><span class="term"><strong class="parameter"><code>unit</code></strong> :</span></p></td><td>the unit for <em class="parameter"><code>width</code></em> and
          <em class="parameter"><code>height</code></em> - one of the <a class="xref" href="gtk-constants.html#gtk-unit-constants" title="GTK Unit Constants">GTK Unit Constants</a>.</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.10 and above.</p></div><p>The <code class="methodname">set_size</code>() method changes the
      dimensions of the paper size to <em class="parameter"><code>width</code></em> x
      <em class="parameter"><code>height</code></em> in the units specified by
      <code class="literal">unit</code>.</p></div><div class="refsect2" title="gtk.PaperSize.get_default_top_margin"><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><p><span class="term"><strong class="parameter"><code>unit</code></strong> :</span></p></td><td>the unit for the return value - one of the
          <a class="xref" href="gtk-constants.html#gtk-unit-constants" title="GTK Unit Constants">GTK Unit Constants</a>.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the default top margin</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.10 and above.</p></div><p>The <code class="methodname">get_default_top_margin</code>() method
      returns the default top margin for the <a class="link" href="class-gtkpapersize.html" title="gtk.PaperSize"><code class="classname">gtk.PaperSize</code></a>.</p></div><div class="refsect2" title="gtk.PaperSize.get_default_bottom_margin"><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><p><span class="term"><strong class="parameter"><code>unit</code></strong> :</span></p></td><td>the unit for the return value - one of the
          <a class="xref" href="gtk-constants.html#gtk-unit-constants" title="GTK Unit Constants">GTK Unit Constants</a>.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the default bottom margin</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.10 and above.</p></div><p>The <code class="methodname">get_default_bottom_margin</code>() method
      gets the default bottom margin for the paper size.</p></div><div class="refsect2" title="gtk.PaperSize.get_default_left_margin"><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><p><span class="term"><strong class="parameter"><code>unit</code></strong> :</span></p></td><td>the unit for the return value - one of the
          <a class="xref" href="gtk-constants.html#gtk-unit-constants" title="GTK Unit Constants">GTK Unit Constants</a>.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the default left margin</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.10 and above.</p></div><p>The <code class="methodname">get_default_left_margin</code>() method
      gets the default left margin for the paper size.</p></div><div class="refsect2" title="gtk.PaperSize.get_default_right_margin"><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><p><span class="term"><strong class="parameter"><code>unit</code></strong> :</span></p></td><td>the unit for the return value - one of the
          <a class="xref" href="gtk-constants.html#gtk-unit-constants" title="GTK Unit Constants">GTK Unit Constants</a>.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the default right margin</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.10 and above.</p></div><p>The <code class="methodname">get_default_right_margin</code>() method
      gets the default right margin for the paper size.</p></div></div><div class="refsect1" title="Functions"><a name="id3829088"></a><h2>Functions</h2><div class="refsect2" title="gtk.paper_size_new_from_ppd"><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><p><span class="term"><strong class="parameter"><code>&gt;ppd_name</code></strong> :</span></p></td><td>a PPD paper name</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>ppd_display_name</code></strong> :</span></p></td><td>the corresponding human-readable
	  name</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>width</code></strong> :</span></p></td><td>the paper width, in points</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>height</code></strong> :</span></p></td><td>the paper height in points</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-gtkpapersize.html" title="gtk.PaperSize"><code class="classname">gtk.PaperSize</code></a></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 function is available in PyGTK 2.10 and above.</p></div><p>The <code class="function">paper_size new__from_ppd</code>() function
      creates a new <a class="link" href="class-gtkpapersize.html" title="gtk.PaperSize"><code class="classname">gtk.PaperSize</code></a>
      object by using PPD information.  If <em class="parameter"><code>ppd_name</code></em>
      is not a recognized PPD paper name,
      <em class="parameter"><code>ppd_display_name</code></em>, <em class="parameter"><code>width</code></em>
      and <em class="parameter"><code>height</code></em> are used to construct a custom <a class="link" href="class-gtkpapersize.html" title="gtk.PaperSize"><code class="classname">gtk.PaperSize</code></a>
      object.</p></div><div class="refsect2" title="gtk.paper_size_new_custom"><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><p><span class="term"><strong class="parameter"><code>&gt;name</code></strong> :</span></p></td><td>the paper name</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>display_name</code></strong> :</span></p></td><td>the corresponding human-readable
	  name</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>width</code></strong> :</span></p></td><td>the paper width, in units of
	  <em class="parameter"><code>unit</code></em></td></tr><tr><td><p><span class="term"><strong class="parameter"><code>height</code></strong> :</span></p></td><td>the paper height in units of
	  <em class="parameter"><code>unit</code></em></td></tr><tr><td><p><span class="term"><strong class="parameter"><code>unit</code></strong> :</span></p></td><td>the units - one of the <a class="xref" href="gtk-constants.html#gtk-unit-constants" title="GTK Unit Constants">GTK Unit Constants</a>.</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-gtkpapersize.html" title="gtk.PaperSize"><code class="classname">gtk.PaperSize</code></a></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 function is available in PyGTK 2.10 and above.</p></div><p>The <code class="function">paper_size_new_custom</code>() function
      creates a new <a class="link" href="class-gtkpapersize.html" title="gtk.PaperSize"><code class="classname">gtk.PaperSize</code></a>
      object with the given parameters.</p></div><div class="refsect2" title="gtk.paper_size_get_default"><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><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the name of the default paper
	  size.</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 function is available in PyGTK 2.10 and above.</p></div><p>The <code class="function">paper_size_get_default</code>() function
      returns the name of the default paper size, which depends on the
      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>