It derives from <GtkDialog>.
A print dialog for platforms which don’t provide a native print dialog, like Unix.
It can be used very much like any other GTK dialog, at the cost of the
portability offered by the high-level printing API with
<GtkPrintOperation>.
In order to print something with
<GtkPrintUnixDialog>, you need to use
print-unix-dialog:get-selected-printer to obtain
a <GtkPrinter> object and use it to construct a
<GtkPrintJob> using print-job:new.
<GtkPrintUnixDialog> uses the following
response values:
GTK_RESPONSE_OK: for the “Print” button
GTK_RESPONSE_APPLY: for the “Preview” button
GTK_RESPONSE_CANCEL: for the “Cancel” button
The <GtkPrintUnixDialog> implementation of
the <GtkBuildable> interface exposes its
notebook internal children with the name “notebook”.
An example of a <GtkPrintUnixDialog> UI
definition fragment:
<object class="GtkPrintUnixDialog" id="dialog1">
<child internal-child="notebook">
<object class="GtkNotebook" id="notebook">
<child>
<object type="GtkNotebookPage">
<property name="tab_expand">False</property>
<property name="tab_fill">False</property>
<property name="tab">
<object class="GtkLabel" id="tablabel">
<property name="label">Tab label</property>
</object>
</property>
<property name="child">
<object class="GtkLabel" id="tabcontent">
<property name="label">Content on notebook tab</property>
</object>
</property>
</object>
</child>
</object>
</child>
</object>
<GtkPrintUnixDialog> has a single CSS node
with name window. The style classes dialog and print are added.
The current page in the document.
Its value is a 32-bit integer.
Set it with (set! (print-unix-dialog:current-page self) value).
#t if the page setup controls are embedded.
Its value is a boolean.
Set it with (set! (print-unix-dialog:embed-page-setup self)
value).
Whether the application has a selection.
Its value is a boolean.
Set it with (set! (print-unix-dialog:has-selection self) value).
Capabilities the application can handle.
Its value is a <GtkPrintCapabilities>
(or, to set it, a list of its symbols, or one of them).
Set it with (set! (print-unix-dialog:manual-capabilities self)
value).
The <GtkPageSetup> object to use.
Its value is a <GtkPageSetup>, or #f.
Set it with (set! (print-unix-dialog:page-setup self) value).
The <GtkPrintSettings> object used for this
dialog.
Its value is a <GtkPrintSettings>, or
#f.
Set it with (set! (print-unix-dialog:print-settings self) value).
The <GtkPrinter> which is selected.
Its value is a <GtkPrinter>, or #f.
It is read only.
Whether the dialog supports selection.
Its value is a boolean.
Set it with (set! (print-unix-dialog:support-selection self)
value).
Adds a custom tab to the print dialog.
Passed: a <GtkPrintUnixDialog>.
Passed: a <GtkWidget>.
the widget to put in the custom tab
Passed: a <GtkWidget>.
the widget to use as tab label
Gets the current page of the
<GtkPrintUnixDialog>.
Passed: a <GtkPrintUnixDialog>.
Returned: a 32-bit integer.
the current page of self
Gets whether to embed the page setup.
Passed: a <GtkPrintUnixDialog>.
Returned: a boolean.
whether to embed the page setup
Gets whether there is a selection.
Passed: a <GtkPrintUnixDialog>.
Returned: a boolean.
whether there is a selection
Gets the capabilities that have been set on this
<GtkPrintUnixDialog>.
Passed: a <GtkPrintUnixDialog>.
Returned: a <GtkPrintCapabilities>.
the printing capabilities
Gets the page setup that is used by the
<GtkPrintUnixDialog>.
Passed: a <GtkPrintUnixDialog>.
Returned: a <GtkPageSetup>.
the page setup of self.
Gets whether a page setup was set by the user.
Passed: a <GtkPrintUnixDialog>.
Returned: a boolean.
whether a page setup was set by user.
Gets the currently selected printer.
Passed: a <GtkPrintUnixDialog>.
Returned: a <GtkPrinter>, or #f.
the currently selected printer
Gets a new <GtkPrintSettings> object that
represents the current values in the print dialog.
Note that this creates a new object, and you need to unref it if don’t want to keep it.
Passed: a <GtkPrintUnixDialog>.
Returned: a <GtkPrintSettings>.
a new <GtkPrintSettings> object with the
values from self
Gets whether the print dialog allows user to print a selection.
Passed: a <GtkPrintUnixDialog>.
Returned: a boolean.
whether the application supports print of selection
Creates a new <GtkPrintUnixDialog>.
Passed, or left out: a string, or #f.
Title of the dialog
Passed, or left out: a <GtkWindow>, or #f.
Transient parent of the dialog
Returned: a <GtkWidget>.
a new <GtkPrintUnixDialog>
Sets the current page number.
If current-page is not -1, this enables the current page choice for the range of pages to print.
Passed: a <GtkPrintUnixDialog>.
Passed: a 32-bit integer.
the current page number.
Embed page size combo box and orientation combo box into page setup page.
Passed: a <GtkPrintUnixDialog>.
Passed: a boolean.
embed page setup selection
Sets whether a selection exists.
Passed: a <GtkPrintUnixDialog>.
Passed: a boolean.
#t indicates that a selection exists
This lets you specify the printing capabilities your application supports.
For instance, if you can handle scaling the output then you pass
scale. If you don’t pass that, then the
dialog will only let you select the scale if the printing system
automatically handles scaling.
Passed: a <GtkPrintUnixDialog>.
Passed: a <GtkPrintCapabilities>, or a
list of its symbols, or one of them.
the printing capabilities of your application
Sets the page setup of the
<GtkPrintUnixDialog>.
Passed: a <GtkPrintUnixDialog>.
Passed: a <GtkPageSetup>.
Sets the <GtkPrintSettings> for the
<GtkPrintUnixDialog>.
Typically, this is used to restore saved print settings from a previous print operation before the print dialog is shown.
Passed: a <GtkPrintUnixDialog>.
Passed, or left out: a <GtkPrintSettings>,
or #f.
Sets whether the print dialog allows user to print a selection.
Passed: a <GtkPrintUnixDialog>.
Passed: a boolean.
#t to allow print selection