GtkPrintUnixDialog

GtkPrintUnixDialog — A print dialog

Synopsis


#include <gtk/gtkprintunixdialog.h>


            GtkPrintUnixDialog;
GtkWidget*  gtk_print_unix_dialog_new       (const gchar *title,
                                             GtkWindow *parent);
void        gtk_print_unix_dialog_set_page_setup
                                            (GtkPrintUnixDialog *dialog,
                                             GtkPageSetup *page_setup);
GtkPageSetup* gtk_print_unix_dialog_get_page_setup
                                            (GtkPrintUnixDialog *dialog);
void        gtk_print_unix_dialog_set_current_page
                                            (GtkPrintUnixDialog *dialog,
                                             gint current_page);
gint        gtk_print_unix_dialog_get_current_page
                                            (GtkPrintUnixDialog *dialog);
void        gtk_print_unix_dialog_set_settings
                                            (GtkPrintUnixDialog *dialog,
                                             GtkPrintSettings *settings);
GtkPrintSettings* gtk_print_unix_dialog_get_settings
                                            (GtkPrintUnixDialog *dialog);
GtkPrinter* gtk_print_unix_dialog_get_selected_printer
                                            (GtkPrintUnixDialog *dialog);


Object Hierarchy


  GObject
   +----GInitiallyUnowned
         +----GtkObject
               +----GtkWidget
                     +----GtkContainer
                           +----GtkBin
                                 +----GtkWindow
                                       +----GtkDialog
                                             +----GtkPrintUnixDialog

Implemented Interfaces

GtkPrintUnixDialog implements AtkImplementorIface.

Properties


  "current-page"         gint                  : Read / Write
  "page-setup"           GtkPageSetup          : Read / Write
  "print-settings"       GtkPrintSettings      : Read / Write
  "selected-printer"     GtkPrinter            : Read

Description

GtkPrintUnixDialog implements a print dialog for platforms which don't 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

In order to print something with GtkPrintUnixDialog, you need to use gtk_print_unix_dialog_get_selected_printer() to obtain a GtkPrinter object and use it to construct a GtkPrintJob using gtk_print_job_new().

Printing support was added in GTK+ 2.10.

Details

GtkPrintUnixDialog

typedef struct _GtkPrintUnixDialog GtkPrintUnixDialog;


gtk_print_unix_dialog_new ()

GtkWidget*  gtk_print_unix_dialog_new       (const gchar *title,
                                             GtkWindow *parent);

Creates a new GtkPrintUnixDialog.

title : Title of the dialog, or NULL
parent : Transient parent of the dialog, or NULL
Returns : a new GtkPrintUnixDialog

Since 2.10


gtk_print_unix_dialog_set_page_setup ()

void        gtk_print_unix_dialog_set_page_setup
                                            (GtkPrintUnixDialog *dialog,
                                             GtkPageSetup *page_setup);

Sets the page setup of the GtkPrintUnixDialog.

dialog : a GtkPrintUnixDialog
page_setup : a GtkPageSetup

Since 2.10


gtk_print_unix_dialog_get_page_setup ()

GtkPageSetup* gtk_print_unix_dialog_get_page_setup
                                            (GtkPrintUnixDialog *dialog);

Gets the page setup that is used by the GtkPrintUnixDialog.

dialog : a GtkPrintUnixDialog
Returns : the page setup of dialog.

Since 2.10


gtk_print_unix_dialog_set_current_page ()

void        gtk_print_unix_dialog_set_current_page
                                            (GtkPrintUnixDialog *dialog,
                                             gint 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.

dialog : a GtkPrintUnixDialog
current_page : the current page number.

Since 2.10


gtk_print_unix_dialog_get_current_page ()

gint        gtk_print_unix_dialog_get_current_page
                                            (GtkPrintUnixDialog *dialog);

Gets the current page of the GtkPrintDialog.

dialog : a GtkPrintUnixDialog
Returns : the current page of dialog

Since 2.10


gtk_print_unix_dialog_set_settings ()

void        gtk_print_unix_dialog_set_settings
                                            (GtkPrintUnixDialog *dialog,
                                             GtkPrintSettings *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.

dialog : a GtkPrintUnixDialog
settings : a GtkPrintSettings, or NULL

Since 2.10


gtk_print_unix_dialog_get_settings ()

GtkPrintSettings* gtk_print_unix_dialog_get_settings
                                            (GtkPrintUnixDialog *dialog);

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.

dialog : a GtkPrintUnixDialog
Returns : a new GtkPrintSettings object with the values from dialog

Since 2.10


gtk_print_unix_dialog_get_selected_printer ()

GtkPrinter* gtk_print_unix_dialog_get_selected_printer
                                            (GtkPrintUnixDialog *dialog);

Gets the currently selected printer.

dialog : a GtkPrintUnixDialog
Returns : the currently selected printer

Since 2.10

Property Details

The "current-page" property

  "current-page"         gint                  : Read / Write

The current page in the document.

Allowed values: >= -1

Default value: -1


The "page-setup" property

  "page-setup"           GtkPageSetup          : Read / Write

The GtkPageSetup to use.


The "print-settings" property

  "print-settings"       GtkPrintSettings      : Read / Write

The GtkPrintSettings used for initializing the dialog.


The "selected-printer" property

  "selected-printer"     GtkPrinter            : Read

The GtkPrinter which which is selected.

See Also

GtkPageSetupUnixDialog, GtkPrinter, GtkPrintJob