Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: PrintUnixDialogMeta

[468:14] static extends: object

Generated metadata helpers for PrintUnixDialog class surfaces.

Methods

  • properties ()

    Returns property metadata for PrintUnixDialog.

    • @r A list.

class: PrintUnixDialog

[38:7] extends: object

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 [class@Gtk.PrintOperation]. In order to print something with GtkPrintUnixDialog, you need to use [method@Gtk.PrintUnixDialog.get_selected_printer] to obtain a [class@Gtk.Printer] object and use it to construct a [class@Gtk.PrintJob] using [ctor@Gtk.PrintJob.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 # GtkPrintUnixDialog as GtkBuildable The GtkPrintUnixDialog implementation of the GtkBuildable interface exposes its @notebook internal children with the name “notebook”. An example of a GtkPrintUnixDialog UI definition fragment: xml <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 GtkPrintUnixDialog has a single CSS node with name window. The style classes dialog and print are added.

Members

  • handleObj
  • lib
  • retainedCallbacks
  • signalHandlerNames
  • signalSetterHandlers

Methods

  • PrintUnixDialog (title = null, parent = null)

    Creates a new GtkPrintUnixDialog.

    • @p title is Title of the dialog.
    • @p parent is Transient parent of the dialog.
  • toNativeHandle (Source)

    Normalizes a constructor argument into a raw pointer carrier. Accepts a raw NativeHandle, a raw NativeBuffer returned from fn.call(...), another generated wrapper exposing handle(), or null. Returns null when the argument carries no pointer.

    • @p Source is the raw handle, raw buffer, wrapper, or null.
    • @r A raw pointer carrier or null when no pointer is present.
  • getLib ()

    Returns the opened native library for this generated wrapper.

    • @r The opened native library.
  • handle ()

    Returns the wrapped NativeHandle.

    • @r The wrapped NativeHandle.
  • isNull ()

    Returns true when the wrapped handle is null.

    • @r A bool.
  • describe ()

    Returns a small string for debugging generated wrappers.

    • @r A string.
  • asDialog ()

    Wraps this handle as Dialog.

    • @r A Dialog object.
  • asAccessible ()

    Wraps this handle as Accessible.

    • @r A Accessible object.
  • asBuildable ()

    Wraps this handle as Buildable.

    • @r A Buildable object.
  • asConstraintTarget ()

    Wraps this handle as ConstraintTarget.

    • @r A ConstraintTarget object.
  • asNative ()

    Wraps this handle as Native.

    • @r A Native object.
  • asRoot ()

    Wraps this handle as Root.

    • @r A Root object.
  • asShortcutManager ()

    Wraps this handle as ShortcutManager.

    • @r A ShortcutManager object.
  • getProperty (string Name)

    Reads one generated property by name.

  • setProperty (string Name, Value)

    Writes one generated property by name.

  • setCurrentpage (int Value)

    The current page in the document.

    • @p Value is the new property value.
    • @r None.
  • setEmbedpagesetup (bool Value)

    %TRUE if the page setup controls are embedded.

    • @p Value is the new property value.
    • @r None.
  • setHasselection (bool Value)

    Whether the application has a selection.

    • @p Value is the new property value.
    • @r None.
  • setManualcapabilities (string Value)

    Capabilities the application can handle.

    • @p Value is the new property value.
    • @r None.
  • setPagesetup (object Value)

    The GtkPageSetup object to use.

    • @p Value is the new property value.
    • @r None.
  • setPrintsettings (object Value)

    The GtkPrintSettings object used for this dialog.

    • @p Value is the new property value.
    • @r None.
  • setSupportselection (bool Value)

    Whether the dialog supports selection.

    • @p Value is the new property value.
    • @r None.
  • add_custom_tab (object child, object tab_label)

    Adds a custom tab to the print dialog.

    • @p child is the widget to put in the custom tab.
    • @p tab_label is the widget to use as tab label.
    • @r None.
  • get_current_page ()

    Gets the current page of the GtkPrintUnixDialog.

  • get_embed_page_setup ()

    Gets whether to embed the page setup.

  • get_has_selection ()

    Gets whether there is a selection.

  • get_manual_capabilities ()

    Gets the capabilities that have been set on this GtkPrintUnixDialog.

  • get_page_setup ()

    Gets the page setup that is used by the GtkPrintUnixDialog.

  • get_page_setup_set ()

    Gets whether a page setup was set by the user.

  • get_selected_printer ()

    Gets the currently selected printer.

  • get_settings ()

    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.

  • get_support_selection ()

    Gets whether the print dialog allows user to print a selection.

  • set_current_page (int current_page)

    Sets the current page number. If @current_page is not -1, this enables the current page choice for the range of pages to print.

    • @p current_page is the current page number..
    • @r None.
  • set_embed_page_setup (bool embed)

    Embed page size combo box and orientation combo box into page setup page.

    • @p embed is embed page setup selection.
    • @r None.
  • set_has_selection (bool has_selection)

    Sets whether a selection exists.

    • @p has_selection is %TRUE indicates that a selection exists.
    • @r None.
  • set_manual_capabilities (string capabilities)

    This lets you specify the printing capabilities your application supports. For instance, if you can handle scaling the output then you pass %GTK_PRINT_CAPABILITY_SCALE. If you don’t pass that, then the dialog will only let you select the scale if the printing system automatically handles scaling.

    • @p capabilities is the printing capabilities of your application.
    • @r None.
  • set_page_setup (object page_setup)

    Sets the page setup of the GtkPrintUnixDialog.

    • @p page_setup is a GtkPageSetup.
    • @r None.
  • set_settings (object settings)

    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.

    • @p settings is a GtkPrintSettings.
    • @r None.
  • set_support_selection (bool support_selection)

    Sets whether the print dialog allows user to print a selection.

    • @p support_selection is %TRUE to allow print selection.
    • @r None.