| GTK+ Reference Manual | ||||
|---|---|---|---|---|
#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);
GObject
+----GInitiallyUnowned
+----GtkObject
+----GtkWidget
+----GtkContainer
+----GtkBin
+----GtkWindow
+----GtkDialog
+----GtkPrintUnixDialog
"current-page" gint : Read / Write "page-setup" GtkPageSetup : Read / Write "print-settings" GtkPrintSettings : Read / Write "selected-printer" GtkPrinter : Read
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.
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
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
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
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
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
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
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
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
current-page" property"current-page" gint : Read / Write
The current page in the document.
Allowed values: >= -1
Default value: -1
print-settings" property"print-settings" GtkPrintSettings : Read / Write
The GtkPrintSettings used for initializing the dialog.
selected-printer" property"selected-printer" GtkPrinter : Read
The GtkPrinter which which is selected.