Package: gtk

Class gtk:print-unix-dialog

Superclasses

Documented Subclasses

None

Direct Slots

current-page
The current-page property of type :int (Read / Write)
The current page in the document.
Allowed values: >= -1
Default value: -1
embed-page-setup
The embed-page-setup property of type :boolean (Read / Write)
True if page setup combos are embedded in the print dialog.
Default value: false
has-selection
The has-selection property of type :boolean (Read / Write)
Whether the application has a selection.
Default value: false
manual-capabilities
The manual-capabilities property of type gtk:print-capabilities (Read / Write)
Capabilities the application can handle.
page-setup
The page-setup property of type gtk:page-setup (Read / Write)
The page setup to use.
print-settings
The print-settings property of type gtk:print-settings (Read / Write)
The print settings used for initializing the dialog.
selected-printer
The selected-printer property of type gtk:printer (Read)
The printer which is selected.
support-selection
The support-selection property of type :boolean (Read / Write)
Whether the dialog supports selection.
Default value: false

Details

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>    
 

Returned by

Slot Access Functions

Inherited Slot Access Functions

See also

2024-2-18