1wxPrinter(3) Erlang Module Definition wxPrinter(3)
2
3
4
6 wxPrinter - Functions for wxPrinter class
7
9 This class represents the Windows or PostScript printer, and is the ve‐
10 hicle through which printing may be launched by an application.
11
12 Printing can also be achieved through using of lower functions and
13 classes, but this and associated classes provide a more convenient and
14 general method of printing.
15
16 See: Overview printing, wxPrinterDC (not implemented in wx), wxPrintDi‐
17 alog, wxPrintout, wxPrintPreview
18
19 wxWidgets docs: wxPrinter
20
22 wxPrinter() = wx:wx_object()
23
25 new() -> wxPrinter()
26
27 new(Options :: [Option]) -> wxPrinter()
28
29 Types:
30
31 Option = {data, wxPrintDialogData:wxPrintDialogData()}
32
33 Constructor.
34
35 Pass an optional pointer to a block of print dialog data, which
36 will be copied to the printer object's local data.
37
38 See: wxPrintDialogData, wxPrintData
39
40 createAbortWindow(This, Parent, Printout) -> wxDialog:wxDialog()
41
42 Types:
43
44 This = wxPrinter()
45 Parent = wxWindow:wxWindow()
46 Printout = wxPrintout:wxPrintout()
47
48 Creates the default printing abort window, with a cancel button.
49
50 getAbort(This) -> boolean()
51
52 Types:
53
54 This = wxPrinter()
55
56 Returns true if the user has aborted the print job.
57
58 getLastError() -> wx:wx_enum()
59
60 Return last error.
61
62 Valid after calling print/4, printDialog/2 or wxPrintPre‐
63 view:print/2.
64
65 These functions set last error to wxPRINTER_NO_ERROR if no error
66 happened.
67
68 Returned value is one of the following:
69
70 getPrintDialogData(This) -> wxPrintDialogData:wxPrintDialogData()
71
72 Types:
73
74 This = wxPrinter()
75
76 Returns the print data associated with the printer object.
77
78 print(This, Parent, Printout) -> boolean()
79
80 Types:
81
82 This = wxPrinter()
83 Parent = wxWindow:wxWindow()
84 Printout = wxPrintout:wxPrintout()
85
86 print(This, Parent, Printout, Options :: [Option]) -> boolean()
87
88 Types:
89
90 This = wxPrinter()
91 Parent = wxWindow:wxWindow()
92 Printout = wxPrintout:wxPrintout()
93 Option = {prompt, boolean()}
94
95 Starts the printing process.
96
97 Provide a parent window, a user-defined wxPrintout object which
98 controls the printing of a document, and whether the print dia‐
99 log should be invoked first.
100
101 print/4 could return false if there was a problem initializing
102 the printer device context (current printer not set, for exam‐
103 ple) or the user cancelled printing. Call getLastError/0 to get
104 detailed information about the kind of the error.
105
106 printDialog(This, Parent) -> wxDC:wxDC()
107
108 Types:
109
110 This = wxPrinter()
111 Parent = wxWindow:wxWindow()
112
113 Invokes the print dialog.
114
115 If successful (the user did not press Cancel and no error oc‐
116 curred), a suitable device context will be returned; otherwise
117 NULL is returned; call getLastError/0 to get detailed informa‐
118 tion about the kind of the error.
119
120 Remark: The application must delete this device context to avoid
121 a memory leak.
122
123 reportError(This, Parent, Printout, Message) -> ok
124
125 Types:
126
127 This = wxPrinter()
128 Parent = wxWindow:wxWindow()
129 Printout = wxPrintout:wxPrintout()
130 Message = unicode:chardata()
131
132 Default error-reporting function.
133
134 setup(This, Parent) -> boolean()
135
136 Types:
137
138 This = wxPrinter()
139 Parent = wxWindow:wxWindow()
140
141 Invokes the print setup dialog.
142
143 Deprecated: The setup dialog is obsolete, though retained for
144 backward compatibility.
145
146 destroy(This :: wxPrinter()) -> ok
147
148 Destroys the object.
149
150
151
152wxWidgets team. wx 2.2.2 wxPrinter(3)