Description Usage Arguments Details Value Author(s)
Runs the print operation, by first letting the user modify print settings in the print dialog, and then print the document.
1 | gtkPrintOperationRun(object, action, parent = NULL, .errwarn = TRUE)
|
|
a |
|
the action to start |
|
Transient parent of the dialog. [ allow-none ] |
.errwarn |
Whether to issue a warning on error or fail silently |
Normally that this function does not return until the rendering of all
pages is complete. You can connect to the
"status-changed"
signal on op
to obtain some
information about the progress of the print operation.
Furthermore, it may use a recursive mainloop to show the print dialog.
If you call gtkPrintOperationSetAllowAsync
or set the
"allow-async"
property the operation will run
asynchronously if this is supported on the platform. The
"done"
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).
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | if (!is.null(settings))
op$setPrintSettings(settings)
if (!is.null(page_setup))
op$setDefaultPageSetup(page_setup)
gSignalConnect(op, "begin-print", begin_print)
gSignalConnect(op, "draw-page", draw_page)
res <- op$run("print-dialog", parent)
if (res[[1]] == "error") {
error_dialog = gtkMessageDialog(parent, "destroy-with-parent", "error",
"close", "Error printing file: ", res$error$message)
gSignalConnect(error_dialog, "response", gtkWidgetDestroy)
error_dialog$show()
} else if (res[[1]] == "apply")
settings = op$getPrintSettings()
|
Note that gtkPrintOperationRun
can only be called once on a
given GtkPrintOperation
.
Since 2.10
A list containing the following elements:
retval |
[ |
|
Return location for errors, or |
Derived by RGtkGen from GTK+ documentation
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.