⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 gtkpagesetup.html

📁 最新gtk中文资料集
💻 HTML
📖 第 1 页 / 共 4 页
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"><title>GtkPageSetup</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2"><link rel="start" href="index.html" title="GTK+ Reference Manual"><link rel="up" href="Printing.html" title="Printing"><link rel="prev" href="GtkPrintSettings.html" title="GtkPrintSettings"><link rel="next" href="gtk-GtkPaperSize.html" title="GtkPaperSize"><meta name="generator" content="GTK-Doc V1.9 (XML mode)"><link rel="stylesheet" href="style.css" type="text/css"><link rel="part" href="gtk.html" title="Part&#160;I.&#160;GTK+ Overview"><link rel="part" href="gtkbase.html" title="Part&#160;II.&#160;GTK+ Core Reference"><link rel="part" href="gtkobjects.html" title="Part&#160;III.&#160;GTK+ Widgets and Objects"><link rel="chapter" href="ch01.html" title="Object Hierarchy"><link rel="chapter" href="ch02.html" title="Widget Gallery"><link rel="chapter" href="WindowWidgets.html" title="Windows"><link rel="chapter" href="DisplayWidgets.html" title="Display Widgets"><link rel="chapter" href="ButtonWidgets.html" title="Buttons and Toggles"><link rel="chapter" href="NumericEntry.html" title="Numeric/Text Data Entry"><link rel="chapter" href="TextWidgetObjects.html" title="Multiline Text Editor"><link rel="chapter" href="TreeWidgetObjects.html" title="Tree, List and Icon Grid Widgets"><link rel="chapter" href="MenusAndCombos.html" title="Menus, Combo Box, Toolbar"><link rel="chapter" href="Actions.html" title="Action-based menus and toolbars"><link rel="chapter" href="SelectorWidgets.html" title="Selectors (File/Font/Color/Input Devices)"><link rel="chapter" href="LayoutContainers.html" title="Layout Containers"><link rel="chapter" href="Ornaments.html" title="Ornaments"><link rel="chapter" href="ScrollingWidgets.html" title="Scrolling"><link rel="chapter" href="Printing.html" title="Printing"><link rel="chapter" href="MiscObjects.html" title="Miscellaneous"><link rel="chapter" href="AbstractObjects.html" title="Abstract Base Classes"><link rel="chapter" href="PlugSocket.html" title="Cross-process Embedding"><link rel="chapter" href="SpecialObjects.html" title="Special-purpose features"><link rel="chapter" href="RecentDocuments.html" title="Recently Used Documents"><link rel="chapter" href="Builder.html" title="Interface builder"><link rel="chapter" href="DeprecatedObjects.html" title="Deprecated"><link rel="part" href="migrating.html" title="Part&#160;IV.&#160;Migrating from Previous Versions of GTK+"><link rel="chapter" href="gtk-migrating-checklist.html" title="Migration Checklist"><link rel="chapter" href="gtk-migrating-GtkFileChooser.html" title="Migrating from GtkFileSelection to GtkFileChooser"><link rel="chapter" href="gtk-migrating-GtkAction.html" title="Migrating from old menu and toolbar systems to GtkAction"><link rel="chapter" href="gtk-migrating-GtkComboBox.html" title="Migrating from GtkOptionMenu and GtkCombo to GtkComboBox and GtkComboBoxEntry"><link rel="chapter" href="gtk-migrating-GtkIconView.html" title="Migrating from GnomeIconList to GtkIconView"><link rel="chapter" href="gtk-migrating-GtkAboutDialog.html" title="Migrating from GnomeAbout to GtkAboutDialog"><link rel="chapter" href="gtk-migrating-GtkColorButton.html" title="Migrating from GnomeColorPicker to GtkColorButton"><link rel="chapter" href="gtk-migrating-GtkAssistant.html" title="Migrating from GnomeDruid to GtkAssistant"><link rel="chapter" href="gtk-migrating-GtkRecentChooser.html" title="Migrating from EggRecent to GtkRecentChooser"><link rel="chapter" href="gtk-migrating-GtkLinkButton.html" title="Migrating from GnomeHRef to GtkLinkButton"><link rel="chapter" href="gtk-migrating-GtkBuilder.html" title="Migrating from libglade to GtkBuilder"><link rel="chapter" href="gtk-migrating-tooltips.html" title="Migrating from GtkTooltips to GtkTooltip"><link rel="part" href="pt05.html" title="Part&#160;V.&#160;GTK+ Tools"><link rel="glossary" href="glossary.html" title="Glossary"><link rel="index" href="ix01.html" title="Index"><link rel="index" href="ix02.html" title="Index of deprecated symbols"><link rel="index" href="ix03.html" title="Index of new symbols in 2.2"><link rel="index" href="ix04.html" title="Index of new symbols in 2.4"><link rel="index" href="ix05.html" title="Index of new symbols in 2.6"><link rel="index" href="ix06.html" title="Index of new symbols in 2.8"><link rel="index" href="ix07.html" title="Index of new symbols in 2.10"><link rel="index" href="ix08.html" title="Index of new symbols in 2.12"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="p" href="GtkPrintSettings.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td><td><a accesskey="u" href="Printing.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td><td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td><th width="100%" align="center">GTK+ Reference Manual</th><td><a accesskey="n" href="gtk-GtkPaperSize.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td></tr><tr><td colspan="5" class="shortcuts"><nobr><a href="#id4171301" class="shortcut">Top</a>                  &#160;|&#160;                  <a href="#id4172091" class="shortcut">Description</a>                  &#160;|&#160;                  <a href="#id4172066" class="shortcut">Object Hierarchy</a></nobr></td></tr></table><div class="refentry" lang="en"><a name="GtkPageSetup"></a><div class="titlepage"></div><div class="refnamediv"><table width="100%"><tr><td valign="top"><h2><a name="id4171301"></a><span class="refentrytitle">GtkPageSetup</span></h2><p>GtkPageSetup &#8212; Stores page setup information</p></td><td valign="top" align="right"></td></tr></table></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="synopsis">#include &lt;gtk/gtk.h&gt;                    <a class="link" href="GtkPageSetup.html#GtkPageSetup-struct">GtkPageSetup</a>;<a class="link" href="GtkPageSetup.html" title="GtkPageSetup">GtkPageSetup</a>*       <a class="link" href="GtkPageSetup.html#gtk-page-setup-new">gtk_page_setup_new</a>                  (void);<a class="link" href="GtkPageSetup.html" title="GtkPageSetup">GtkPageSetup</a>*       <a class="link" href="GtkPageSetup.html#gtk-page-setup-copy">gtk_page_setup_copy</a>                 (<a class="link" href="GtkPageSetup.html" title="GtkPageSetup">GtkPageSetup</a> *other);<a class="link" href="GtkPrintSettings.html#GtkPageOrientation">GtkPageOrientation</a>  <a class="link" href="GtkPageSetup.html#gtk-page-setup-get-orientation">gtk_page_setup_get_orientation</a>      (<a class="link" href="GtkPageSetup.html" title="GtkPageSetup">GtkPageSetup</a> *setup);void                <a class="link" href="GtkPageSetup.html#gtk-page-setup-set-orientation">gtk_page_setup_set_orientation</a>      (<a class="link" href="GtkPageSetup.html" title="GtkPageSetup">GtkPageSetup</a> *setup,                                                         <a class="link" href="GtkPrintSettings.html#GtkPageOrientation">GtkPageOrientation</a> orientation);<a class="link" href="gtk-GtkPaperSize.html#GtkPaperSize">GtkPaperSize</a>*       <a class="link" href="GtkPageSetup.html#gtk-page-setup-get-paper-size">gtk_page_setup_get_paper_size</a>       (<a class="link" href="GtkPageSetup.html" title="GtkPageSetup">GtkPageSetup</a> *setup);void                <a class="link" href="GtkPageSetup.html#gtk-page-setup-set-paper-size">gtk_page_setup_set_paper_size</a>       (<a class="link" href="GtkPageSetup.html" title="GtkPageSetup">GtkPageSetup</a> *setup,                                                         <a class="link" href="gtk-GtkPaperSize.html#GtkPaperSize">GtkPaperSize</a> *size);<ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble">gdouble</a>             <a class="link" href="GtkPageSetup.html#gtk-page-setup-get-top-margin">gtk_page_setup_get_top_margin</a>       (<a class="link" href="GtkPageSetup.html" title="GtkPageSetup">GtkPageSetup</a> *setup,                                                         <a class="link" href="gtk-GtkPaperSize.html#GtkUnit">GtkUnit</a> unit);void                <a class="link" href="GtkPageSetup.html#gtk-page-setup-set-top-margin">gtk_page_setup_set_top_margin</a>       (<a class="link" href="GtkPageSetup.html" title="GtkPageSetup">GtkPageSetup</a> *setup,                                                         <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble">gdouble</a> margin,                                                         <a class="link" href="gtk-GtkPaperSize.html#GtkUnit">GtkUnit</a> unit);<ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble">gdouble</a>             <a class="link" href="GtkPageSetup.html#gtk-page-setup-get-bottom-margin">gtk_page_setup_get_bottom_margin</a>    (<a class="link" href="GtkPageSetup.html" title="GtkPageSetup">GtkPageSetup</a> *setup,                                                         <a class="link" href="gtk-GtkPaperSize.html#GtkUnit">GtkUnit</a> unit);void                <a class="link" href="GtkPageSetup.html#gtk-page-setup-set-bottom-margin">gtk_page_setup_set_bottom_margin</a>    (<a class="link" href="GtkPageSetup.html" title="GtkPageSetup">GtkPageSetup</a> *setup,                                                         <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble">gdouble</a> margin,                                                         <a class="link" href="gtk-GtkPaperSize.html#GtkUnit">GtkUnit</a> unit);<ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble">gdouble</a>             <a class="link" href="GtkPageSetup.html#gtk-page-setup-get-left-margin">gtk_page_setup_get_left_margin</a>      (<a class="link" href="GtkPageSetup.html" title="GtkPageSetup">GtkPageSetup</a> *setup,                                                         <a class="link" href="gtk-GtkPaperSize.html#GtkUnit">GtkUnit</a> unit);void                <a class="link" href="GtkPageSetup.html#gtk-page-setup-set-left-margin">gtk_page_setup_set_left_margin</a>      (<a class="link" href="GtkPageSetup.html" title="GtkPageSetup">GtkPageSetup</a> *setup,                                                         <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble">gdouble</a> margin,                                                         <a class="link" href="gtk-GtkPaperSize.html#GtkUnit">GtkUnit</a> unit);<ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble">gdouble</a>             <a class="link" href="GtkPageSetup.html#gtk-page-setup-get-right-margin">gtk_page_setup_get_right_margin</a>     (<a class="link" href="GtkPageSetup.html" title="GtkPageSetup">GtkPageSetup</a> *setup,                                                         <a class="link" href="gtk-GtkPaperSize.html#GtkUnit">GtkUnit</a> unit);void                <a class="link" href="GtkPageSetup.html#gtk-page-setup-set-right-margin">gtk_page_setup_set_right_margin</a>     (<a class="link" href="GtkPageSetup.html" title="GtkPageSetup">GtkPageSetup</a> *setup,                                                         <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble">gdouble</a> margin,                                                         <a class="link" href="gtk-GtkPaperSize.html#GtkUnit">GtkUnit</a> unit);void                <a class="link" href="GtkPageSetup.html#gtk-page-setup-set-paper-size-and-default-margins">gtk_page_setup_set_paper_size_and_default_margins</a>                                                        (<a class="link" href="GtkPageSetup.html" title="GtkPageSetup">GtkPageSetup</a> *setup,                                                         <a class="link" href="gtk-GtkPaperSize.html#GtkPaperSize">GtkPaperSize</a> *size);<ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble">gdouble</a>             <a class="link" href="GtkPageSetup.html#gtk-page-setup-get-paper-width">gtk_page_setup_get_paper_width</a>      (<a class="link" href="GtkPageSetup.html" title="GtkPageSetup">GtkPageSetup</a> *setup,                                                         <a class="link" href="gtk-GtkPaperSize.html#GtkUnit">GtkUnit</a> unit);<ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble">gdouble</a>             <a class="link" href="GtkPageSetup.html#gtk-page-setup-get-paper-height">gtk_page_setup_get_paper_height</a>     (<a class="link" href="GtkPageSetup.html" title="GtkPageSetup">GtkPageSetup</a> *setup,                                                         <a class="link" href="gtk-GtkPaperSize.html#GtkUnit">GtkUnit</a> unit);<ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble">gdouble</a>             <a class="link" href="GtkPageSetup.html#gtk-page-setup-get-page-width">gtk_page_setup_get_page_width</a>       (<a class="link" href="GtkPageSetup.html" title="GtkPageSetup">GtkPageSetup</a> *setup,                                                         <a class="link" href="gtk-GtkPaperSize.html#GtkUnit">GtkUnit</a> unit);<ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble">gdouble</a>             <a class="link" href="GtkPageSetup.html#gtk-page-setup-get-page-height">gtk_page_setup_get_page_height</a>      (<a class="link" href="GtkPageSetup.html" title="GtkPageSetup">GtkPageSetup</a> *setup,                                                         <a class="link" href="gtk-GtkPaperSize.html#GtkUnit">GtkUnit</a> unit);<a class="link" href="GtkPageSetup.html" title="GtkPageSetup">GtkPageSetup</a>*       <a class="link" href="GtkPageSetup.html#gtk-page-setup-new-from-file">gtk_page_setup_new_from_file</a>        (const <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar">gchar</a> *file_name,                                                         <ahref="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError">GError</a> **error);<a class="link" href="GtkPageSetup.html" title="GtkPageSetup">GtkPageSetup</a>*       <a class="link" href="GtkPageSetup.html#gtk-page-setup-new-from-key-file">gtk_page_setup_new_from_key_file</a>    (<ahref="/usr/share/gtk-doc/html/glib/glib-Key-value-file-parser.html#GKeyFile">GKeyFile</a> *key_file,                                                         const <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar">gchar</a> *group_name,                                                         <ahref="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError">GError</a> **error);<ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a>            <a class="link" href="GtkPageSetup.html#gtk-page-setup-to-file">gtk_page_setup_to_file</a>              (<a class="link" href="GtkPageSetup.html" title="GtkPageSetup">GtkPageSetup</a> *setup,                                                         const char *file_name,                                                         <ahref="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError">GError</a> **error);void                <a class="link" href="GtkPageSetup.html#gtk-page-setup-to-key-file">gtk_page_setup_to_key_file</a>          (<a class="link" href="GtkPageSetup.html" title="GtkPageSetup">GtkPageSetup</a> *setup,                                                         <ahref="/usr/share/gtk-doc/html/glib/glib-Key-value-file-parser.html#GKeyFile">GKeyFile</a> *key_file,                                                         const <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar">gchar</a> *group_name);</pre></div><div class="refsect1" lang="en"><a name="id4172066"></a><h2>Object Hierarchy</h2><pre class="synopsis">  <ahref="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#GObject">GObject</a>   +----GtkPageSetup</pre></div><div class="refsect1" lang="en"><a name="id4172091"></a><h2>Description</h2><p>A GtkPageSetup 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="gtk-High-level-Printing-API.html#GtkPrintOperation"><span class="type">GtkPrintOperation</span></a> when printing. The benefit of splitting this out of the <a class="link" href="GtkPrintSettings.html" title="GtkPrintSettings"><span class="type">GtkPrintSettings</span></a> is that these affect the actual layout of the page, and thus need to be set long before user prints. </p><p><a name="print-margins"></a>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 differentfrom the layout margins that a word processor uses; they are typicallyused to determine the <span class="emphasis"><em>minimal</em></span> size for the layout margins.</p><p>To obtain a <a class="link" href="GtkPageSetup.html" title="GtkPageSetup"><span class="type">GtkPageSetup</span></a> use <a class="link" href="GtkPageSetup.html#gtk-page-setup-new"><code class="function">gtk_page_setup_new()</code></a>to get the defaults, or use <a class="link" href="gtk-High-level-Printing-API.html#gtk-print-run-page-setup-dialog"><code class="function">gtk_print_run_page_setup_dialog()</code></a> to show the page setup dialog and receive the resulting page setup.</p><div class="example"><a name="id4172178"></a><p class="title"><b>Example&#160;41.&#160;A page setup dialog</b></p><div class="example-contents"><pre class="programlisting">static GtkPrintSettings *settings = NULL;static GtkPageSetup *page_setup = NULL;static voiddo_page_setup (void){  GtkPageSetup *new_page_setup;  if (settings == NULL)    settings = gtk_print_settings_new ();  new_page_setup = gtk_print_run_page_setup_dialog (GTK_WINDOW (main_window),                                                    page_setup, settings);  if (page_setup)    g_object_unref (page_setup);  page_setup = new_page_setup;}</pre></div></div><br class="example-break"><p>Printing support was added in GTK+ 2.10.</p></div><div class="refsect1" lang="en"><a name="id4172206"></a><h2>Details</h2><div class="refsect2" lang="en"><a name="id4172216"></a><h3><a name="GtkPageSetup-struct"></a>GtkPageSetup</h3><a class="indexterm" name="id4172229"></a><pre class="programlisting">typedef struct _GtkPageSetup GtkPageSetup;</pre><p></p></div><hr><div class="refsect2" lang="en"><a name="id4172244"></a><h3><a name="gtk-page-setup-new"></a>gtk_page_setup_new ()</h3><a class="indexterm" name="id4172260"></a><pre class="programlisting"><a class="link" href="GtkPageSetup.html" title="GtkPageSetup">GtkPageSetup</a>*       gtk_page_setup_new                  (void);</pre><p>Creates a new <a class="link" href="GtkPageSetup.html" title="GtkPageSetup"><span class="type">GtkPageSetup</span></a>.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td><td> a new <a class="link" href="GtkPageSetup.html" title="GtkPageSetup"><span class="type">GtkPageSetup</span></a>.</td></tr></tbody></table></div><p class="since">Since  2.10</p>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -