From a12a583c99982a4072cb3ac8ae969a9ebd5cbd69 Mon Sep 17 00:00:00 2001 From: Marek Kasik Date: Mon, 8 Jun 2009 15:37:32 +0200 Subject: Add ability to print selection Add a new radio button "Selection" to the print dialog. Its presence depends on calling of functions gtk_print_operation_set_support_selection() and gtk_print_dialog_unix_set_support_selection(). Sensitivity of the radio depends on calling of functions gtk_print_operation_set_has_selection() and gtk_print_dialog_unix_set_has_selection(). There are new properties GtkPrintUnixDialog::support-selection, GtkPrintUnixDialog::has-selection, GtkPrintOperation::support-selection and GtkPrintOperation::has-selection. Corresponding getters are gtk_print_dialog_unix_get_support_selection(), gtk_print_dialog_unix_get_has_selection(), gtk_print_operation_get_support_selection() and gtk_print_operation_get_has_selection(). Application has to set number of pages to which the selection will be formated in GtkPrintOperation::begin-print's callback by the gtk_print_operation_set_n_pages() function (bug #344519). There is also new property GtkPrintUnixDialog::manual-capabilities controled by gtk_print_unix_dialog_set_manual_capabilities() and gtk_print_unix_dialog_get_manual_capabilities(). --- gtk/gtkprintoperation.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'gtk/gtkprintoperation.h') diff --git a/gtk/gtkprintoperation.h b/gtk/gtkprintoperation.h index af46332fcf..aee3d95ec6 100644 --- a/gtk/gtkprintoperation.h +++ b/gtk/gtkprintoperation.h @@ -178,6 +178,12 @@ gboolean gtk_print_operation_is_finished (GtkPrintOper void gtk_print_operation_cancel (GtkPrintOperation *op); void gtk_print_operation_draw_page_finish (GtkPrintOperation *op); void gtk_print_operation_set_defer_drawing (GtkPrintOperation *op); +void gtk_print_operation_set_support_selection (GtkPrintOperation *op, + gboolean support_selection); +gboolean gtk_print_operation_get_support_selection (GtkPrintOperation *op); +void gtk_print_operation_set_has_selection (GtkPrintOperation *op, + gboolean has_selection); +gboolean gtk_print_operation_get_has_selection (GtkPrintOperation *op); GtkPageSetup *gtk_print_run_page_setup_dialog (GtkWindow *parent, GtkPageSetup *page_setup, -- cgit v1.2.1