1Gtk2::PrintOperation(3)User Contributed Perl DocumentatioGntk2::PrintOperation(3)
2
3
4

NAME

6       Gtk2::PrintOperation - wrapper for GtkPrintOperation
7

HIERARCHY

9         Glib::Object
10         +----Gtk2::PrintOperation
11

INTERFACES

13         Gtk2::PrintOperationPreview
14

METHODS

16   printoperation = Gtk2::PrintOperation->new
17   $op->set_allow_async ($allow_async)
18       ·   $allow_async (boolean)
19
20   $op->cancel
21   $op->set_current_page ($current_page)
22       ·   $current_page (integer)
23
24   $op->set_custom_tab_label ($label)
25       ·   $label (string)
26
27   pagesetup or undef = $op->get_default_page_setup
28   $op->set_default_page_setup ($default_page_setup)
29       ·   $default_page_setup (Gtk2::PageSetup or undef)
30
31   $op->set_defer_drawing ()
32       The method set_defer_drawing() can only be called from the callback
33       'draw-page'.
34
35       Since: gtk+ 2.16
36
37   $op->draw_page_finish ()
38       The method draw_page_finish() can only be called if the method
39       set_defer_drawing() has been called previously otherwise a segmentation
40       fault will occur. This means that the application will crash and even
41       an eval will not be able to recover from that error.
42
43       Since: gtk+ 2.16
44
45   boolean = $op->get_embed_page_setup
46       Since: gtk+ 2.18
47
48   $op->set_embed_page_setup ($embed)
49       ·   $embed (boolean)
50
51       Since: gtk+ 2.18
52
53   scalar = $op->get_error
54   $op->set_export_filename ($filename)
55       ·   $filename (string)
56
57   boolean = $op->get_has_selection
58       Since: gtk+ 2.18
59
60   $op->set_has_selection ($has_selection)
61       ·   $has_selection (boolean)
62
63       Since: gtk+ 2.18
64
65   boolean = $op->is_finished
66   $op->set_job_name ($job_name)
67       ·   $job_name (string)
68
69   $op->set_n_pages ($n_pages)
70       ·   $n_pages (integer)
71
72   integer = $op->get_n_pages_to_print
73       Since: gtk+ 2.18
74
75   printsettings or undef = $op->get_print_settings
76   $op->set_print_settings ($print_settings)
77       ·   $print_settings (Gtk2::PrintSettings or undef)
78
79   printoperationresult = $op->run ($action, $parent)
80       ·   $action (Gtk2::PrintOperationAction)
81
82       ·   $parent (Gtk2::Window or undef)
83
84       May croak with a Glib::Error in $@ on failure.
85
86   $op->set_show_progress ($show_progress)
87       ·   $show_progress (boolean)
88
89   printstatus = $op->get_status
90   string = $op->get_status_string
91   boolean = $op->get_support_selection
92       Since: gtk+ 2.18
93
94   $op->set_support_selection ($support_selection)
95       ·   $support_selection (boolean)
96
97       Since: gtk+ 2.18
98
99   $op->set_track_print_status ($track_status)
100       ·   $track_status (boolean)
101
102   $op->set_unit ($unit)
103       ·   $unit (Gtk2::Unit)
104
105   $op->set_use_full_page ($full_page)
106       ·   $full_page (boolean)
107

PROPERTIES

109       'allow-async' (boolean : default false : readable / writable / private)
110           TRUE if print process may run asynchronous.
111
112       'current-page' (integer : default -1 : readable / writable / private)
113           The current page in the document
114
115       'custom-tab-label' (string : default undef : readable / writable /
116       private)
117           Label for the tab containing custom widgets.
118
119       'default-page-setup' (Gtk2::PageSetup : default undef : readable /
120       writable / private)
121           The GtkPageSetup used by default
122
123       'embed-page-setup' (boolean : default false : readable / writable /
124       private)
125           TRUE if page setup combos are embedded in GtkPrintDialog
126
127       'export-filename' (string : default undef : readable / writable /
128       private)
129           Export filename
130
131       'has-selection' (boolean : default false : readable / writable /
132       private)
133           TRUE if a selection exists.
134
135       'job-name' (string : default "" : readable / writable / private)
136           A string used for identifying the print job.
137
138       'n-pages' (integer : default -1 : readable / writable / private)
139           The number of pages in the document.
140
141       'n-pages-to-print' (integer : default -1 : readable / private)
142           The number of pages that will be printed.
143
144       'print-settings' (Gtk2::PrintSettings : default undef : readable /
145       writable / private)
146           The GtkPrintSettings used for initializing the dialog
147
148       'show-progress' (boolean : default false : readable / writable /
149       private)
150           TRUE if a progress dialog is shown while printing.
151
152       'status' (Gtk2::PrintStatus : default "initial" : readable / private)
153           The status of the print operation
154
155       'status-string' (string : default "" : readable / private)
156           A human-readable description of the status
157
158       'support-selection' (boolean : default false : readable / writable /
159       private)
160           TRUE if the print operation will support print of selection.
161
162       'track-print-status' (boolean : default false : readable / writable /
163       private)
164           TRUE if the print operation will continue to report on the print
165           job status after the print data has been sent to the printer or
166           print server.
167
168       'unit' (Gtk2::Unit : default "pixel" : readable / writable / private)
169           The unit in which distances can be measured in the context
170
171       'use-full-page' (boolean : default false : readable / writable /
172       private)
173           TRUE if the origin of the context should be at the corner of the
174           page and not the corner of the imageable area
175

SIGNALS

177       begin-print (Gtk2::PrintOperation, Gtk2::PrintContext)
178       Glib::Object = create-custom-widget (Gtk2::PrintOperation)
179       custom-widget-apply (Gtk2::PrintOperation, Gtk2::Widget)
180       done (Gtk2::PrintOperation, Gtk2::PrintOperationResult)
181       draw-page (Gtk2::PrintOperation, Gtk2::PrintContext, integer)
182       end-print (Gtk2::PrintOperation, Gtk2::PrintContext)
183       boolean = paginate (Gtk2::PrintOperation, Gtk2::PrintContext)
184       boolean = preview (Gtk2::PrintOperation, Gtk2::PrintOperationPreview,
185       Gtk2::PrintContext, Gtk2::Window)
186       request-page-setup (Gtk2::PrintOperation, Gtk2::PrintContext, integer,
187       Gtk2::PageSetup)
188       status-changed (Gtk2::PrintOperation)
189       update-custom-widget (Gtk2::PrintOperation, Gtk2::Widget,
190       Gtk2::PageSetup, Gtk2::PrintSettings)
191

ENUMS AND FLAGS

193   enum Gtk2::PrintOperationAction
194       ·   'print-dialog' / 'GTK_PRINT_OPERATION_ACTION_PRINT_DIALOG'
195
196       ·   'print' / 'GTK_PRINT_OPERATION_ACTION_PRINT'
197
198       ·   'preview' / 'GTK_PRINT_OPERATION_ACTION_PREVIEW'
199
200       ·   'export' / 'GTK_PRINT_OPERATION_ACTION_EXPORT'
201
202   enum Gtk2::PrintOperationResult
203       ·   'error' / 'GTK_PRINT_OPERATION_RESULT_ERROR'
204
205       ·   'apply' / 'GTK_PRINT_OPERATION_RESULT_APPLY'
206
207       ·   'cancel' / 'GTK_PRINT_OPERATION_RESULT_CANCEL'
208
209       ·   'in-progress' / 'GTK_PRINT_OPERATION_RESULT_IN_PROGRESS'
210
211   enum Gtk2::PrintStatus
212       ·   'initial' / 'GTK_PRINT_STATUS_INITIAL'
213
214       ·   'preparing' / 'GTK_PRINT_STATUS_PREPARING'
215
216       ·   'generating-data' / 'GTK_PRINT_STATUS_GENERATING_DATA'
217
218       ·   'sending-data' / 'GTK_PRINT_STATUS_SENDING_DATA'
219
220       ·   'pending' / 'GTK_PRINT_STATUS_PENDING'
221
222       ·   'pending-issue' / 'GTK_PRINT_STATUS_PENDING_ISSUE'
223
224       ·   'printing' / 'GTK_PRINT_STATUS_PRINTING'
225
226       ·   'finished' / 'GTK_PRINT_STATUS_FINISHED'
227
228       ·   'finished-aborted' / 'GTK_PRINT_STATUS_FINISHED_ABORTED'
229
230   enum Gtk2::Unit
231       ·   'pixel' / 'GTK_UNIT_PIXEL'
232
233       ·   'points' / 'GTK_UNIT_POINTS'
234
235       ·   'inch' / 'GTK_UNIT_INCH'
236
237       ·   'mm' / 'GTK_UNIT_MM'
238

SEE ALSO

240       Gtk2, Glib::Object
241
243       Copyright (C) 2003-2011 by the gtk2-perl team.
244
245       This software is licensed under the LGPL.  See Gtk2 for a full notice.
246
247
248
249perl v5.30.1                      2020-01-30           Gtk2::PrintOperation(3)
Impressum