/usr/share/gtk-doc/html/pygtk/class-gtkpagesetup.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 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 | <html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gtk.PageSetup</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-gtkoptionmenu.html" title="gtk.OptionMenu"><link rel="next" href="class-gtkpaned.html" title="gtk.Paned"></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.PageSetup</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gtkoptionmenu.html">Prev</a> </td><th width="60%" align="center">The gtk Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-gtkpaned.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gtk.PageSetup"><a name="class-gtkpagesetup"></a><div class="titlepage"></div><div class="refnamediv"><h2>gtk.PageSetup</h2><p>gtk.PageSetup — an object that stores page setup information (new in PyGTK
2.10)</p></div><div class="refsect1" title="Synopsis"><a name="id3819343"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gtk.PageSetup</span></span>(<span class="ooclass"><span class="classname"><PYGTKDOCLINK HREF="class-gobject">gobject.GObject</PYGTKDOCLINK></span></span>):
<code class="constructorsynopsis"> <span class="methodname"><a class="link" href="class-gtkpagesetup.html#constructor-gtkpagesetup" title="gtk.PageSetup">gtk.PageSetup</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkpagesetup.html#method-gtkpagesetup--copy" title="gtk.PageSetup.copy">copy</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkpagesetup.html#method-gtkpagesetup--get-orientation" title="gtk.PageSetup.get_orientation">get_orientation</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkpagesetup.html#method-gtkpagesetup--set-orientation" title="gtk.PageSetup.set_orientation">set_orientation</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>orientation</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkpagesetup.html#method-gtkpagesetup--get-paper-size" title="gtk.PageSetup.get_paper_size">get_paper_size</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkpagesetup.html#method-gtkpagesetup--set-paper-size" title="gtk.PageSetup.set_paper_size">set_paper_size</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>size</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkpagesetup.html#method-gtkpagesetup--get-top-margin" title="gtk.PageSetup.get_top_margin">get_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-gtkpagesetup.html#method-gtkpagesetup--set-top-margin" title="gtk.PageSetup.set_top_margin">set_top_margin</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>margin</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-gtkpagesetup.html#method-gtkpagesetup--get-bottom-margin" title="gtk.PageSetup.get_bottom_margin">get_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-gtkpagesetup.html#method-gtkpagesetup--set-bottom-margin" title="gtk.PageSetup.set_bottom_margin">set_bottom_margin</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>margin</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-gtkpagesetup.html#method-gtkpagesetup--get-left-margin" title="gtk.PageSetup.get_left_margin">get_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-gtkpagesetup.html#method-gtkpagesetup--set-left-margin" title="gtk.PageSetup.set_left_margin">set_left_margin</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>margin</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-gtkpagesetup.html#method-gtkpagesetup--get-right-margin" title="gtk.PageSetup.get_right_margin">get_right_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-gtkpagesetup.html#method-gtkpagesetup--set-right-margin" title="gtk.PageSetup.set_right_margin">set_right_margin</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>margin</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-gtkpagesetup.html#method-gtkpagesetup--set-paper-size-and-default-margins" title="gtk.PageSetup.set_paper_size_and_default_margins">set_paper_size_and_default_margins</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>size</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkpagesetup.html#method-gtkpagesetup--get-paper-width" title="gtk.PageSetup.get_paper_width">get_paper_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-gtkpagesetup.html#method-gtkpagesetup--get-paper-height" title="gtk.PageSetup.get_paper_height">get_paper_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-gtkpagesetup.html#method-gtkpagesetup--get-page-width" title="gtk.PageSetup.get_page_width">get_page_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-gtkpagesetup.html#method-gtkpagesetup--get-page-height" title="gtk.PageSetup.get_page_height">get_page_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-gtkpagesetup.html#method-gtkpagesetup--to-file" title="gtk.PageSetup.to_file">to_file</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>file_name</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-gtkpagesetup--load-file">load_file</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>file_name</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-gtkpagesetup.html#function-gtk--print-run-page-setup-dialog" title="gtk.print_run_page_setup_dialog">gtk.print_run_page_setup_dialog</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>parent</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>page_setup</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>settings</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkpagesetup.html#function-gtk--page-setup-new-from-file" title="gtk.page_setup_new_from_file">gtk.page_setup_new_from_file</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>file_name</code></strong></span></span>)</code></pre></div><div class="refsect1" title="Ancestry"><a name="id3820071"></a><h2>Ancestry</h2><pre class="synopsis">+-- <PYGTKDOCLINK HREF="class-gobject">gobject.GObject</PYGTKDOCLINK>
+-- <a class="link" href="class-gtkpagesetup.html" title="gtk.PageSetup">gtk.PageSetup</a>
</pre></div><div class="refsect1" title="gtk.PageSetup Signal Prototypes"><a name="signal-prototypes-gtkpagesetup"></a><h2>gtk.PageSetup Signal Prototypes</h2><p><PYGTKDOCLINK HREF="signal-prototypes-gobject">gobject.GObject Signal Prototypes</PYGTKDOCLINK></p></div><div class="refsect1" title="Description"><a name="id3820117"></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-gtkpagesetup.html" title="gtk.PageSetup"><code class="classname">gtk.PageSetup</code></a>
object stores the page size, orientation and margins. The idea is that
you can get one of these from the page setup dialog and then pass it to
the <a class="link" href="class-gtkprintoperation.html" title="gtk.PrintOperation"><code class="classname">gtk.PrintOperation</code></a>
when printing. The benefit of splitting this out of the <a class="link" href="class-gtkprintsettings.html" title="gtk.PrintSettings"><code class="classname">gtk.PrintSettings</code></a>
is that these affect the actual layout of the page, and thus need to be
set long before user prints.</p><p>The margins specified in this object are the "print margins",
i.e. the parts of the page that the printer cannot print on. These are
different from the layout margins that a word processor uses; they are
typically used to determine the minimal size for the layout
margins.</p><p>To obtain a <a class="link" href="class-gtkpagesetup.html" title="gtk.PageSetup"><code class="classname">gtk.PageSetup</code></a>
use the <a class="link" href="class-gtkpagesetup.html#constructor-gtkpagesetup" title="gtk.PageSetup">gtk.PageSetup()</a> constructor
to get the defaults, or use the <a class="link" href="class-gtkpagesetup.html#function-gtk--print-run-page-setup-dialog" title="gtk.print_run_page_setup_dialog"><code class="function">gtk.print_run_page_setup_dialog</code>()</a>
function to show the page setup dialog and receive the resulting page
setup. An example page setup function is:</p><pre class="programlisting">
def do_page_setup():
if settings == None:
settings = gtk.PrintSettings()
page_setup = gtk.print_run_page_setup_dialog(main_window, page_setup,
settings)
</pre></div><div class="refsect1" title="Constructor"><a name="id3820214"></a><h2>Constructor</h2><div class="refsect2" title="gtk.PageSetup"><a name="constructor-gtkpagesetup"></a><h3>gtk.PageSetup</h3><pre class="programlisting"><code class="constructorsynopsis"> <span class="methodname">gtk.PageSetup</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 new <a class="link" href="class-gtkpagesetup.html" title="gtk.PageSetup"><code class="classname">gtk.PageSetup</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-gtkpagesetup.html" title="gtk.PageSetup"><code class="classname">gtk.PageSetup</code></a>.</p></div></div><div class="refsect1" title="Methods"><a name="id3820299"></a><h2>Methods</h2><div class="refsect2" title="gtk.PageSetup.copy"><a name="method-gtkpagesetup--copy"></a><h3>gtk.PageSetup.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 this page setup</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 this <a class="link" href="class-gtkpagesetup.html" title="gtk.PageSetup"><code class="classname">gtk.PageSetup</code></a>.</p></div><div class="refsect2" title="gtk.PageSetup.get_orientation"><a name="method-gtkpagesetup--get-orientation"></a><h3>gtk.PageSetup.get_orientation</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_orientation</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 page orientation</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_orientation</code>() method returns
the page orientation of the <a class="link" href="class-gtkpagesetup.html" title="gtk.PageSetup"><code class="classname">gtk.PageSetup</code></a>. The
return value must be one of the <a class="xref" href="gtk-constants.html#gtk-page-orientation-constants" title="GTK Page Orientation Constants">GTK Page Orientation Constants</a>.</p></div><div class="refsect2" title="gtk.PageSetup.set_orientation"><a name="method-gtkpagesetup--set-orientation"></a><h3>gtk.PageSetup.set_orientation</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_orientation</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>orientation</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>orientation</code></strong> :</span></p></td><td>one of the <a class="xref" href="gtk-constants.html#gtk-page-orientation-constants" title="GTK Page Orientation Constants">GTK Page Orientation 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_orientation</code>() method sets the
page orientation of the <a class="link" href="class-gtkpagesetup.html" title="gtk.PageSetup"><code class="classname">gtk.PageSetup</code></a>
to the value specified by <em class="parameter"><code>orientation</code></em>. The
value of <em class="parameter"><code>orientation</code></em> must be one of the <a class="xref" href="gtk-constants.html#gtk-page-orientation-constants" title="GTK Page Orientation Constants">GTK Page Orientation Constants</a></p></div><div class="refsect2" title="gtk.PageSetup.get_paper_size"><a name="method-gtkpagesetup--get-paper-size"></a><h3>gtk.PageSetup.get_paper_size</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_paper_size</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 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_paper_size</code>() method gets the
paper size of the <a class="link" href="class-gtkpagesetup.html" title="gtk.PageSetup"><code class="classname">gtk.PageSetup</code></a>.</p></div><div class="refsect2" title="gtk.PageSetup.set_paper_size"><a name="method-gtkpagesetup--set-paper-size"></a><h3>gtk.PageSetup.set_paper_size</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_paper_size</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>size</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>size</code></strong> :</span></p></td><td>a <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 method is available in PyGTK 2.10 and above.</p></div><p>The <code class="methodname">set_paper_size</code>() method sets the
paper size of the page setup without changing the margins. See the
<a class="link" href="class-gtkpagesetup.html#method-gtkpagesetup--set-paper-size-and-default-margins" title="gtk.PageSetup.set_paper_size_and_default_margins"><code class="methodname">set_paper_size_and_default_margins</code>()</a>
method.</p></div><div class="refsect2" title="gtk.PageSetup.get_top_margin"><a name="method-gtkpagesetup--get-top-margin"></a><h3>gtk.PageSetup.get_top_margin</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_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 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_top_margin</code>() method returns the
top margin in units of <em class="parameter"><code>unit</code></em>.</p></div><div class="refsect2" title="gtk.PageSetup.set_top_margin"><a name="method-gtkpagesetup--set-top-margin"></a><h3>gtk.PageSetup.set_top_margin</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_top_margin</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>margin</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>margin</code></strong> :</span></p></td><td>the new top margin 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 for <em class="parameter"><code>margin</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_top_margin</code>() method sets the
top margin of the page setup to the value specified by
<em class="parameter"><code>margin</code></em> in the units specified by
<em class="parameter"><code>unit</code></em>.</p></div><div class="refsect2" title="gtk.PageSetup.get_bottom_margin"><a name="method-gtkpagesetup--get-bottom-margin"></a><h3>gtk.PageSetup.get_bottom_margin</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_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</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the 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_bottom_margin</code>() method gets the
bottom margin in units of <em class="parameter"><code>unit</code></em>.</p></div><div class="refsect2" title="gtk.PageSetup.set_bottom_margin"><a name="method-gtkpagesetup--set-bottom-margin"></a><h3>gtk.PageSetup.set_bottom_margin</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_bottom_margin</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>margin</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>margin</code></strong> :</span></p></td><td>the new bottom margin 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 for <em class="parameter"><code>margin</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_bottom_margin</code>() method sets the
bottom margin of the page setup to the value specified by
<em class="parameter"><code>margin</code></em> using the units specified by
<em class="parameter"><code>unit</code></em>.</p></div><div class="refsect2" title="gtk.PageSetup.get_left_margin"><a name="method-gtkpagesetup--get-left-margin"></a><h3>gtk.PageSetup.get_left_margin</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_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</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the 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_left_margin</code>() method gets the
left margin in units of <em class="parameter"><code>unit</code></em>.</p></div><div class="refsect2" title="gtk.PageSetup.set_left_margin"><a name="method-gtkpagesetup--set-left-margin"></a><h3>gtk.PageSetup.set_left_margin</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_left_margin</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>margin</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>margin</code></strong> :</span></p></td><td>the new left margin 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 for <em class="parameter"><code>margin</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_left_margin</code>() method sets the
left margin of the page setup to the value specified by
<em class="parameter"><code>margin</code></em> using the units specified by
<em class="parameter"><code>unit</code></em>.</p></div><div class="refsect2" title="gtk.PageSetup.get_right_margin"><a name="method-gtkpagesetup--get-right-margin"></a><h3>gtk.PageSetup.get_right_margin</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_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><p class="simpara">the unit for the return value</p> - 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 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_right_margin</code>() method gets the
right margin in units of <em class="parameter"><code>unit</code></em>.</p></div><div class="refsect2" title="gtk.PageSetup.set_right_margin"><a name="method-gtkpagesetup--set-right-margin"></a><h3>gtk.PageSetup.set_right_margin</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_right_margin</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>margin</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>margin</code></strong> :</span></p></td><td>the new right margin 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 for <em class="parameter"><code>margin</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_right_margin</code>() method sets the
right margin of the page setup to the value specified by
<em class="parameter"><code>margin</code></em> using the units specified by
<em class="parameter"><code>unit</code></em>.</p></div><div class="refsect2" title="gtk.PageSetup.set_paper_size_and_default_margins"><a name="method-gtkpagesetup--set-paper-size-and-default-margins"></a><h3>gtk.PageSetup.set_paper_size_and_default_margins</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_paper_size_and_default_margins</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>size</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>size</code></strong> :</span></p></td><td>a <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 method is available in PyGTK 2.10 and above.</p></div><p>The
<code class="methodname">set_paper_size_and_default_margins</code>() method
sets the paper size of the page setup to the value specified by
<em class="parameter"><code>size</code></em> and modifies the margins according to the
new paper size.</p></div><div class="refsect2" title="gtk.PageSetup.get_paper_width"><a name="method-gtkpagesetup--get-paper-width"></a><h3>gtk.PageSetup.get_paper_width</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_paper_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_paper_width</code>() method returns
the paper width in units of <em class="parameter"><code>unit</code></em>.</p><p>Note that this function takes orientation, but not margins into
consideration. See the <a class="link" href="class-gtkpagesetup.html#method-gtkpagesetup--get-page-width" title="gtk.PageSetup.get_page_width"><code class="methodname">get_page_width()</code></a>
method.</p></div><div class="refsect2" title="gtk.PageSetup.get_paper_height"><a name="method-gtkpagesetup--get-paper-height"></a><h3>gtk.PageSetup.get_paper_height</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_paper_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_paper_height</code>() method returns
the paper height in units of <em class="parameter"><code>unit</code></em>.</p><p>Note that this function takes orientation, but not margins into
consideration. See the <a class="link" href="class-gtkpagesetup.html#method-gtkpagesetup--get-page-height" title="gtk.PageSetup.get_page_height"><code class="methodname">get_page_height()</code></a>
method.</p></div><div class="refsect2" title="gtk.PageSetup.get_page_width"><a name="method-gtkpagesetup--get-page-width"></a><h3>gtk.PageSetup.get_page_width</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_page_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 page 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_page_width</code>() method returns the
page width in units of <em class="parameter"><code>unit</code></em>.</p><p>Note that this function takes orientation and margins into
consideration. See the <a class="link" href="class-gtkpagesetup.html#method-gtkpagesetup--get-paper-width" title="gtk.PageSetup.get_paper_width"><code class="methodname">get_paper_width()</code></a>
method.</p></div><div class="refsect2" title="gtk.PageSetup.get_page_height"><a name="method-gtkpagesetup--get-page-height"></a><h3>gtk.PageSetup.get_page_height</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_page_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 page 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_page_height</code>() method returns
the page height in units of <em class="parameter"><code>unit</code></em>.</p><p>Note that this function takes orientation and margins into
consideration. See the <a class="link" href="class-gtkpagesetup.html#method-gtkpagesetup--get-paper-height" title="gtk.PageSetup.get_paper_height"><code class="methodname">get_paper_height()</code></a>
method.</p></div><div class="refsect2" title="gtk.PageSetup.to_file"><a name="method-gtkpagesetup--to-file"></a><h3>gtk.PageSetup.to_file</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">to_file</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>file_name</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>file_name</code></strong> :</span></p></td><td>the file to save to</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>True on success.</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.12 and above.</p></div><p>The <code class="methodname">to_file</code>() method
saves the information from setup to <em class="parameter"><code>file_name</code></em>.</p></div><div class="refsect2" title="gtk.PageSetup.load_file"><a name="method-gtkpagesetup--laod-file"></a><h3>gtk.PageSetup.load_file</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">load_file</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>file_name</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>file_name</code></strong> :</span></p></td><td>the filename to read the page setup from.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>True on success.</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.14 and above.</p></div><p>
The <code class="methodname">load_file</code>() method
Reads the page setup from the file file_name. See
<code class="methodname"><a class="link" href="class-gtkpagesetup.html#method-gtkpagesetup--to-file" title="gtk.PageSetup.to_file">to_file</a></code>.
</p></div></div><div class="refsect1" title="Functions"><a name="id3822505"></a><h2>Functions</h2><div class="refsect2" title="gtk.print_run_page_setup_dialog"><a name="function-gtk--print-run-page-setup-dialog"></a><h3>gtk.print_run_page_setup_dialog</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">gtk.print_run_page_setup_dialog</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>parent</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>page_setup</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>settings</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>parent</code></strong> :</span></p></td><td>transient parent, or
<code class="literal">None</code></td></tr><tr><td><p><span class="term"><strong class="parameter"><code>page_setup</code></strong> :</span></p></td><td>an existing <a class="link" href="class-gtkpagesetup.html" title="gtk.PageSetup"><code class="classname">gtk.PageSetup</code></a>,
or <code class="literal">None</code></td></tr><tr><td><p><span class="term"><strong class="parameter"><code>settings</code></strong> :</span></p></td><td>a <a class="link" href="class-gtkprintsettings.html" title="gtk.PrintSettings"><code class="classname">gtk.PrintSettings</code></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-gtkpagesetup.html" title="gtk.PageSetup"><code class="classname">gtk.PageSetup</code></a></td></tr></tbody></table><p>Runs a page setup dialog, letting the user modify the values
from page_setup. If the user cancels the dialog, the returned <a class="link" href="class-gtkpagesetup.html" title="gtk.PageSetup"><code class="classname">gtk.PageSetup</code></a>
is identical to the passed in page_setup, otherwise it contains the
modifications done in the dialog.</p><p>Note that this function may use a recursive mainloop to show the
page setup dialog.</p></div><div class="refsect2" title="gtk.page_setup_new_from_file"><a name="function-gtk--page-setup-new-from-file"></a><h3>gtk.page_setup_new_from_file</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">gtk.page_setup_new_from_file</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>file_name</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>file_name</code></strong> :</span></p></td><td>the filename to read the page setup from.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>The restored <a class="link" href="class-gtkpagesetup.html" title="gtk.PageSetup"><code class="classname">gtk.PageSetup</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.12 and above.</p></div><p>Reads the page setup from the file file_name. Returns a new
<a class="link" href="class-gtkpagesetup.html" title="gtk.PageSetup"><code class="classname">gtk.PageSetup</code></a>
object with the restored page setup, or None if an error occurred. See
<a class="link" href="class-gtkpagesetup.html#method-gtkpagesetup--to-file" title="gtk.PageSetup.to_file">gtk.PageSetup.to_file</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-gtkoptionmenu.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-gtkpaned.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gtk.OptionMenu </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gtk.Paned</td></tr></table></div></body></html>
|