:right-sidebar: True PrintUnixDialog =================================================================== .. currentmodule:: gi.repository.Gtk .. class:: PrintUnixDialog(*args, **kwargs) :no-contents-entry: Superclasses: :class:`~gi.repository.Gtk.Dialog`, :class:`~gi.repository.Gtk.Window`, :class:`~gi.repository.Gtk.Widget`, :class:`~gi.repository.GObject.InitiallyUnowned`, :class:`~gi.repository.GObject.Object` Implemented Interfaces: :class:`~gi.repository.Gtk.Accessible`, :class:`~gi.repository.Gtk.Buildable`, :class:`~gi.repository.Gtk.ConstraintTarget`, :class:`~gi.repository.Gtk.Native`, :class:`~gi.repository.Gtk.Root`, :class:`~gi.repository.Gtk.ShortcutManager` :Constructors: :: PrintUnixDialog(**properties) new(title:str=None, parent:Gtk.Window=None) -> Gtk.Widget Constructors ------------ .. rst-class:: interim-class .. class:: PrintUnixDialog :no-index: .. classmethod:: new(title: str | None = None, parent: ~gi.repository.Gtk.Window | None = None) -> ~gi.repository.Gtk.Widget Creates a new ``GtkPrintUnixDialog``. :param title: Title of the dialog :param parent: Transient parent of the dialog Methods ------- .. rst-class:: interim-class .. class:: PrintUnixDialog :no-index: .. method:: add_custom_tab(child: ~gi.repository.Gtk.Widget, tab_label: ~gi.repository.Gtk.Widget) -> None Adds a custom tab to the print dialog. :param child: the widget to put in the custom tab :param tab_label: the widget to use as tab label .. method:: get_current_page() -> int Gets the current page of the ``GtkPrintUnixDialog``. .. method:: get_embed_page_setup() -> bool Gets whether to embed the page setup. .. method:: get_has_selection() -> bool Gets whether there is a selection. .. method:: get_manual_capabilities() -> ~gi.repository.Gtk.PrintCapabilities Gets the capabilities that have been set on this ``GtkPrintUnixDialog``. .. method:: get_page_setup() -> ~gi.repository.Gtk.PageSetup Gets the page setup that is used by the ``GtkPrintUnixDialog``. .. method:: get_page_setup_set() -> bool Gets whether a page setup was set by the user. .. method:: get_selected_printer() -> ~gi.repository.Gtk.Printer | None Gets the currently selected printer. .. method:: get_settings() -> ~gi.repository.Gtk.PrintSettings 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. .. method:: get_support_selection() -> bool Gets whether the print dialog allows user to print a selection. .. method:: set_current_page(current_page: int) -> None Sets the current page number. If ``current_page`` is not -1, this enables the current page choice for the range of pages to print. :param current_page: the current page number. .. method:: set_embed_page_setup(embed: bool) -> None Embed page size combo box and orientation combo box into page setup page. :param embed: embed page setup selection .. method:: set_has_selection(has_selection: bool) -> None Sets whether a selection exists. :param has_selection: :const:`True` indicates that a selection exists .. method:: set_manual_capabilities(capabilities: ~gi.repository.Gtk.PrintCapabilities) -> None This lets you specify the printing capabilities your application supports. For instance, if you can handle scaling the output then you pass :const:`~gi.repository.Gtk.PrintCapabilities.SCALE`. If you don’t pass that, then the dialog will only let you select the scale if the printing system automatically handles scaling. :param capabilities: the printing capabilities of your application .. method:: set_page_setup(page_setup: ~gi.repository.Gtk.PageSetup) -> None Sets the page setup of the ``GtkPrintUnixDialog``. :param page_setup: a ``GtkPageSetup`` .. method:: set_settings(settings: ~gi.repository.Gtk.PrintSettings | None = None) -> None 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. :param settings: a ``GtkPrintSettings`` .. method:: set_support_selection(support_selection: bool) -> None Sets whether the print dialog allows user to print a selection. :param support_selection: :const:`True` to allow print selection Properties ---------- .. rst-class:: interim-class .. class:: PrintUnixDialog :no-index: .. attribute:: props.current_page :type: int The current page in the document. .. attribute:: props.embed_page_setup :type: bool :const:`True` if the page setup controls are embedded. .. attribute:: props.has_selection :type: bool Whether the application has a selection. .. attribute:: props.manual_capabilities :type: ~gi.repository.Gtk.PrintCapabilities Capabilities the application can handle. .. attribute:: props.page_setup :type: ~gi.repository.Gtk.PageSetup The ``GtkPageSetup`` object to use. .. attribute:: props.print_settings :type: ~gi.repository.Gtk.PrintSettings The ``GtkPrintSettings`` object used for this dialog. .. attribute:: props.selected_printer :type: ~gi.repository.Gtk.Printer The ``GtkPrinter`` which is selected. .. attribute:: props.support_selection :type: bool Whether the dialog supports selection.