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

SIGNALS

185       begin-print (Gtk2::PrintOperation, Gtk2::PrintContext)
186       Glib::Object = create-custom-widget (Gtk2::PrintOperation)
187       custom-widget-apply (Gtk2::PrintOperation, Gtk2::Widget)
188       done (Gtk2::PrintOperation, Gtk2::PrintOperationResult)
189       draw-page (Gtk2::PrintOperation, Gtk2::PrintContext, integer)
190       end-print (Gtk2::PrintOperation, Gtk2::PrintContext)
191       boolean = paginate (Gtk2::PrintOperation, Gtk2::PrintContext)
192       boolean = preview (Gtk2::PrintOperation, Gtk2::PrintOperationPreview,
193       Gtk2::PrintContext, Gtk2::Window)
194       request-page-setup (Gtk2::PrintOperation, Gtk2::PrintContext, integer,
195       Gtk2::PageSetup)
196       status-changed (Gtk2::PrintOperation)
197       update-custom-widget (Gtk2::PrintOperation, Gtk2::Widget,
198       Gtk2::PageSetup, Gtk2::PrintSettings)
199

ENUMS AND FLAGS

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

SEE ALSO

248       Gtk2, Glib::Object
249
251       Copyright (C) 2003-2011 by the gtk2-perl team.
252
253       This software is licensed under the LGPL.  See Gtk2 for a full notice.
254
255
256
257perl v5.32.0                      2020-07-28           Gtk2::PrintOperation(3)
Impressum