gtk.print_unix_dialog

Module for [PrintUnixDialog] class

Types 3

gtk.print_unix_dialog.PrintUnixDialog implements a print dialog for platforms which don’t provide a native print dialog, like Unix.

!An example GtkPrintUnixDialog

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 gtk.print_operation.PrintOperation.

In order to print something with gtk.print_unix_dialog.PrintUnixDialog, you need to use gtk.print_unix_dialog.PrintUnixDialog.getSelectedPrinter to obtain a gtk.printer.Printer object and use it to construct a gtk.print_job.PrintJob using gtk.print_job.PrintJob.new_.

gtk.print_unix_dialog.PrintUnixDialog uses the following response values:

GtkPrintUnixDialog as GtkBuildable

The gtk.print_unix_dialog.PrintUnixDialog implementation of the gtk.buildable.Buildable interface exposes its @notebook internal children with the name “notebook”.

An example of a gtk.print_unix_dialog.PrintUnixDialog 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>

CSS nodes

gtk.print_unix_dialog.PrintUnixDialog has a single CSS node with name window. The style classes dialog and print are added.

Methods
GType _getGType() static nothrow
GType _gType() @property nothrow
PrintUnixDialog self() nothrowReturns `this`, for use in `with` statements.
PrintUnixDialogGidBuilder builder() static nothrowGet builder for [gtk.print_unix_dialog.PrintUnixDialog] Returns: New builder object
int currentPage() @property nothrowGet `currentPage` property. Returns: The current page in the document.
void currentPage(int propval) @property nothrowSet `currentPage` property. Params: propval = The current page in the document.
bool embedPageSetup() @property nothrowGet `embedPageSetup` property. Returns: true if the page setup controls are embedded.
void embedPageSetup(bool propval) @property nothrowSet `embedPageSetup` property. Params: propval = true if the page setup controls are embedded.
bool hasSelection() @property nothrowGet `hasSelection` property. Returns: Whether the application has a selection.
void hasSelection(bool propval) @property nothrowSet `hasSelection` property. Params: propval = Whether the application has a selection.
gtk.types.PrintCapabilities manualCapabilities() @property nothrowGet `manualCapabilities` property. Returns: Capabilities the application can handle.
void manualCapabilities(gtk.types.PrintCapabilities propval) @property nothrowSet `manualCapabilities` property. Params: propval = Capabilities the application can handle.
gtk.page_setup.PageSetup pageSetup() @property nothrowGet `pageSetup` property. Returns: The [gtk.page_setup.PageSetup] object to use.
void pageSetup(gtk.page_setup.PageSetup propval) @property nothrowSet `pageSetup` property. Params: propval = The [gtk.page_setup.PageSetup] object to use.
gtk.print_settings.PrintSettings printSettings() @property nothrowGet `printSettings` property. Returns: The [gtk.print_settings.PrintSettings] object used for this dialog.
void printSettings(gtk.print_settings.PrintSettings propval) @property nothrowSet `printSettings` property. Params: propval = The [gtk.print_settings.PrintSettings] object used for this dialog.
gtk.printer.Printer selectedPrinter() @property nothrowGet `selectedPrinter` property. Returns: The [gtk.printer.Printer] which is selected.
bool supportSelection() @property nothrowGet `supportSelection` property. Returns: Whether the dialog supports selection.
void supportSelection(bool propval) @property nothrowSet `supportSelection` property. Params: propval = Whether the dialog supports selection.
void addCustomTab(gtk.widget.Widget child, gtk.widget.Widget tabLabel) nothrowAdds a custom tab to the print dialog.
int getCurrentPage() nothrowGets the current page of the [gtk.print_unix_dialog.PrintUnixDialog]. Returns: the current page of dialog
bool getEmbedPageSetup() nothrowGets whether to embed the page setup. Returns: whether to embed the page setup
bool getHasSelection() nothrowGets whether there is a selection. Returns: whether there is a selection
gtk.types.PrintCapabilities getManualCapabilities() nothrowGets the capabilities that have been set on this [gtk.print_unix_dialog.PrintUnixDialog]. Returns: the printing capabilities
gtk.page_setup.PageSetup getPageSetup() nothrowGets the page setup that is used by the [gtk.print_unix_dialog.PrintUnixDialog]. Returns: the page setup of dialog.
bool getPageSetupSet() nothrowGets whether a page setup was set by the user. Returns: whether a page setup was set by user.
gtk.printer.Printer getSelectedPrinter() nothrowGets the currently selected printer. Returns: the currently selected printer
gtk.print_settings.PrintSettings getSettings() nothrowGets a new [gtk.print_settings.PrintSettings] object that represents the current values in the print dialog.
bool getSupportSelection() nothrowGets whether the print dialog allows user to print a selection. Returns: whether the application supports print of selection
void setCurrentPage(int currentPage) nothrowSets the current page number.
void setEmbedPageSetup(bool embed) nothrowEmbed page size combo box and orientation combo box into page setup page.
void setHasSelection(bool hasSelection) nothrowSets whether a selection exists.
void setManualCapabilities(gtk.types.PrintCapabilities capabilities) nothrowThis lets you specify the printing capabilities your application supports.
void setPageSetup(gtk.page_setup.PageSetup pageSetup) nothrowSets the page setup of the [gtk.print_unix_dialog.PrintUnixDialog].
void setSettings(gtk.print_settings.PrintSettings settings = null) nothrowSets the [gtk.print_settings.PrintSettings] for the [gtk.print_unix_dialog.PrintUnixDialog].
void setSupportSelection(bool supportSelection) nothrowSets whether the print dialog allows user to print a selection.
Constructors
this(void * ptr, Flag!"Take" take)
this(string title = null, gtk.window.Window parent = null)Creates a new [gtk.print_unix_dialog.PrintUnixDialog].

Fluent builder implementation template for gtk.print_unix_dialog.PrintUnixDialog

Methods
T currentPage(int propval) nothrowSet `currentPage` property. Params: propval = The current page in the document. Returns: Builder instance for fluent chaining
T embedPageSetup(bool propval) nothrowSet `embedPageSetup` property. Params: propval = true if the page setup controls are embedded. Returns: Builder instance for fluent chaining
T hasSelection(bool propval) nothrowSet `hasSelection` property. Params: propval = Whether the application has a selection. Returns: Builder instance for fluent chaining
T manualCapabilities(gtk.types.PrintCapabilities propval) nothrowSet `manualCapabilities` property. Params: propval = Capabilities the application can handle. Returns: Builder instance for fluent chaining
T pageSetup(gtk.page_setup.PageSetup propval) nothrowSet `pageSetup` property. Params: propval = The [gtk.page_setup.PageSetup] object to use. Returns: Builder instance for fluent chaining
T printSettings(gtk.print_settings.PrintSettings propval) nothrowSet `printSettings` property. Params: propval = The [gtk.print_settings.PrintSettings] object used for this dialog. Returns: Builder instance for fluent chaining
T supportSelection(bool propval) nothrowSet `supportSelection` property. Params: propval = Whether the dialog supports selection. Returns: Builder instance for fluent chaining
Methods
PrintUnixDialog build() nothrowCreate object from builder. Returns: New object