The
gtk:print-unix-dialog widget implements a print dialog for
platforms which do not 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.
Figure: GtkPrintUnixDialog
In order to print something with the
gtk:print-unix-dialog widget, you need to use the
gtk:print-unix-dialog-selected-printer function to obtain a
gtk:printer object and use it to construct a
gtk:print-job object using the
gtk:print-job-new function.
The
gtk:print-unix-dialog widget uses the following response values:
- :ok
- For the "Print" button.
- :apply
- For the "Preview" button.
- :cancel
- For the "Cancel" button.
GtkPrintUnixDialog as GtkBuildable
The
gtk:print-unix-dialog implementation of the
gtk:buildable
interface exposes its notebook internal children with the name "notebook".
Example: A
gtk:print-unix-dialog UI definition fragment.
<object class="GtkPrintUnixDialog" id="dialog1">
<child internal-child="notebook">
<object class="GtkNotebook" id="notebook">
<child>
<object class="GtkLabel" id="tabcontent">
<property name="label">Content on notebook tab</property>
</object>
</child>
<child type="tab">
<object class="GtkLabel" id="tablabel">
<property name="label">Tab label</property>
</object>
<packing>
<property name="tab_expand">False</property>
<property name="tab_fill">False</property>
</packing>
</child>
</object>
</child>
</object>