1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104
|
<HTML>
<head><title>wxPrinter</title></head>
<BODY BGCOLOR=#FFFFFF>
<A NAME="wxprinter"></A><CENTER>
<A HREF="wx.htm"><img align=center src="contents.gif" BORDER=0 ALT="Contents"></A> <A HREF="wx22.htm#classref"><img align=center src="up.gif" BORDER=0 ALT="Up"></A> <A HREF="wx177.htm#wxprintdialog"><img align=center src="back.gif" BORDER=0 ALT="Previous"></A> <A HREF="wx179.htm#wxprinterdc"><img align=center src="forward.gif" BORDER=0 ALT="Next"></A> </CENTER><HR>
<H2>wxPrinter</H2>
<P>
This class represents the Windows or PostScript printer, and is the vehicle through
which printing may be launched by an application. Printing can also
be achieved through using of lower functions and classes, but
this and associated classes provide a more convenient and general
method of printing.<P>
<B><FONT COLOR="#FF0000">Derived from</FONT></B><P>
<A HREF="wx158.htm#wxobject">wxObject</A><P>
<B><FONT COLOR="#FF0000">Include files</FONT></B><P>
<wx/print.h><P>
<B><FONT COLOR="#FF0000">See also</FONT></B><P>
<A HREF="wx302.htm#printingoverview">Printing framework overview</A>, <A HREF="wx179.htm#wxprinterdc">wxPrinterDC</A>, <A HREF="wx177.htm#wxprintdialog">wxPrintDialog</A>,
<A HREF="wx180.htm#wxprintout">wxPrintout</A>, <A HREF="wx181.htm#wxprintpreview">wxPrintPreview</A>.<P>
<B><FONT COLOR="#FF0000">Members</FONT></B><P>
<A HREF="#topic673">wxPrinter::wxPrinter</A><BR>
<A HREF="#topic674">wxPrinter::~wxPrinter</A><BR>
<A HREF="#wxprinterabort">wxPrinter::Abort</A><BR>
<A HREF="#wxprintercreateabortwindow">wxPrinter::CreateAbortWindow</A><BR>
<A HREF="#wxprintergetprintdata">wxPrinter::GetPrintData</A><BR>
<A HREF="#wxprinterprint">wxPrinter::Print</A><BR>
<A HREF="#wxprinterprintdialog">wxPrinter::PrintDialog</A><BR>
<A HREF="#wxprinterreporterror">wxPrinter::ReportError</A><BR>
<A HREF="#wxprintersetup">wxPrinter::Setup</A><BR>
<P>
<HR>
<A NAME="topic673"></A>
<H3>wxPrinter::wxPrinter</H3>
<P>
<B></B> <B>wxPrinter</B>(<B>wxPrintData* </B><I>data = NULL</I>)<P>
Constructor. Pass an optional pointer to a block of print
data, which will be copied to the printer object's print data.<P>
<B><FONT COLOR="#FF0000">See also</FONT></B><P>
<A HREF="wx176.htm#wxprintdata">wxPrintData</A><P>
<HR>
<A NAME="topic674"></A>
<H3>wxPrinter::~wxPrinter</H3>
<P>
<B></B> <B>~wxPrinter</B>()<P>
Destructor.<P>
<HR>
<A NAME="wxprinterabort"></A>
<H3>wxPrinter::Abort</H3>
<P>
<B>bool</B> <B>Abort</B>()<P>
Returns TRUE if the user has aborted the print job.<P>
<HR>
<A NAME="wxprintercreateabortwindow"></A>
<H3>wxPrinter::CreateAbortWindow</H3>
<P>
<B>void</B> <B>CreateAbortWindow</B>(<B>wxWindow* </B><I>parent</I>, <B>wxPrintout* </B><I>printout</I>)<P>
Creates the default printing abort window, with a cancel button.<P>
<HR>
<A NAME="wxprintergetprintdata"></A>
<H3>wxPrinter::GetPrintData</H3>
<P>
<B>wxPrintData&</B> <B>GetPrintData</B>()<P>
Returns the <A HREF="wx176.htm#wxprintdata">print data</A> associated with the printer object.<P>
<HR>
<A NAME="wxprinterprint"></A>
<H3>wxPrinter::Print</H3>
<P>
<B>bool</B> <B>Print</B>(<B>wxWindow *</B><I>parent</I>, <B>wxPrintout *</B><I>printout</I>, <B>bool </B><I>prompt=TRUE</I>)<P>
Starts the printing process. Provide a parent window, a user-defined wxPrintout object which controls
the printing of a document, and whether the print dialog should be invoked first.<P>
Print could return FALSE if there was a problem initializing the printer device context
(current printer not set, for example).<P>
<HR>
<A NAME="wxprinterprintdialog"></A>
<H3>wxPrinter::PrintDialog</H3>
<P>
<B>bool</B> <B>PrintDialog</B>(<B>wxWindow *</B><I>parent</I>)<P>
Invokes the print dialog.<P>
<HR>
<A NAME="wxprinterreporterror"></A>
<H3>wxPrinter::ReportError</H3>
<P>
<B>void</B> <B>ReportError</B>(<B>wxWindow *</B><I>parent</I>, <B>wxPrintout *</B><I>printout</I>, <B>const wxString& </B><I>message</I>)<P>
Default error-reporting function.<P>
<HR>
<A NAME="wxprintersetup"></A>
<H3>wxPrinter::Setup</H3>
<P>
<B>void</B> <B>Setup</B>(<B>wxWindow *</B><I>parent</I>)<P>
Invokes the print setup dialog. Note that the setup dialog is obsolete from
Windows 95, though retained for backward compatibility.<P>
</BODY></HTML>
|