<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Graphics.UI.Gtk.Printing.PrintOperation</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[ window.onload = function () {pageLoad();setSynopsis("mini_Graphics-UI-Gtk-Printing-PrintOperation.html");}; //]]> </script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Graphics-UI-Gtk-Printing-PrintOperation.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">gtk-0.12.0: Binding to the Gtk+ graphical user interface library.</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>portable (depends on GHC)</td></tr><tr><th>Stability</th><td>provisional</td></tr><tr><th>Maintainer</th><td>gtk2hs-users@lists.sourceforge.net</td></tr></table><p class="caption">Graphics.UI.Gtk.Printing.PrintOperation</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Detail </a></li><li><a href="#g:2">Class Hierarchy </a></li><li><a href="#g:3">Types </a></li><li><a href="#g:4">Enums </a></li><li><a href="#g:5">Constructors </a></li><li><a href="#g:6">Methods </a></li><li><a href="#g:7">Attributes </a></li><li><a href="#g:8">Signals </a></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc"><p>High-level Printing API </p><ul><li> Module available since Gtk+ version 2.10 </li></ul></div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">data</span> <a href="#t:PrintOperation">PrintOperation</a> </li><li class="src short"><span class="keyword">class</span> <a href="/usr/share/doc/ghc/html/libraries/glib-0.12.0/System-Glib-GObject.html#t:GObjectClass">GObjectClass</a> o => <a href="#t:PrintOperationClass">PrintOperationClass</a> o </li><li class="src short"><a href="#v:castToPrintOperation">castToPrintOperation</a> :: <a href="/usr/share/doc/ghc/html/libraries/glib-0.12.0/System-Glib-GObject.html#t:GObjectClass">GObjectClass</a> obj => obj -> <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperation">PrintOperation</a></li><li class="src short"><a href="#v:toPrintOperation">toPrintOperation</a> :: <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationClass">PrintOperationClass</a> o => o -> <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperation">PrintOperation</a></li><li class="src short"><span class="keyword">data</span> <a href="#t:PrintOperationPreview">PrintOperationPreview</a> </li><li class="src short"><span class="keyword">class</span> <a href="/usr/share/doc/ghc/html/libraries/glib-0.12.0/System-Glib-GObject.html#t:GObjectClass">GObjectClass</a> o => <a href="#t:PrintOperationPreviewClass">PrintOperationPreviewClass</a> o </li><li class="src short"><a href="#v:castToPrintOperationPreview">castToPrintOperationPreview</a> :: <a href="/usr/share/doc/ghc/html/libraries/glib-0.12.0/System-Glib-GObject.html#t:GObjectClass">GObjectClass</a> obj => obj -> <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationPreview">PrintOperationPreview</a></li><li class="src short"><a href="#v:toPrintOperationPreview">toPrintOperationPreview</a> :: <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationPreviewClass">PrintOperationPreviewClass</a> o => o -> <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationPreview">PrintOperationPreview</a></li><li class="src short"><span class="keyword">data</span> <a href="#t:PrintStatus">PrintStatus</a> <ul class="subs"><li>= <a href="#v:PrintStatusInitial">PrintStatusInitial</a> </li><li>| <a href="#v:PrintStatusPreparing">PrintStatusPreparing</a> </li><li>| <a href="#v:PrintStatusGeneratingData">PrintStatusGeneratingData</a> </li><li>| <a href="#v:PrintStatusSendingData">PrintStatusSendingData</a> </li><li>| <a href="#v:PrintStatusPending">PrintStatusPending</a> </li><li>| <a href="#v:PrintStatusPendingIssue">PrintStatusPendingIssue</a> </li><li>| <a href="#v:PrintStatusPrinting">PrintStatusPrinting</a> </li><li>| <a href="#v:PrintStatusFinished">PrintStatusFinished</a> </li><li>| <a href="#v:PrintStatusFinishedAborted">PrintStatusFinishedAborted</a> </li></ul></li><li class="src short"><span class="keyword">data</span> <a href="#t:PrintOperationAction">PrintOperationAction</a> <ul class="subs"><li>= <a href="#v:PrintOperationActionPrintDialog">PrintOperationActionPrintDialog</a> </li><li>| <a href="#v:PrintOperationActionPrint">PrintOperationActionPrint</a> </li><li>| <a href="#v:PrintOperationActionPreview">PrintOperationActionPreview</a> </li><li>| <a href="#v:PrintOperationActionExport">PrintOperationActionExport</a> </li></ul></li><li class="src short"><span class="keyword">data</span> <a href="#t:PrintOperationResult">PrintOperationResult</a> <ul class="subs"><li>= <a href="#v:PrintOperationResultError">PrintOperationResultError</a> </li><li>| <a href="#v:PrintOperationResultApply">PrintOperationResultApply</a> </li><li>| <a href="#v:PrintOperationResultCancel">PrintOperationResultCancel</a> </li><li>| <a href="#v:PrintOperationResultInProgress">PrintOperationResultInProgress</a> </li></ul></li><li class="src short"><span class="keyword">data</span> <a href="#t:PrintError">PrintError</a> <ul class="subs"><li>= <a href="#v:PrintErrorGeneral">PrintErrorGeneral</a> </li><li>| <a href="#v:PrintErrorInternalError">PrintErrorInternalError</a> </li><li>| <a href="#v:PrintErrorNomem">PrintErrorNomem</a> </li><li>| <a href="#v:PrintErrorInvalidFile">PrintErrorInvalidFile</a> </li></ul></li><li class="src short"><a href="#v:printOperationNew">printOperationNew</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperation">PrintOperation</a></li><li class="src short"><a href="#v:printOperationSetAllowAsync">printOperationSetAllowAsync</a> :: <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationClass">PrintOperationClass</a> self => self -> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Bool.html#t:Bool">Bool</a> -> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a></li><li class="src short"><a href="#v:printOperationGetError">printOperationGetError</a> :: <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationClass">PrintOperationClass</a> self => self -> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a></li><li class="src short"><a href="#v:printOperationGetNPagesToPrint">printOperationGetNPagesToPrint</a> :: <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationClass">PrintOperationClass</a> self => self -> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Int.html#t:Int">Int</a></li><li class="src short"><a href="#v:printOperationRun">printOperationRun</a> :: (<a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationClass">PrintOperationClass</a> self, <a href="Graphics-UI-Gtk-Windows-Window.html#t:WindowClass">WindowClass</a> parent) => self -> <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationAction">PrintOperationAction</a> -> parent -> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationResult">PrintOperationResult</a></li><li class="src short"><a href="#v:printOperationCancel">printOperationCancel</a> :: <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationClass">PrintOperationClass</a> self => self -> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a></li><li class="src short"><a href="#v:printOperationDrawPageFinish">printOperationDrawPageFinish</a> :: <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationClass">PrintOperationClass</a> self => self -> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a></li><li class="src short"><a href="#v:printOperationSetDeferDrawing">printOperationSetDeferDrawing</a> :: <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationClass">PrintOperationClass</a> self => self -> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a></li><li class="src short"><a href="#v:printOperationGetStatus">printOperationGetStatus</a> :: <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationClass">PrintOperationClass</a> self => self -> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintStatus">PrintStatus</a></li><li class="src short"><a href="#v:printOperationGetStatusString">printOperationGetStatusString</a> :: <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationClass">PrintOperationClass</a> self => self -> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Char.html#t:String">String</a></li><li class="src short"><a href="#v:printOperationIsFinished">printOperationIsFinished</a> :: <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationClass">PrintOperationClass</a> self => self -> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:printRunPageSetupDialog">printRunPageSetupDialog</a> :: (<a href="Graphics-UI-Gtk-Windows-Window.html#t:WindowClass">WindowClass</a> window, <a href="Graphics-UI-Gtk-Printing-PageSetup.html#t:PageSetupClass">PageSetupClass</a> pageSetup, <a href="Graphics-UI-Gtk-Printing-PrintSettings.html#t:PrintSettingsClass">PrintSettingsClass</a> setting) => window -> pageSetup -> setting -> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="Graphics-UI-Gtk-Printing-PageSetup.html#t:PageSetup">PageSetup</a></li><li class="src short"><a href="#v:printRunPageSetupDialogAsync">printRunPageSetupDialogAsync</a> :: (<a href="Graphics-UI-Gtk-Windows-Window.html#t:WindowClass">WindowClass</a> window, <a href="Graphics-UI-Gtk-Printing-PageSetup.html#t:PageSetupClass">PageSetupClass</a> pageSetup, <a href="Graphics-UI-Gtk-Printing-PrintSettings.html#t:PrintSettingsClass">PrintSettingsClass</a> setting) => window -> pageSetup -> setting -> (<a href="Graphics-UI-Gtk-Printing-PageSetup.html#t:PageSetup">PageSetup</a> -> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a>) -> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a></li><li class="src short"><a href="#v:printOperationPreviewEndPreview">printOperationPreviewEndPreview</a> :: <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationPreviewClass">PrintOperationPreviewClass</a> self => self -> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a></li><li class="src short"><a href="#v:printOperationPreviewIsSelected">printOperationPreviewIsSelected</a> :: <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationPreviewClass">PrintOperationPreviewClass</a> self => self -> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Int.html#t:Int">Int</a> -> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:printOperationPreviewRenderPage">printOperationPreviewRenderPage</a> :: <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationPreviewClass">PrintOperationPreviewClass</a> self => self -> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Int.html#t:Int">Int</a> -> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a></li><li class="src short"><a href="#v:printOperationDefaultPageSetup">printOperationDefaultPageSetup</a> :: (<a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationClass">PrintOperationClass</a> self, <a href="Graphics-UI-Gtk-Printing-PageSetup.html#t:PageSetupClass">PageSetupClass</a> pageSetup) => <a href="/usr/share/doc/ghc/html/libraries/glib-0.12.0/System-Glib-Attributes.html#t:ReadWriteAttr">ReadWriteAttr</a> self <a href="Graphics-UI-Gtk-Printing-PageSetup.html#t:PageSetup">PageSetup</a> pageSetup</li><li class="src short"><a href="#v:printOperationPrintSettings">printOperationPrintSettings</a> :: (<a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationClass">PrintOperationClass</a> self, <a href="Graphics-UI-Gtk-Printing-PrintSettings.html#t:PrintSettingsClass">PrintSettingsClass</a> printSettings) => <a href="/usr/share/doc/ghc/html/libraries/glib-0.12.0/System-Glib-Attributes.html#t:ReadWriteAttr">ReadWriteAttr</a> self <a href="Graphics-UI-Gtk-Printing-PrintSettings.html#t:PrintSettings">PrintSettings</a> printSettings</li><li class="src short"><a href="#v:printOperationJobName">printOperationJobName</a> :: <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationClass">PrintOperationClass</a> self => <a href="/usr/share/doc/ghc/html/libraries/glib-0.12.0/System-Glib-Attributes.html#t:Attr">Attr</a> self <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Char.html#t:String">String</a></li><li class="src short"><a href="#v:printOperationNPages">printOperationNPages</a> :: <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationClass">PrintOperationClass</a> self => <a href="/usr/share/doc/ghc/html/libraries/glib-0.12.0/System-Glib-Attributes.html#t:Attr">Attr</a> self <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Int.html#t:Int">Int</a></li><li class="src short"><a href="#v:printOperationCurrentPage">printOperationCurrentPage</a> :: <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationClass">PrintOperationClass</a> self => <a href="/usr/share/doc/ghc/html/libraries/glib-0.12.0/System-Glib-Attributes.html#t:Attr">Attr</a> self <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Int.html#t:Int">Int</a></li><li class="src short"><a href="#v:printOperationUseFullPage">printOperationUseFullPage</a> :: <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationClass">PrintOperationClass</a> self => <a href="/usr/share/doc/ghc/html/libraries/glib-0.12.0/System-Glib-Attributes.html#t:Attr">Attr</a> self <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:printOperationTrackPrintStatus">printOperationTrackPrintStatus</a> :: <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationClass">PrintOperationClass</a> self => <a href="/usr/share/doc/ghc/html/libraries/glib-0.12.0/System-Glib-Attributes.html#t:Attr">Attr</a> self <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:printOperationUnit">printOperationUnit</a> :: <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationClass">PrintOperationClass</a> self => <a href="/usr/share/doc/ghc/html/libraries/glib-0.12.0/System-Glib-Attributes.html#t:Attr">Attr</a> self <a href="Graphics-UI-Gtk-Printing-PaperSize.html#t:Unit">Unit</a></li><li class="src short"><a href="#v:printOperationShowProgress">printOperationShowProgress</a> :: <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationClass">PrintOperationClass</a> self => <a href="/usr/share/doc/ghc/html/libraries/glib-0.12.0/System-Glib-Attributes.html#t:Attr">Attr</a> self <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:printOperationAllowAsync">printOperationAllowAsync</a> :: <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationClass">PrintOperationClass</a> self => <a href="/usr/share/doc/ghc/html/libraries/glib-0.12.0/System-Glib-Attributes.html#t:Attr">Attr</a> self <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:printOperationExportFilename">printOperationExportFilename</a> :: <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationClass">PrintOperationClass</a> self => <a href="/usr/share/doc/ghc/html/libraries/glib-0.12.0/System-Glib-Attributes.html#t:Attr">Attr</a> self <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Char.html#t:String">String</a></li><li class="src short"><a href="#v:printOperationStatus">printOperationStatus</a> :: <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationClass">PrintOperationClass</a> self => <a href="/usr/share/doc/ghc/html/libraries/glib-0.12.0/System-Glib-Attributes.html#t:ReadAttr">ReadAttr</a> self <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintStatus">PrintStatus</a></li><li class="src short"><a href="#v:printOperationStatusString">printOperationStatusString</a> :: <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationClass">PrintOperationClass</a> self => <a href="/usr/share/doc/ghc/html/libraries/glib-0.12.0/System-Glib-Attributes.html#t:ReadAttr">ReadAttr</a> self <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Char.html#t:String">String</a></li><li class="src short"><a href="#v:printOperationCustomTabLabel">printOperationCustomTabLabel</a> :: <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationClass">PrintOperationClass</a> self => <a href="/usr/share/doc/ghc/html/libraries/glib-0.12.0/System-Glib-Attributes.html#t:Attr">Attr</a> self <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Char.html#t:String">String</a></li><li class="src short"><a href="#v:printOperationSupportSelection">printOperationSupportSelection</a> :: <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationClass">PrintOperationClass</a> self => <a href="/usr/share/doc/ghc/html/libraries/glib-0.12.0/System-Glib-Attributes.html#t:Attr">Attr</a> self <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:printOperationHasSelection">printOperationHasSelection</a> :: <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationClass">PrintOperationClass</a> self => <a href="/usr/share/doc/ghc/html/libraries/glib-0.12.0/System-Glib-Attributes.html#t:Attr">Attr</a> self <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:printOperationEmbedPageSetup">printOperationEmbedPageSetup</a> :: <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationClass">PrintOperationClass</a> self => <a href="/usr/share/doc/ghc/html/libraries/glib-0.12.0/System-Glib-Attributes.html#t:Attr">Attr</a> self <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:printOperationNPagesToPrint">printOperationNPagesToPrint</a> :: <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationClass">PrintOperationClass</a> self => <a href="/usr/share/doc/ghc/html/libraries/glib-0.12.0/System-Glib-Attributes.html#t:ReadAttr">ReadAttr</a> self <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Int.html#t:Int">Int</a></li><li class="src short"><a href="#v:printOptDone">printOptDone</a> :: <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationClass">PrintOperationClass</a> self => <a href="/usr/share/doc/ghc/html/libraries/glib-0.12.0/System-Glib-Signals.html#t:Signal">Signal</a> self (<a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationResult">PrintOperationResult</a> -> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a>)</li><li class="src short"><a href="#v:printOptBeginPrint">printOptBeginPrint</a> :: <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationClass">PrintOperationClass</a> self => <a href="/usr/share/doc/ghc/html/libraries/glib-0.12.0/System-Glib-Signals.html#t:Signal">Signal</a> self (<a href="Graphics-UI-Gtk-Printing-PrintContext.html#t:PrintContext">PrintContext</a> -> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a>)</li><li class="src short"><a href="#v:printOptPaginate">printOptPaginate</a> :: <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationClass">PrintOperationClass</a> self => <a href="/usr/share/doc/ghc/html/libraries/glib-0.12.0/System-Glib-Signals.html#t:Signal">Signal</a> self (<a href="Graphics-UI-Gtk-Printing-PrintContext.html#t:PrintContext">PrintContext</a> -> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Bool.html#t:Bool">Bool</a>)</li><li class="src short"><a href="#v:printOptRequestPageSetup">printOptRequestPageSetup</a> :: <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationClass">PrintOperationClass</a> self => <a href="/usr/share/doc/ghc/html/libraries/glib-0.12.0/System-Glib-Signals.html#t:Signal">Signal</a> self (<a href="Graphics-UI-Gtk-Printing-PrintContext.html#t:PrintContext">PrintContext</a> -> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Int.html#t:Int">Int</a> -> <a href="Graphics-UI-Gtk-Printing-PageSetup.html#t:PageSetup">PageSetup</a> -> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a>)</li><li class="src short"><a href="#v:printOptDrawPage">printOptDrawPage</a> :: <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationClass">PrintOperationClass</a> self => <a href="/usr/share/doc/ghc/html/libraries/glib-0.12.0/System-Glib-Signals.html#t:Signal">Signal</a> self (<a href="Graphics-UI-Gtk-Printing-PrintContext.html#t:PrintContext">PrintContext</a> -> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Int.html#t:Int">Int</a> -> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a>)</li><li class="src short"><a href="#v:printOptEndPrint">printOptEndPrint</a> :: <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationClass">PrintOperationClass</a> self => <a href="/usr/share/doc/ghc/html/libraries/glib-0.12.0/System-Glib-Signals.html#t:Signal">Signal</a> self (<a href="Graphics-UI-Gtk-Printing-PrintContext.html#t:PrintContext">PrintContext</a> -> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a>)</li><li class="src short"><a href="#v:printOptStatusChanged">printOptStatusChanged</a> :: <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationClass">PrintOperationClass</a> self => <a href="/usr/share/doc/ghc/html/libraries/glib-0.12.0/System-Glib-Signals.html#t:Signal">Signal</a> self (<a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a>)</li><li class="src short"><a href="#v:printOptCreateCustomWidget">printOptCreateCustomWidget</a> :: <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationClass">PrintOperationClass</a> self => <a href="/usr/share/doc/ghc/html/libraries/glib-0.12.0/System-Glib-Signals.html#t:Signal">Signal</a> self (<a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="Graphics-UI-Gtk-Abstract-Widget.html#t:Widget">Widget</a>)</li><li class="src short"><a href="#v:printOptUpdateCustomWidget">printOptUpdateCustomWidget</a> :: <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationClass">PrintOperationClass</a> self => <a href="/usr/share/doc/ghc/html/libraries/glib-0.12.0/System-Glib-Signals.html#t:Signal">Signal</a> self (<a href="Graphics-UI-Gtk-Abstract-Widget.html#t:Widget">Widget</a> -> <a href="Graphics-UI-Gtk-Printing-PageSetup.html#t:PageSetup">PageSetup</a> -> <a href="Graphics-UI-Gtk-Printing-PrintSettings.html#t:PrintSettings">PrintSettings</a> -> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a>)</li><li class="src short"><a href="#v:printOptCustomWidgetApply">printOptCustomWidgetApply</a> :: <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationClass">PrintOperationClass</a> self => <a href="/usr/share/doc/ghc/html/libraries/glib-0.12.0/System-Glib-Signals.html#t:Signal">Signal</a> self (<a href="Graphics-UI-Gtk-Abstract-Widget.html#t:Widget">Widget</a> -> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a>)</li><li class="src short"><a href="#v:printOptPreview">printOptPreview</a> :: <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationClass">PrintOperationClass</a> self => <a href="/usr/share/doc/ghc/html/libraries/glib-0.12.0/System-Glib-Signals.html#t:Signal">Signal</a> self (<a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationPreview">PrintOperationPreview</a> -> <a href="Graphics-UI-Gtk-Printing-PrintContext.html#t:PrintContext">PrintContext</a> -> <a href="Graphics-UI-Gtk-Windows-Window.html#t:Window">Window</a> -> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Bool.html#t:Bool">Bool</a>)</li><li class="src short"><a href="#v:printOptReady">printOptReady</a> :: <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationPreviewClass">PrintOperationPreviewClass</a> self => <a href="/usr/share/doc/ghc/html/libraries/glib-0.12.0/System-Glib-Signals.html#t:Signal">Signal</a> self (<a href="Graphics-UI-Gtk-Printing-PrintContext.html#t:PrintContext">PrintContext</a> -> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a>)</li><li class="src short"><a href="#v:printOptGotPageSize">printOptGotPageSize</a> :: <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationPreviewClass">PrintOperationPreviewClass</a> self => <a href="/usr/share/doc/ghc/html/libraries/glib-0.12.0/System-Glib-Signals.html#t:Signal">Signal</a> self (<a href="Graphics-UI-Gtk-Printing-PrintContext.html#t:PrintContext">PrintContext</a> -> <a href="Graphics-UI-Gtk-Printing-PageSetup.html#t:PageSetup">PageSetup</a> -> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a>)</li></ul></div><div id="interface"><h1 id="g:1">Detail </h1><div class="doc"><p><code><a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperation">PrintOperation</a></code> is the high-level, portable printing API. It looks a bit different than other Gtk+ dialogs such as the <code><a href="Graphics-UI-Gtk-Selectors-FileChooser.html#t:FileChooser">FileChooser</a></code>, since some platforms don't expose enough infrastructure to implement a good print dialog. On such platforms, <code><a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperation">PrintOperation</a></code> uses the native print dialog. On platforms which do not provide a native print dialog, Gtk+ uses its own, see <code>PrintUnixDialog</code>. </p><p>The typical way to use the high-level printing API is to create a <code><a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperation">PrintOperation</a></code> object with <code><a href="Graphics-UI-Gtk-Printing-PrintOperation.html#v:printOperationNew">printOperationNew</a></code> when the user selects to print. Then you set some properties on it, e.g. the page size, any <code><a href="Graphics-UI-Gtk-Printing-PrintSettings.html#t:PrintSettings">PrintSettings</a></code> from previous print operations, the number of pages, the current page, etc. </p><p>Then you start the print operation by calling <code><a href="Graphics-UI-Gtk-Printing-PrintOperation.html#v:printOperationRun">printOperationRun</a></code>. It will then show a dialog, let the user select a printer and options. When the user finished the dialog various signals will be emitted on the <code><a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperation">PrintOperation</a></code>, the main one being 'draw-page' signal, which you are supposed to catch and render the page on the provided <code><a href="Graphics-UI-Gtk-Printing-PrintContext.html#t:PrintContext">PrintContext</a></code> using Cairo. </p><p>By default <code><a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperation">PrintOperation</a></code> uses an external application to do print preview. To implement a custom print preview, an application must connect to the preview signal. The functions <code>printOperationPrintPreviewRenderPage</code>, <code><a href="Graphics-UI-Gtk-Printing-PrintOperation.html#v:printOperationPreviewEndPreview">printOperationPreviewEndPreview</a></code> and <code><a href="Graphics-UI-Gtk-Printing-PrintOperation.html#v:printOperationPreviewIsSelected">printOperationPreviewIsSelected</a></code> are useful when implementing a print preview. </p><p>Printing support was added in Gtk+ 2.10. </p></div><h1 id="g:2">Class Hierarchy </h1><div class="doc"><pre> | <code><a href="/usr/share/doc/ghc/html/libraries/glib-0.12.0/System-Glib-GObject.html#t:GObject">GObject</a></code> | +----PrintOperation </pre></div><h1 id="g:3">Types </h1><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:PrintOperation" class="def">PrintOperation</a> <a href="src/Graphics-UI-Gtk-Types.html#PrintOperation" class="link">Source</a></p><div class="subs instances"><p id="control.i:PrintOperation" class="caption collapser" onclick="toggleSection('i:PrintOperation')">Instances</p><div id="section.i:PrintOperation" class="show"><table><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Eq.html#t:Eq">Eq</a> <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperation">PrintOperation</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Ord.html#t:Ord">Ord</a> <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperation">PrintOperation</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/glib-0.12.0/System-Glib-GObject.html#t:GObjectClass">GObjectClass</a> <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperation">PrintOperation</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationPreviewClass">PrintOperationPreviewClass</a> <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperation">PrintOperation</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationClass">PrintOperationClass</a> <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperation">PrintOperation</a></td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">class</span> <a href="/usr/share/doc/ghc/html/libraries/glib-0.12.0/System-Glib-GObject.html#t:GObjectClass">GObjectClass</a> o => <a name="t:PrintOperationClass" class="def">PrintOperationClass</a> o <a href="src/Graphics-UI-Gtk-Types.html#PrintOperationClass" class="link">Source</a></p><div class="subs instances"><p id="control.i:PrintOperationClass" class="caption collapser" onclick="toggleSection('i:PrintOperationClass')">Instances</p><div id="section.i:PrintOperationClass" class="show"><table><tr><td class="src"><a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationClass">PrintOperationClass</a> <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperation">PrintOperation</a></td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:castToPrintOperation" class="def">castToPrintOperation</a> :: <a href="/usr/share/doc/ghc/html/libraries/glib-0.12.0/System-Glib-GObject.html#t:GObjectClass">GObjectClass</a> obj => obj -> <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperation">PrintOperation</a><a href="src/Graphics-UI-Gtk-Types.html#castToPrintOperation" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:toPrintOperation" class="def">toPrintOperation</a> :: <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationClass">PrintOperationClass</a> o => o -> <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperation">PrintOperation</a><a href="src/Graphics-UI-Gtk-Types.html#toPrintOperation" class="link">Source</a></p></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:PrintOperationPreview" class="def">PrintOperationPreview</a> <a href="src/Graphics-UI-Gtk-Types.html#PrintOperationPreview" class="link">Source</a></p><div class="subs instances"><p id="control.i:PrintOperationPreview" class="caption collapser" onclick="toggleSection('i:PrintOperationPreview')">Instances</p><div id="section.i:PrintOperationPreview" class="show"><table><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Eq.html#t:Eq">Eq</a> <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationPreview">PrintOperationPreview</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Ord.html#t:Ord">Ord</a> <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationPreview">PrintOperationPreview</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/glib-0.12.0/System-Glib-GObject.html#t:GObjectClass">GObjectClass</a> <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationPreview">PrintOperationPreview</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationPreviewClass">PrintOperationPreviewClass</a> <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationPreview">PrintOperationPreview</a></td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">class</span> <a href="/usr/share/doc/ghc/html/libraries/glib-0.12.0/System-Glib-GObject.html#t:GObjectClass">GObjectClass</a> o => <a name="t:PrintOperationPreviewClass" class="def">PrintOperationPreviewClass</a> o <a href="src/Graphics-UI-Gtk-Types.html#PrintOperationPreviewClass" class="link">Source</a></p><div class="subs instances"><p id="control.i:PrintOperationPreviewClass" class="caption collapser" onclick="toggleSection('i:PrintOperationPreviewClass')">Instances</p><div id="section.i:PrintOperationPreviewClass" class="show"><table><tr><td class="src"><a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationPreviewClass">PrintOperationPreviewClass</a> <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationPreview">PrintOperationPreview</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationPreviewClass">PrintOperationPreviewClass</a> <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperation">PrintOperation</a></td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:castToPrintOperationPreview" class="def">castToPrintOperationPreview</a> :: <a href="/usr/share/doc/ghc/html/libraries/glib-0.12.0/System-Glib-GObject.html#t:GObjectClass">GObjectClass</a> obj => obj -> <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationPreview">PrintOperationPreview</a><a href="src/Graphics-UI-Gtk-Types.html#castToPrintOperationPreview" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:toPrintOperationPreview" class="def">toPrintOperationPreview</a> :: <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationPreviewClass">PrintOperationPreviewClass</a> o => o -> <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationPreview">PrintOperationPreview</a><a href="src/Graphics-UI-Gtk-Types.html#toPrintOperationPreview" class="link">Source</a></p></div><h1 id="g:4">Enums </h1><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:PrintStatus" class="def">PrintStatus</a> <a href="src/Graphics-UI-Gtk-Printing-PrintOperation.html#PrintStatus" class="link">Source</a></p><div class="doc"><p>The status gives a rough indication of the completion of a running print operation. </p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:PrintStatusInitial" class="def">PrintStatusInitial</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:PrintStatusPreparing" class="def">PrintStatusPreparing</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:PrintStatusGeneratingData" class="def">PrintStatusGeneratingData</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:PrintStatusSendingData" class="def">PrintStatusSendingData</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:PrintStatusPending" class="def">PrintStatusPending</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:PrintStatusPendingIssue" class="def">PrintStatusPendingIssue</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:PrintStatusPrinting" class="def">PrintStatusPrinting</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:PrintStatusFinished" class="def">PrintStatusFinished</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:PrintStatusFinishedAborted" class="def">PrintStatusFinishedAborted</a></td><td class="doc empty"> </td></tr></table></div><div class="subs instances"><p id="control.i:PrintStatus" class="caption collapser" onclick="toggleSection('i:PrintStatus')">Instances</p><div id="section.i:PrintStatus" class="show"><table><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Prelude.html#t:Bounded">Bounded</a> <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintStatus">PrintStatus</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Prelude.html#t:Enum">Enum</a> <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintStatus">PrintStatus</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Eq.html#t:Eq">Eq</a> <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintStatus">PrintStatus</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Text-Show.html#t:Show">Show</a> <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintStatus">PrintStatus</a></td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:PrintOperationAction" class="def">PrintOperationAction</a> <a href="src/Graphics-UI-Gtk-Printing-PrintOperation.html#PrintOperationAction" class="link">Source</a></p><div class="doc"><p>The action parameter to <code><a href="Graphics-UI-Gtk-Printing-PrintOperation.html#v:printOperationRun">printOperationRun</a></code> determines what action the print operation should perform. </p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:PrintOperationActionPrintDialog" class="def">PrintOperationActionPrintDialog</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:PrintOperationActionPrint" class="def">PrintOperationActionPrint</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:PrintOperationActionPreview" class="def">PrintOperationActionPreview</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:PrintOperationActionExport" class="def">PrintOperationActionExport</a></td><td class="doc empty"> </td></tr></table></div><div class="subs instances"><p id="control.i:PrintOperationAction" class="caption collapser" onclick="toggleSection('i:PrintOperationAction')">Instances</p><div id="section.i:PrintOperationAction" class="show"><table><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Prelude.html#t:Bounded">Bounded</a> <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationAction">PrintOperationAction</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Prelude.html#t:Enum">Enum</a> <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationAction">PrintOperationAction</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Eq.html#t:Eq">Eq</a> <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationAction">PrintOperationAction</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Text-Show.html#t:Show">Show</a> <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationAction">PrintOperationAction</a></td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:PrintOperationResult" class="def">PrintOperationResult</a> <a href="src/Graphics-UI-Gtk-Printing-PrintOperation.html#PrintOperationResult" class="link">Source</a></p><div class="doc"><p>A value of this type is returned by <code><a href="Graphics-UI-Gtk-Printing-PrintOperation.html#v:printOperationRun">printOperationRun</a></code>. </p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:PrintOperationResultError" class="def">PrintOperationResultError</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:PrintOperationResultApply" class="def">PrintOperationResultApply</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:PrintOperationResultCancel" class="def">PrintOperationResultCancel</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:PrintOperationResultInProgress" class="def">PrintOperationResultInProgress</a></td><td class="doc empty"> </td></tr></table></div><div class="subs instances"><p id="control.i:PrintOperationResult" class="caption collapser" onclick="toggleSection('i:PrintOperationResult')">Instances</p><div id="section.i:PrintOperationResult" class="show"><table><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Prelude.html#t:Bounded">Bounded</a> <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationResult">PrintOperationResult</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Prelude.html#t:Enum">Enum</a> <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationResult">PrintOperationResult</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Eq.html#t:Eq">Eq</a> <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationResult">PrintOperationResult</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Text-Show.html#t:Show">Show</a> <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationResult">PrintOperationResult</a></td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:PrintError" class="def">PrintError</a> <a href="src/Graphics-UI-Gtk-Printing-PrintOperation.html#PrintError" class="link">Source</a></p><div class="doc"><p>Error codes that identify various errors that can occur while using the GTK+ printing support. </p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:PrintErrorGeneral" class="def">PrintErrorGeneral</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:PrintErrorInternalError" class="def">PrintErrorInternalError</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:PrintErrorNomem" class="def">PrintErrorNomem</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:PrintErrorInvalidFile" class="def">PrintErrorInvalidFile</a></td><td class="doc empty"> </td></tr></table></div><div class="subs instances"><p id="control.i:PrintError" class="caption collapser" onclick="toggleSection('i:PrintError')">Instances</p><div id="section.i:PrintError" class="show"><table><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Prelude.html#t:Bounded">Bounded</a> <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintError">PrintError</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Prelude.html#t:Enum">Enum</a> <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintError">PrintError</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Eq.html#t:Eq">Eq</a> <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintError">PrintError</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Text-Show.html#t:Show">Show</a> <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintError">PrintError</a></td><td class="doc empty"> </td></tr></table></div></div></div><h1 id="g:5">Constructors </h1><div class="top"><p class="src"><a name="v:printOperationNew" class="def">printOperationNew</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperation">PrintOperation</a><a href="src/Graphics-UI-Gtk-Printing-PrintOperation.html#printOperationNew" class="link">Source</a></p><div class="doc"><p>Creates a new <code><a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperation">PrintOperation</a></code>. </p></div></div><h1 id="g:6">Methods </h1><div class="top"><p class="src"><a name="v:printOperationSetAllowAsync" class="def">printOperationSetAllowAsync</a><a href="src/Graphics-UI-Gtk-Printing-PrintOperation.html#printOperationSetAllowAsync" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationClass">PrintOperationClass</a> self</td><td class="doc empty"> </td></tr><tr><td class="src">=> self</td><td class="doc empty"> </td></tr><tr><td class="src">-> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Bool.html#t:Bool">Bool</a></td><td class="doc"><p><code>allowAsync</code> - <code>True</code> to allow asynchronous operation </p></td></tr><tr><td class="src">-> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a></td><td class="doc empty"> </td></tr></table></div><div class="doc"><p>Sets whether the <code><a href="Graphics-UI-Gtk-Printing-PrintOperation.html#v:printOperationRun">printOperationRun</a></code> may return before the print operation is completed. Note that some platforms may not allow asynchronous operation. </p></div></div><div class="top"><p class="src"><a name="v:printOperationGetError" class="def">printOperationGetError</a> :: <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationClass">PrintOperationClass</a> self => self -> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a><a href="src/Graphics-UI-Gtk-Printing-PrintOperation.html#printOperationGetError" class="link">Source</a></p><div class="doc"><p>Call this when the result of a print operation is <code><a href="Graphics-UI-Gtk-Printing-PrintOperation.html#v:PrintOperationResultError">PrintOperationResultError</a></code>, either as returned by <code><a href="Graphics-UI-Gtk-Printing-PrintOperation.html#v:printOperationRun">printOperationRun</a></code>, or in the <code>done</code> signal handler. The returned <code><a href="/usr/share/doc/ghc/html/libraries/glib-0.12.0/System-Glib-GError.html#t:GError">GError</a></code> will contain more details on what went wrong. </p></div></div><div class="top"><p class="src"><a name="v:printOperationGetNPagesToPrint" class="def">printOperationGetNPagesToPrint</a><a href="src/Graphics-UI-Gtk-Printing-PrintOperation.html#printOperationGetNPagesToPrint" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationClass">PrintOperationClass</a> self</td><td class="doc empty"> </td></tr><tr><td class="src">=> self</td><td class="doc empty"> </td></tr><tr><td class="src">-> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Int.html#t:Int">Int</a></td><td class="doc"><p>returns the number of pages that will be printed </p></td></tr></table></div><div class="doc"><p>Returns the number of pages that will be printed. </p><p>Note that this value is set during print preparation phase (<code><a href="Graphics-UI-Gtk-Printing-PrintOperation.html#v:PrintStatusPreparing">PrintStatusPreparing</a></code>), so this function should never be called before the data generation phase (<code><a href="Graphics-UI-Gtk-Printing-PrintOperation.html#v:PrintStatusGeneratingData">PrintStatusGeneratingData</a></code>). You can connect to the <code>statusChanged</code> signal and call <code><a href="Graphics-UI-Gtk-Printing-PrintOperation.html#v:printOperationGetNPagesToPrint">printOperationGetNPagesToPrint</a></code> when print status is <code><a href="Graphics-UI-Gtk-Printing-PrintOperation.html#v:PrintStatusGeneratingData">PrintStatusGeneratingData</a></code>. This is typically used to track the progress of print operation. </p><ul><li> Available since Gtk+ version 2.18 </li></ul></div></div><div class="top"><p class="src"><a name="v:printOperationRun" class="def">printOperationRun</a><a href="src/Graphics-UI-Gtk-Printing-PrintOperation.html#printOperationRun" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: (<a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationClass">PrintOperationClass</a> self, <a href="Graphics-UI-Gtk-Windows-Window.html#t:WindowClass">WindowClass</a> parent)</td><td class="doc empty"> </td></tr><tr><td class="src">=> self</td><td class="doc empty"> </td></tr><tr><td class="src">-> <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationAction">PrintOperationAction</a></td><td class="doc"><p><code>action</code> - the action to start </p></td></tr><tr><td class="src">-> parent</td><td class="doc"><p><code>parent</code> - Transient parent of the dialog </p></td></tr><tr><td class="src">-> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationResult">PrintOperationResult</a></td><td class="doc"><p>returns the result of the print operation. A return value of <code><a href="Graphics-UI-Gtk-Printing-PrintOperation.html#v:PrintOperationResultApply">PrintOperationResultApply</a></code> indicates that the printing was completed successfully. In this case, it is a good idea to obtain the used print settings with <code>printOperationGetPrintSettings</code> and store them for reuse with the next print operation. A value of <code><a href="Graphics-UI-Gtk-Printing-PrintOperation.html#v:PrintOperationResultInProgress">PrintOperationResultInProgress</a></code> means the operation is running asynchronously, and will emit the <code>done</code> signal when done. </p></td></tr></table></div><div class="doc"><p>Runs the print operation, by first letting the user modify print settings in the print dialog, and then print the document. </p><p>Normally that this function does not return until the rendering of all pages is complete. You can connect to the <code>statusChanged</code> signal on <code>op</code> to obtain some information about the progress of the print operation. Furthermore, it may use a recursive mainloop to show the print dialog. </p><p>If you call <code><a href="Graphics-UI-Gtk-Printing-PrintOperation.html#v:printOperationSetAllowAsync">printOperationSetAllowAsync</a></code> or set the <code>allowAsync</code> property the operation will run asynchronously if this is supported on the platform. The <code>done</code> signal will be emitted with the result of the operation when the it is done (i.e. when the dialog is canceled, or when the print succeeds or fails). </p></div></div><div class="top"><p class="src"><a name="v:printOperationCancel" class="def">printOperationCancel</a> :: <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationClass">PrintOperationClass</a> self => self -> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a><a href="src/Graphics-UI-Gtk-Printing-PrintOperation.html#printOperationCancel" class="link">Source</a></p><div class="doc"><p>Cancels a running print operation. This function may be called from a <code>beginPrint</code>, <code>paginate</code> or <code>drawPage</code> signal handler to stop the currently running print operation. </p></div></div><div class="top"><p class="src"><a name="v:printOperationDrawPageFinish" class="def">printOperationDrawPageFinish</a> :: <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationClass">PrintOperationClass</a> self => self -> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a><a href="src/Graphics-UI-Gtk-Printing-PrintOperation.html#printOperationDrawPageFinish" class="link">Source</a></p><div class="doc"><p>Signalize that drawing of particular page is complete. </p><p>It is called after completion of page drawing (e.g. drawing in another thread). If <code><a href="Graphics-UI-Gtk-Printing-PrintOperation.html#v:printOperationSetDeferDrawing">printOperationSetDeferDrawing</a></code> was called before, then this function has to be called by application. In another case it is called by the library itself. </p><ul><li> Available since Gtk+ version 2.16 </li></ul></div></div><div class="top"><p class="src"><a name="v:printOperationSetDeferDrawing" class="def">printOperationSetDeferDrawing</a> :: <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationClass">PrintOperationClass</a> self => self -> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a><a href="src/Graphics-UI-Gtk-Printing-PrintOperation.html#printOperationSetDeferDrawing" class="link">Source</a></p><div class="doc"><p>Sets up the <code><a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperation">PrintOperation</a></code> to wait for calling of <code><a href="Graphics-UI-Gtk-Printing-PrintOperation.html#v:printOperationDrawPageFinish">printOperationDrawPageFinish</a></code> from application. It can be used for drawing page in another thread. </p><p>This function must be called in the callback of "draw-page" signal. </p><ul><li> Available since Gtk+ version 2.16 </li></ul></div></div><div class="top"><p class="src"><a name="v:printOperationGetStatus" class="def">printOperationGetStatus</a><a href="src/Graphics-UI-Gtk-Printing-PrintOperation.html#printOperationGetStatus" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationClass">PrintOperationClass</a> self</td><td class="doc empty"> </td></tr><tr><td class="src">=> self</td><td class="doc empty"> </td></tr><tr><td class="src">-> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintStatus">PrintStatus</a></td><td class="doc"><p>returns the status of the print operation </p></td></tr></table></div><div class="doc"><p>Returns the status of the print operation. Also see <code><a href="Graphics-UI-Gtk-Printing-PrintOperation.html#v:printOperationGetStatusString">printOperationGetStatusString</a></code>. </p></div></div><div class="top"><p class="src"><a name="v:printOperationGetStatusString" class="def">printOperationGetStatusString</a><a href="src/Graphics-UI-Gtk-Printing-PrintOperation.html#printOperationGetStatusString" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationClass">PrintOperationClass</a> self</td><td class="doc empty"> </td></tr><tr><td class="src">=> self</td><td class="doc empty"> </td></tr><tr><td class="src">-> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Char.html#t:String">String</a></td><td class="doc"><p>returns a string representation of the status of the print operation </p></td></tr></table></div><div class="doc"><p>Returns a string representation of the status of the print operation. The string is translated and suitable for displaying the print status e.g. in a <code><a href="Graphics-UI-Gtk-Display-Statusbar.html#t:Statusbar">Statusbar</a></code>. </p><p>Use <code><a href="Graphics-UI-Gtk-Printing-PrintOperation.html#v:printOperationGetStatus">printOperationGetStatus</a></code> to obtain a status value that is suitable for programmatic use. </p></div></div><div class="top"><p class="src"><a name="v:printOperationIsFinished" class="def">printOperationIsFinished</a><a href="src/Graphics-UI-Gtk-Printing-PrintOperation.html#printOperationIsFinished" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationClass">PrintOperationClass</a> self</td><td class="doc empty"> </td></tr><tr><td class="src">=> self</td><td class="doc empty"> </td></tr><tr><td class="src">-> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Bool.html#t:Bool">Bool</a></td><td class="doc"><p>returns <code>True</code>, if the print operation is finished. </p></td></tr></table></div><div class="doc"><p>A convenience function to find out if the print operation is finished, either successfully (<code><a href="Graphics-UI-Gtk-Printing-PrintOperation.html#v:PrintStatusFinished">PrintStatusFinished</a></code>) or unsuccessfully (<code><a href="Graphics-UI-Gtk-Printing-PrintOperation.html#v:PrintStatusFinishedAborted">PrintStatusFinishedAborted</a></code>). </p><p>Note: when you enable print status tracking the print operation can be in a non-finished state even after done has been called, as the operation status then tracks the print job status on the printer. </p></div></div><div class="top"><p class="src"><a name="v:printRunPageSetupDialog" class="def">printRunPageSetupDialog</a><a href="src/Graphics-UI-Gtk-Printing-PrintOperation.html#printRunPageSetupDialog" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: (<a href="Graphics-UI-Gtk-Windows-Window.html#t:WindowClass">WindowClass</a> window, <a href="Graphics-UI-Gtk-Printing-PageSetup.html#t:PageSetupClass">PageSetupClass</a> pageSetup, <a href="Graphics-UI-Gtk-Printing-PrintSettings.html#t:PrintSettingsClass">PrintSettingsClass</a> setting)</td><td class="doc empty"> </td></tr><tr><td class="src">=> window</td><td class="doc"><p><code>parent</code> transient parent. </p></td></tr><tr><td class="src">-> pageSetup</td><td class="doc"><p><code>pageSetup</code> an existing <code><a href="Graphics-UI-Gtk-Printing-PageSetup.html#t:PageSetup">PageSetup</a></code>. </p></td></tr><tr><td class="src">-> setting</td><td class="doc"><p><code>settings</code> a <code><a href="Graphics-UI-Gtk-Printing-PrintSettings.html#t:PrintSettings">PrintSettings</a></code> </p></td></tr><tr><td class="src">-> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="Graphics-UI-Gtk-Printing-PageSetup.html#t:PageSetup">PageSetup</a></td><td class="doc"><p>returns a new <code><a href="Graphics-UI-Gtk-Printing-PageSetup.html#t:PageSetup">PageSetup</a></code> </p></td></tr></table></div><div class="doc"><p>Runs a page setup dialog, letting the user modify the values from <code>pageSetup</code>. If the user cancels the dialog, the returned <code><a href="Graphics-UI-Gtk-Printing-PageSetup.html#t:PageSetup">PageSetup</a></code> is identical to the passed in <code>pageSetup</code>, 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. See <code><a href="Graphics-UI-Gtk-Printing-PrintOperation.html#v:printRunPageSetupDialogAsync">printRunPageSetupDialogAsync</a></code> if this is a problem. </p></div></div><div class="top"><p class="src"><a name="v:printRunPageSetupDialogAsync" class="def">printRunPageSetupDialogAsync</a><a href="src/Graphics-UI-Gtk-Printing-PrintOperation.html#printRunPageSetupDialogAsync" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: (<a href="Graphics-UI-Gtk-Windows-Window.html#t:WindowClass">WindowClass</a> window, <a href="Graphics-UI-Gtk-Printing-PageSetup.html#t:PageSetupClass">PageSetupClass</a> pageSetup, <a href="Graphics-UI-Gtk-Printing-PrintSettings.html#t:PrintSettingsClass">PrintSettingsClass</a> setting)</td><td class="doc empty"> </td></tr><tr><td class="src">=> window</td><td class="doc"><p><code>parent</code> transient parent. </p></td></tr><tr><td class="src">-> pageSetup</td><td class="doc"><p><code>pageSetup</code> an existing <code><a href="Graphics-UI-Gtk-Printing-PageSetup.html#t:PageSetup">PageSetup</a></code>. </p></td></tr><tr><td class="src">-> setting</td><td class="doc"><p><code>settings</code> a <code><a href="Graphics-UI-Gtk-Printing-PrintSettings.html#t:PrintSettings">PrintSettings</a></code> </p></td></tr><tr><td class="src">-> (<a href="Graphics-UI-Gtk-Printing-PageSetup.html#t:PageSetup">PageSetup</a> -> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a>)</td><td class="doc"><p><code>doneCb</code> a function to call when the user saves the modified page setup </p></td></tr><tr><td class="src">-> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a></td><td class="doc empty"> </td></tr></table></div><div class="doc"><p>Runs a page setup dialog, letting the user modify the values from <code>pageSetup</code>. </p><p>In contrast to <code><a href="Graphics-UI-Gtk-Printing-PrintOperation.html#v:printRunPageSetupDialog">printRunPageSetupDialog</a></code>, this function returns after showing the page setup dialog on platforms that support this, and calls <code>doneCb</code> from a signal handler for the <code>response</code> signal of the dialog. </p></div></div><div class="top"><p class="src"><a name="v:printOperationPreviewEndPreview" class="def">printOperationPreviewEndPreview</a> :: <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationPreviewClass">PrintOperationPreviewClass</a> self => self -> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a><a href="src/Graphics-UI-Gtk-Printing-PrintOperation.html#printOperationPreviewEndPreview" class="link">Source</a></p><div class="doc"><p>Ends a preview. </p><p>This function must be called to finish a custom print preview. </p></div></div><div class="top"><p class="src"><a name="v:printOperationPreviewIsSelected" class="def">printOperationPreviewIsSelected</a><a href="src/Graphics-UI-Gtk-Printing-PrintOperation.html#printOperationPreviewIsSelected" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationPreviewClass">PrintOperationPreviewClass</a> self</td><td class="doc empty"> </td></tr><tr><td class="src">=> self</td><td class="doc"><p><code>preview</code> a <code><a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationPreview">PrintOperationPreview</a></code> </p></td></tr><tr><td class="src">-> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Int.html#t:Int">Int</a></td><td class="doc"><p><code>pageNr</code> a page number </p></td></tr><tr><td class="src">-> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Bool.html#t:Bool">Bool</a></td><td class="doc"><p>returns <code><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Bool.html#v:True">True</a></code> if the page has been selected for printing </p></td></tr></table></div><div class="doc"><p>Returns whether the given page is included in the set of pages that have been selected for printing. </p></div></div><div class="top"><p class="src"><a name="v:printOperationPreviewRenderPage" class="def">printOperationPreviewRenderPage</a><a href="src/Graphics-UI-Gtk-Printing-PrintOperation.html#printOperationPreviewRenderPage" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationPreviewClass">PrintOperationPreviewClass</a> self</td><td class="doc empty"> </td></tr><tr><td class="src">=> self</td><td class="doc"><p><code>preview</code> a <code><a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationPreview">PrintOperationPreview</a></code> </p></td></tr><tr><td class="src">-> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Int.html#t:Int">Int</a></td><td class="doc"><p><code>pageNr</code> the page to render </p></td></tr><tr><td class="src">-> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a></td><td class="doc empty"> </td></tr></table></div><div class="doc"><p>Renders a page to the preview, using the print context that was passed to the <a href="preview.html">preview</a> handler together with preview. </p><p>A custom iprint preview should use this function in its <code>expose</code> handler to render the currently selected page. </p><p>Note that this function requires a suitable cairo context to be associated with the print context. </p></div></div><h1 id="g:7">Attributes </h1><div class="top"><p class="src"><a name="v:printOperationDefaultPageSetup" class="def">printOperationDefaultPageSetup</a> :: (<a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationClass">PrintOperationClass</a> self, <a href="Graphics-UI-Gtk-Printing-PageSetup.html#t:PageSetupClass">PageSetupClass</a> pageSetup) => <a href="/usr/share/doc/ghc/html/libraries/glib-0.12.0/System-Glib-Attributes.html#t:ReadWriteAttr">ReadWriteAttr</a> self <a href="Graphics-UI-Gtk-Printing-PageSetup.html#t:PageSetup">PageSetup</a> pageSetup<a href="src/Graphics-UI-Gtk-Printing-PrintOperation.html#printOperationDefaultPageSetup" class="link">Source</a></p><div class="doc"><p>The <code><a href="Graphics-UI-Gtk-Printing-PageSetup.html#t:PageSetup">PageSetup</a></code> used by default. </p><p>This page setup will be used by <code><a href="Graphics-UI-Gtk-Printing-PrintOperation.html#v:printOperationRun">printOperationRun</a></code>, but it can be overridden on a per-page basis by connecting to the <code>requestPageSetup</code> signal. </p><p>Since 2.10 </p></div></div><div class="top"><p class="src"><a name="v:printOperationPrintSettings" class="def">printOperationPrintSettings</a> :: (<a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationClass">PrintOperationClass</a> self, <a href="Graphics-UI-Gtk-Printing-PrintSettings.html#t:PrintSettingsClass">PrintSettingsClass</a> printSettings) => <a href="/usr/share/doc/ghc/html/libraries/glib-0.12.0/System-Glib-Attributes.html#t:ReadWriteAttr">ReadWriteAttr</a> self <a href="Graphics-UI-Gtk-Printing-PrintSettings.html#t:PrintSettings">PrintSettings</a> printSettings<a href="src/Graphics-UI-Gtk-Printing-PrintOperation.html#printOperationPrintSettings" class="link">Source</a></p><div class="doc"><p>The <code><a href="Graphics-UI-Gtk-Printing-PrintSettings.html#t:PrintSettings">PrintSettings</a></code> used for initializing the dialog. </p><p>Setting this property is typically used to re-establish print settings from a previous print operation, see <code><a href="Graphics-UI-Gtk-Printing-PrintOperation.html#v:printOperationRun">printOperationRun</a></code>. </p><p>Since 2.10 </p></div></div><div class="top"><p class="src"><a name="v:printOperationJobName" class="def">printOperationJobName</a> :: <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationClass">PrintOperationClass</a> self => <a href="/usr/share/doc/ghc/html/libraries/glib-0.12.0/System-Glib-Attributes.html#t:Attr">Attr</a> self <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Char.html#t:String">String</a><a href="src/Graphics-UI-Gtk-Printing-PrintOperation.html#printOperationJobName" class="link">Source</a></p><div class="doc"><p>A string used to identify the job (e.g. in monitoring applications like eggcups). </p><p>If you don't set a job name, GTK+ picks a default one by numbering successive print jobs. </p><p>Default value: "" </p><p>Since 2.10 </p></div></div><div class="top"><p class="src"><a name="v:printOperationNPages" class="def">printOperationNPages</a> :: <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationClass">PrintOperationClass</a> self => <a href="/usr/share/doc/ghc/html/libraries/glib-0.12.0/System-Glib-Attributes.html#t:Attr">Attr</a> self <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Int.html#t:Int">Int</a><a href="src/Graphics-UI-Gtk-Printing-PrintOperation.html#printOperationNPages" class="link">Source</a></p><div class="doc"><p>The number of pages in the document. </p><p>This must be set to a positive number before the rendering starts. It may be set in a <code>beginPrint</code> signal hander. </p><p>Note that the page numbers passed to the <code>requestPageSetup</code> and <code>drawPage</code> signals are 0-based, i.e. if the user chooses to print all pages, the last <code>drawPage</code> signal will be for page <code>nPages</code> - 1. </p><p>Allowed values: >= <code>GMaxulong</code> </p><p>Default value: -1 </p><p>Since 2.10 </p></div></div><div class="top"><p class="src"><a name="v:printOperationCurrentPage" class="def">printOperationCurrentPage</a> :: <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationClass">PrintOperationClass</a> self => <a href="/usr/share/doc/ghc/html/libraries/glib-0.12.0/System-Glib-Attributes.html#t:Attr">Attr</a> self <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Int.html#t:Int">Int</a><a href="src/Graphics-UI-Gtk-Printing-PrintOperation.html#printOperationCurrentPage" class="link">Source</a></p><div class="doc"><p>The current page in the document. </p><p>If this is set before <code><a href="Graphics-UI-Gtk-Printing-PrintOperation.html#v:printOperationRun">printOperationRun</a></code>, the user will be able to select to print only the current page. </p><p>Note that this only makes sense for pre-paginated documents. </p><p>Allowed values: >= <code>GMaxulong</code> </p><p>Default value: -1 </p><p>Since 2.10 </p></div></div><div class="top"><p class="src"><a name="v:printOperationUseFullPage" class="def">printOperationUseFullPage</a> :: <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationClass">PrintOperationClass</a> self => <a href="/usr/share/doc/ghc/html/libraries/glib-0.12.0/System-Glib-Attributes.html#t:Attr">Attr</a> self <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Bool.html#t:Bool">Bool</a><a href="src/Graphics-UI-Gtk-Printing-PrintOperation.html#printOperationUseFullPage" class="link">Source</a></p><div class="doc"><p>If <code><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Bool.html#v:True">True</a></code>, the transformation for the cairo context obtained from <code><a href="Graphics-UI-Gtk-Printing-PrintContext.html#t:PrintContext">PrintContext</a></code> puts the origin at the top left corner of the page (which may not be the top left corner of the sheet, depending on page orientation and the number of pages per sheet). Otherwise, the origin is at the top left corner of the imageable area (i.e. inside the margins). </p><p>Default value: <code><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Bool.html#v:False">False</a></code> </p><p>Since 2.10 </p></div></div><div class="top"><p class="src"><a name="v:printOperationTrackPrintStatus" class="def">printOperationTrackPrintStatus</a> :: <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationClass">PrintOperationClass</a> self => <a href="/usr/share/doc/ghc/html/libraries/glib-0.12.0/System-Glib-Attributes.html#t:Attr">Attr</a> self <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Bool.html#t:Bool">Bool</a><a href="src/Graphics-UI-Gtk-Printing-PrintOperation.html#printOperationTrackPrintStatus" class="link">Source</a></p><div class="doc"><p>If <code><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Bool.html#v:True">True</a></code>, the print operation will try to continue report on the status of the print job in the printer queues and printer. This can allow your application to show things like <a href="out of paper.html">out of paper</a> issues, and when the print job actually reaches the printer. However, this is often implemented using polling, and should not be enabled unless needed. </p><p>Default value: <code><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Bool.html#v:False">False</a></code> </p><p>Since 2.10 </p></div></div><div class="top"><p class="src"><a name="v:printOperationUnit" class="def">printOperationUnit</a> :: <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationClass">PrintOperationClass</a> self => <a href="/usr/share/doc/ghc/html/libraries/glib-0.12.0/System-Glib-Attributes.html#t:Attr">Attr</a> self <a href="Graphics-UI-Gtk-Printing-PaperSize.html#t:Unit">Unit</a><a href="src/Graphics-UI-Gtk-Printing-PrintOperation.html#printOperationUnit" class="link">Source</a></p><div class="doc"><p>The transformation for the cairo context obtained from <code><a href="Graphics-UI-Gtk-Printing-PrintContext.html#t:PrintContext">PrintContext</a></code> is set up in such a way that distances are measured in units of unit. </p><p>Default value: ''UnitPixel'' </p><p>Since 2.10 </p></div></div><div class="top"><p class="src"><a name="v:printOperationShowProgress" class="def">printOperationShowProgress</a> :: <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationClass">PrintOperationClass</a> self => <a href="/usr/share/doc/ghc/html/libraries/glib-0.12.0/System-Glib-Attributes.html#t:Attr">Attr</a> self <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Bool.html#t:Bool">Bool</a><a href="src/Graphics-UI-Gtk-Printing-PrintOperation.html#printOperationShowProgress" class="link">Source</a></p><div class="doc"><p>Determines whether to show a progress dialog during the print operation. </p><p>Default value: <code><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Bool.html#v:False">False</a></code> </p><p>Since 2.10 </p></div></div><div class="top"><p class="src"><a name="v:printOperationAllowAsync" class="def">printOperationAllowAsync</a> :: <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationClass">PrintOperationClass</a> self => <a href="/usr/share/doc/ghc/html/libraries/glib-0.12.0/System-Glib-Attributes.html#t:Attr">Attr</a> self <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Bool.html#t:Bool">Bool</a><a href="src/Graphics-UI-Gtk-Printing-PrintOperation.html#printOperationAllowAsync" class="link">Source</a></p><div class="doc"><p>Determines whether the print operation may run asynchronously or not. </p><p>Some systems don't support asynchronous printing, but those that do will return ''PrintOperationResultInProgress'' as the status, and emit the <a href="done.html">done</a> signal when the operation is actually done. </p><p>The Windows port does not support asynchronous operation at all (this is unlikely to change). On other platforms, all actions except for ''PrintOperationActionExport'' support asynchronous operation. </p><p>Default value: <code><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Bool.html#v:False">False</a></code> </p><p>Since 2.10 </p></div></div><div class="top"><p class="src"><a name="v:printOperationExportFilename" class="def">printOperationExportFilename</a> :: <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationClass">PrintOperationClass</a> self => <a href="/usr/share/doc/ghc/html/libraries/glib-0.12.0/System-Glib-Attributes.html#t:Attr">Attr</a> self <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Char.html#t:String">String</a><a href="src/Graphics-UI-Gtk-Printing-PrintOperation.html#printOperationExportFilename" class="link">Source</a></p><div class="doc"><p>The name of a file to generate instead of showing the print dialog. Currently, PDF is the only supported format. </p><p>The intended use of this property is for implementing <a href="Export to PDF.html">Export to PDF</a> actions. </p><p><a href="Print to PDF.html">Print to PDF</a> support is independent of this and is done by letting the user pick the <a href="Print to PDF.html">Print to PDF</a> item from the list of printers in the print dialog. </p><p>Default value: <code><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Maybe.html#v:Nothing">Nothing</a></code> </p><p>Since 2.10 </p></div></div><div class="top"><p class="src"><a name="v:printOperationStatus" class="def">printOperationStatus</a> :: <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationClass">PrintOperationClass</a> self => <a href="/usr/share/doc/ghc/html/libraries/glib-0.12.0/System-Glib-Attributes.html#t:ReadAttr">ReadAttr</a> self <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintStatus">PrintStatus</a><a href="src/Graphics-UI-Gtk-Printing-PrintOperation.html#printOperationStatus" class="link">Source</a></p><div class="doc"><p>The status of the print operation. </p><p>Default value: ''PrintStatusInitial'' </p><p>Since 2.10 </p></div></div><div class="top"><p class="src"><a name="v:printOperationStatusString" class="def">printOperationStatusString</a> :: <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationClass">PrintOperationClass</a> self => <a href="/usr/share/doc/ghc/html/libraries/glib-0.12.0/System-Glib-Attributes.html#t:ReadAttr">ReadAttr</a> self <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Char.html#t:String">String</a><a href="src/Graphics-UI-Gtk-Printing-PrintOperation.html#printOperationStatusString" class="link">Source</a></p><div class="doc"><p>A string representation of the status of the print operation. The string is translated and suitable for displaying the print status e.g. in a <code><a href="Graphics-UI-Gtk-Display-Statusbar.html#t:Statusbar">Statusbar</a></code>. </p><p>See the <code><a href="Graphics-UI-Gtk-Printing-PrintOperation.html#v:printOperationStatus">printOperationStatus</a></code> property for a status value that is suitable for programmatic use. </p><p>Default value: "" </p><p>Since 2.10 </p></div></div><div class="top"><p class="src"><a name="v:printOperationCustomTabLabel" class="def">printOperationCustomTabLabel</a> :: <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationClass">PrintOperationClass</a> self => <a href="/usr/share/doc/ghc/html/libraries/glib-0.12.0/System-Glib-Attributes.html#t:Attr">Attr</a> self <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Char.html#t:String">String</a><a href="src/Graphics-UI-Gtk-Printing-PrintOperation.html#printOperationCustomTabLabel" class="link">Source</a></p><div class="doc"><p>Used as the label of the tab containing custom widgets. Note that this property may be ignored on some platforms. </p><p>If this is <code><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Maybe.html#v:Nothing">Nothing</a></code>, GTK+ uses a default label. </p><p>Default value: <code><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Maybe.html#v:Nothing">Nothing</a></code> </p><p>Since 2.10 </p></div></div><div class="top"><p class="src"><a name="v:printOperationSupportSelection" class="def">printOperationSupportSelection</a> :: <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationClass">PrintOperationClass</a> self => <a href="/usr/share/doc/ghc/html/libraries/glib-0.12.0/System-Glib-Attributes.html#t:Attr">Attr</a> self <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Bool.html#t:Bool">Bool</a><a href="src/Graphics-UI-Gtk-Printing-PrintOperation.html#printOperationSupportSelection" class="link">Source</a></p><div class="doc"><p>If <code><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Bool.html#v:True">True</a></code>, the print operation will support print of selection. This allows the print dialog to show a <a href="Selection.html">Selection</a> button. </p><p>Default value: <code><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Bool.html#v:False">False</a></code> </p><p>Since 2.18 </p></div></div><div class="top"><p class="src"><a name="v:printOperationHasSelection" class="def">printOperationHasSelection</a> :: <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationClass">PrintOperationClass</a> self => <a href="/usr/share/doc/ghc/html/libraries/glib-0.12.0/System-Glib-Attributes.html#t:Attr">Attr</a> self <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Bool.html#t:Bool">Bool</a><a href="src/Graphics-UI-Gtk-Printing-PrintOperation.html#printOperationHasSelection" class="link">Source</a></p><div class="doc"><p>Determines whether there is a selection in your application. This can allow your application to print the selection. This is typically used to make a <a href="Selection.html">Selection</a> button sensitive. </p><p>Default value: <code><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Bool.html#v:False">False</a></code> </p><p>Since 2.18 </p></div></div><div class="top"><p class="src"><a name="v:printOperationEmbedPageSetup" class="def">printOperationEmbedPageSetup</a> :: <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationClass">PrintOperationClass</a> self => <a href="/usr/share/doc/ghc/html/libraries/glib-0.12.0/System-Glib-Attributes.html#t:Attr">Attr</a> self <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Bool.html#t:Bool">Bool</a><a href="src/Graphics-UI-Gtk-Printing-PrintOperation.html#printOperationEmbedPageSetup" class="link">Source</a></p><div class="doc"><p>If <code><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Bool.html#v:True">True</a></code>, page size combo box and orientation combo box are embedded into page setup page. </p><p>Default value: <code><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Bool.html#v:False">False</a></code> </p><p>Since 2.18 </p></div></div><div class="top"><p class="src"><a name="v:printOperationNPagesToPrint" class="def">printOperationNPagesToPrint</a> :: <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationClass">PrintOperationClass</a> self => <a href="/usr/share/doc/ghc/html/libraries/glib-0.12.0/System-Glib-Attributes.html#t:ReadAttr">ReadAttr</a> self <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Int.html#t:Int">Int</a><a href="src/Graphics-UI-Gtk-Printing-PrintOperation.html#printOperationNPagesToPrint" class="link">Source</a></p><div class="doc"><p>The number of pages that will be printed. </p><p>Note that this value is set during print preparation phase (''PrintStatusPreparing''), so this value should never be get before the data generation phase (''PrintStatusGeneratingData''). You can connect to the <code>statusChanged</code> signal and call <code><a href="Graphics-UI-Gtk-Printing-PrintOperation.html#v:printOperationGetNPagesToPrint">printOperationGetNPagesToPrint</a></code> when print status is ''PrintStatusGeneratingData''. This is typically used to track the progress of print operation. </p><p>Allowed values: >= <code>GMaxulong</code> </p><p>Default value: -1 </p><p>Since 2.18 </p></div></div><h1 id="g:8">Signals </h1><div class="top"><p class="src"><a name="v:printOptDone" class="def">printOptDone</a> :: <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationClass">PrintOperationClass</a> self => <a href="/usr/share/doc/ghc/html/libraries/glib-0.12.0/System-Glib-Signals.html#t:Signal">Signal</a> self (<a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationResult">PrintOperationResult</a> -> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a>)<a href="src/Graphics-UI-Gtk-Printing-PrintOperation.html#printOptDone" class="link">Source</a></p><div class="doc"><p>Emitted when the print operation run has finished doing everything required for printing. </p><p><code>result</code> gives you information about what happened during the run. If <code>result</code> is <code><a href="Graphics-UI-Gtk-Printing-PrintOperation.html#v:PrintOperationResultError">PrintOperationResultError</a></code> then you can call <code><a href="Graphics-UI-Gtk-Printing-PrintOperation.html#v:printOperationGetError">printOperationGetError</a></code> for more information. </p><p>If you enabled print status tracking then <code><a href="Graphics-UI-Gtk-Printing-PrintOperation.html#v:printOperationIsFinished">printOperationIsFinished</a></code> may still return <code>False</code> after <code>done</code> was emitted. </p></div></div><div class="top"><p class="src"><a name="v:printOptBeginPrint" class="def">printOptBeginPrint</a> :: <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationClass">PrintOperationClass</a> self => <a href="/usr/share/doc/ghc/html/libraries/glib-0.12.0/System-Glib-Signals.html#t:Signal">Signal</a> self (<a href="Graphics-UI-Gtk-Printing-PrintContext.html#t:PrintContext">PrintContext</a> -> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a>)<a href="src/Graphics-UI-Gtk-Printing-PrintOperation.html#printOptBeginPrint" class="link">Source</a></p><div class="doc"><p>Emitted after the user has finished changing print settings in the dialog, before the actual rendering starts. </p><p>A typical use for 'begin-print' is to use the parameters from the <code><a href="Graphics-UI-Gtk-Printing-PrintContext.html#t:PrintContext">PrintContext</a></code> and paginate the document accordingly, and then set the number of pages with <code>printOperationSetNPages</code>. </p></div></div><div class="top"><p class="src"><a name="v:printOptPaginate" class="def">printOptPaginate</a> :: <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationClass">PrintOperationClass</a> self => <a href="/usr/share/doc/ghc/html/libraries/glib-0.12.0/System-Glib-Signals.html#t:Signal">Signal</a> self (<a href="Graphics-UI-Gtk-Printing-PrintContext.html#t:PrintContext">PrintContext</a> -> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Bool.html#t:Bool">Bool</a>)<a href="src/Graphics-UI-Gtk-Printing-PrintOperation.html#printOptPaginate" class="link">Source</a></p><div class="doc"><p>Emitted after the <code>beginPrint</code> signal, but before the actual rendering starts. It keeps getting emitted until a connected signal handler returns <code>True</code>. </p><p>The <code>paginate</code> signal is intended to be used for paginating a document in small chunks, to avoid blocking the user interface for a long time. The signal handler should update the number of pages using <code>printOperationSetNPages</code>, and return <code>True</code> if the document has been completely paginated. </p><p>If you don't need to do pagination in chunks, you can simply do it all in the 'begin-print handler', and set the number of pages from there. </p></div></div><div class="top"><p class="src"><a name="v:printOptRequestPageSetup" class="def">printOptRequestPageSetup</a> :: <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationClass">PrintOperationClass</a> self => <a href="/usr/share/doc/ghc/html/libraries/glib-0.12.0/System-Glib-Signals.html#t:Signal">Signal</a> self (<a href="Graphics-UI-Gtk-Printing-PrintContext.html#t:PrintContext">PrintContext</a> -> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Int.html#t:Int">Int</a> -> <a href="Graphics-UI-Gtk-Printing-PageSetup.html#t:PageSetup">PageSetup</a> -> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a>)<a href="src/Graphics-UI-Gtk-Printing-PrintOperation.html#printOptRequestPageSetup" class="link">Source</a></p><div class="doc"><p>Emitted once for every page that is printed, to give the application a chance to modify the page setup. Any changes done to <code>setup</code> will be in force only for printing this page. </p></div></div><div class="top"><p class="src"><a name="v:printOptDrawPage" class="def">printOptDrawPage</a> :: <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationClass">PrintOperationClass</a> self => <a href="/usr/share/doc/ghc/html/libraries/glib-0.12.0/System-Glib-Signals.html#t:Signal">Signal</a> self (<a href="Graphics-UI-Gtk-Printing-PrintContext.html#t:PrintContext">PrintContext</a> -> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Int.html#t:Int">Int</a> -> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a>)<a href="src/Graphics-UI-Gtk-Printing-PrintOperation.html#printOptDrawPage" class="link">Source</a></p><div class="doc"><p>Emitted for every page that is printed. The signal handler must render the <code>pageNr</code>'s page onto the cairo context obtained from <code>context</code> using <code>printContextGetCairoContext</code>. </p><p>Use <code>printOperationSetUseFullPage</code> and <code>printOperationSetUnit</code> before starting the print operation to set up the transformation of the cairo context according to your needs. </p></div></div><div class="top"><p class="src"><a name="v:printOptEndPrint" class="def">printOptEndPrint</a> :: <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationClass">PrintOperationClass</a> self => <a href="/usr/share/doc/ghc/html/libraries/glib-0.12.0/System-Glib-Signals.html#t:Signal">Signal</a> self (<a href="Graphics-UI-Gtk-Printing-PrintContext.html#t:PrintContext">PrintContext</a> -> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a>)<a href="src/Graphics-UI-Gtk-Printing-PrintOperation.html#printOptEndPrint" class="link">Source</a></p><div class="doc"><p>Emitted after all pages have been rendered. A handler for this signal can clean up any resources that have been allocated in the <code>beginPrint</code> handler. </p></div></div><div class="top"><p class="src"><a name="v:printOptStatusChanged" class="def">printOptStatusChanged</a> :: <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationClass">PrintOperationClass</a> self => <a href="/usr/share/doc/ghc/html/libraries/glib-0.12.0/System-Glib-Signals.html#t:Signal">Signal</a> self (<a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a>)<a href="src/Graphics-UI-Gtk-Printing-PrintOperation.html#printOptStatusChanged" class="link">Source</a></p><div class="doc"><p>Emitted at between the various phases of the print operation. See <code><a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintStatus">PrintStatus</a></code> for the phases that are being discriminated. Use <code><a href="Graphics-UI-Gtk-Printing-PrintOperation.html#v:printOperationGetStatus">printOperationGetStatus</a></code> to find out the current status. </p></div></div><div class="top"><p class="src"><a name="v:printOptCreateCustomWidget" class="def">printOptCreateCustomWidget</a> :: <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationClass">PrintOperationClass</a> self => <a href="/usr/share/doc/ghc/html/libraries/glib-0.12.0/System-Glib-Signals.html#t:Signal">Signal</a> self (<a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="Graphics-UI-Gtk-Abstract-Widget.html#t:Widget">Widget</a>)<a href="src/Graphics-UI-Gtk-Printing-PrintOperation.html#printOptCreateCustomWidget" class="link">Source</a></p><div class="doc"><p>Emitted when displaying the print dialog. If you return a widget in a handler for this signal it will be added to a custom tab in the print dialog. You typically return a container widget with multiple widgets in it. </p><p>The print dialog owns the returned widget, and its lifetime is not controlled by the application. However, the widget is guaranteed to stay around until the <code>customWidgetApply</code> signal is emitted on the operation. Then you can read out any information you need from the widgets. </p></div></div><div class="top"><p class="src"><a name="v:printOptUpdateCustomWidget" class="def">printOptUpdateCustomWidget</a> :: <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationClass">PrintOperationClass</a> self => <a href="/usr/share/doc/ghc/html/libraries/glib-0.12.0/System-Glib-Signals.html#t:Signal">Signal</a> self (<a href="Graphics-UI-Gtk-Abstract-Widget.html#t:Widget">Widget</a> -> <a href="Graphics-UI-Gtk-Printing-PageSetup.html#t:PageSetup">PageSetup</a> -> <a href="Graphics-UI-Gtk-Printing-PrintSettings.html#t:PrintSettings">PrintSettings</a> -> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a>)<a href="src/Graphics-UI-Gtk-Printing-PrintOperation.html#printOptUpdateCustomWidget" class="link">Source</a></p><div class="doc"><p>Emitted after change of selected printer. The actual page setup and print settings are passed to the custom widget, which can actualize itself according to this change. </p><ul><li> Available since Gtk+ version 2.18 </li></ul></div></div><div class="top"><p class="src"><a name="v:printOptCustomWidgetApply" class="def">printOptCustomWidgetApply</a> :: <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationClass">PrintOperationClass</a> self => <a href="/usr/share/doc/ghc/html/libraries/glib-0.12.0/System-Glib-Signals.html#t:Signal">Signal</a> self (<a href="Graphics-UI-Gtk-Abstract-Widget.html#t:Widget">Widget</a> -> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a>)<a href="src/Graphics-UI-Gtk-Printing-PrintOperation.html#printOptCustomWidgetApply" class="link">Source</a></p><div class="doc"><p>Emitted right before <code>beginPrint</code> if you added a custom widget in the <code>createCustomWidtet</code> handler. When you get this signal you should read the information from the custom widgets, as the widgets are not guaraneed to be around at a later time. </p></div></div><div class="top"><p class="src"><a name="v:printOptPreview" class="def">printOptPreview</a> :: <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationClass">PrintOperationClass</a> self => <a href="/usr/share/doc/ghc/html/libraries/glib-0.12.0/System-Glib-Signals.html#t:Signal">Signal</a> self (<a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationPreview">PrintOperationPreview</a> -> <a href="Graphics-UI-Gtk-Printing-PrintContext.html#t:PrintContext">PrintContext</a> -> <a href="Graphics-UI-Gtk-Windows-Window.html#t:Window">Window</a> -> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Bool.html#t:Bool">Bool</a>)<a href="src/Graphics-UI-Gtk-Printing-PrintOperation.html#printOptPreview" class="link">Source</a></p><div class="doc"><p>Gets emitted when a preview is requested from the native dialog. </p><p>The default handler for this signal uses an external viewer application to preview. </p><p>To implement a custom print preview, an application must return <code>True</code> from its handler for this signal. In order to use the provided <code>context</code> for the preview implementation, it must be given a suitable cairo context with <code>printContextSetCairoContext</code>. </p><p>The custom preview implementation can use <code><a href="Graphics-UI-Gtk-Printing-PrintOperation.html#v:printOperationPreviewIsSelected">printOperationPreviewIsSelected</a></code> and <code><a href="Graphics-UI-Gtk-Printing-PrintOperation.html#v:printOperationPreviewRenderPage">printOperationPreviewRenderPage</a></code> to find pages which are selected for print and render them. The preview must be finished by calling <code><a href="Graphics-UI-Gtk-Printing-PrintOperation.html#v:printOperationPreviewEndPreview">printOperationPreviewEndPreview</a></code> (typically in response to the user clicking a close button). </p></div></div><div class="top"><p class="src"><a name="v:printOptReady" class="def">printOptReady</a> :: <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationPreviewClass">PrintOperationPreviewClass</a> self => <a href="/usr/share/doc/ghc/html/libraries/glib-0.12.0/System-Glib-Signals.html#t:Signal">Signal</a> self (<a href="Graphics-UI-Gtk-Printing-PrintContext.html#t:PrintContext">PrintContext</a> -> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a>)<a href="src/Graphics-UI-Gtk-Printing-PrintOperation.html#printOptReady" class="link">Source</a></p><div class="doc"><p>The <code>ready</code> signal gets emitted once per preview operation, before the first page is rendered. </p><p>A handler for this signal can be used for setup tasks. </p></div></div><div class="top"><p class="src"><a name="v:printOptGotPageSize" class="def">printOptGotPageSize</a> :: <a href="Graphics-UI-Gtk-Printing-PrintOperation.html#t:PrintOperationPreviewClass">PrintOperationPreviewClass</a> self => <a href="/usr/share/doc/ghc/html/libraries/glib-0.12.0/System-Glib-Signals.html#t:Signal">Signal</a> self (<a href="Graphics-UI-Gtk-Printing-PrintContext.html#t:PrintContext">PrintContext</a> -> <a href="Graphics-UI-Gtk-Printing-PageSetup.html#t:PageSetup">PageSetup</a> -> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a>)<a href="src/Graphics-UI-Gtk-Printing-PrintOperation.html#printOptGotPageSize" class="link">Source</a></p><div class="doc"><p>The <code>gotPageSize</code> signal is emitted once for each page that gets rendered to the preview. </p><p>A handler for this signal should update the context according to <code>pageSetup</code> and set up a suitable cairo context, using <code>printContextSetCairoContext</code>. </p></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.9.2</p></div></body></html>