X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fa482912e420a40e9f2e55a0f5407562826dd15e..30acf700f91bc40b1549d71c9fc0186ce4f1cafd:/docs/latex/wx/print.tex

diff --git a/docs/latex/wx/print.tex b/docs/latex/wx/print.tex
index 38016dcd28..cc4df2a635 100644
--- a/docs/latex/wx/print.tex
+++ b/docs/latex/wx/print.tex
@@ -125,15 +125,23 @@ Returns the current print quality. This can be a positive integer, denoting the
 one of the following identifiers:
 
 \begin{verbatim}
-wxPRINT\_QUALITY\_HIGH
-wxPRINT\_QUALITY\_MEDIUM
-wxPRINT\_QUALITY\_LOW
-wxPRINT\_QUALITY\_DRAFT
+wxPRINT_QUALITY_HIGH
+wxPRINT_QUALITY_MEDIUM
+wxPRINT_QUALITY_LOW
+wxPRINT_QUALITY_DRAFT
 \end{verbatim}
 
 On input you should pass one of these identifiers, but on return you may get back a positive integer
 indicating the current resolution setting.
 
+\membersection{wxPrintData::Ok}\label{wxprintdataok}
+
+\constfunc{bool}{Ok}{\void}
+
+Returns TRUE if the print data is valid for using in print dialogs.
+This can return FALSE on Windows if the current printer is not set, for example.
+On all other platforms, it returns TRUE.
+
 \membersection{wxPrintData::SetCollate}\label{wxprintdatasetcollate}
 
 \func{void}{SetCollate}{\param{bool }{flag}}
@@ -262,10 +270,10 @@ Sets the desired print quality. This can be a positive integer, denoting the num
 one of the following identifiers:
 
 \begin{verbatim}
-wxPRINT\_QUALITY\_HIGH
-wxPRINT\_QUALITY\_MEDIUM
-wxPRINT\_QUALITY\_LOW
-wxPRINT\_QUALITY\_DRAFT
+wxPRINT_QUALITY_HIGH
+wxPRINT_QUALITY_MEDIUM
+wxPRINT_QUALITY_LOW
+wxPRINT_QUALITY_DRAFT
 \end{verbatim}
 
 On input you should pass one of these identifiers, but on return you may get back a positive integer
@@ -338,6 +346,14 @@ When this function has been called, the ownership of the device context
 is transferred to the application, so it must then be deleted
 explicitly.
 
+\membersection{wxPrintDialog::Ok}\label{wxprintdialogok}
+
+\constfunc{bool}{Ok}{\void}
+
+Returns TRUE if the print data associated with the dialog is valid.
+This can return FALSE on Windows if the current printer is not set, for example.
+On all other platforms, it returns TRUE.
+
 \membersection{wxPrintDialog::ShowModal}\label{wxprintdialogshowmodal}
 
 \func{int}{ShowModal}{\void}
@@ -470,6 +486,14 @@ a concept specific to the application).
 
 Returns the {\it to} page number, as entered by the user.
 
+\membersection{wxPrintDialogData::Ok}\label{wxprintdialogdataok}
+
+\constfunc{bool}{Ok}{\void}
+
+Returns TRUE if the print data is valid for using in print dialogs.
+This can return FALSE on Windows if the current printer is not set, for example.
+On all other platforms, it returns TRUE.
+
 \membersection{wxPrintDialogData::SetCollate}\label{wxprintdialogdatasetcollate}
 
 \func{void}{SetCollate}{\param{bool }{flag}}
@@ -598,6 +622,26 @@ Returns TRUE if the user has aborted the print job.
 
 Creates the default printing abort window, with a cancel button.
 
+
+\membersection{wxPrinter::GetLastError}\label{wxprintergetlasterror}
+
+\func{static wxPrinterError}{GetLastError}{\void}
+
+Return last error. Valid after calling \helpref{Print}{wxprinterprint},
+\helpref{PrintDialog}{wxprinterprintdialog} or 
+\helpref{wxPrintPreview::Print}{wxprintpreviewprint}. These functions 
+set last error to {\bf wxPRINTER\_NO\_ERROR} if no error happened.
+
+Returned value is one of the following:
+
+\twocolwidtha{7cm}
+\begin{twocollist}\itemsep=0pt
+\twocolitem{{\bf wxPRINTER\_NO\_ERROR}}{No error happened.}
+\twocolitem{{\bf wxPRINTER\_CANCELLED}}{The user cancelled printing.}
+\twocolitem{{\bf wxPRINTER\_ERROR}}{There was an error during printing.}
+\end{twocollist}
+
+
 \membersection{wxPrinter::GetPrintDialogData}\label{wxprintergetprintdialogdata}
 
 \func{wxPrintDialogData\&}{GetPrintDialogData}{\void}
@@ -612,7 +656,9 @@ Starts the printing process. Provide a parent window, a user-defined wxPrintout
 the printing of a document, and whether the print dialog should be invoked first.
 
 Print could return FALSE if there was a problem initializing the printer device context
-(current printer not set, for example).
+(current printer not set, for example) or the user cancelled printing. Call
+\helpref{wxPrinter::GetLastError}{wxprintergetlasterror} to get detailed
+information about the kind of the error.
 
 \membersection{wxPrinter::PrintDialog}\label{wxprinterprintdialog}
 
@@ -620,7 +666,9 @@ Print could return FALSE if there was a problem initializing the printer device
 
 Invokes the print dialog. If successful (the user did not press Cancel
 and no error occurred), a suitable device context will be returned
-(otherwise NULL is returned).
+(otherwise NULL is returned -- call
+\helpref{wxPrinter::GetLastError}{wxprintergetlasterror} to get detailed
+information about the kind of the error).
 
 The application must delete this device context to avoid a memory leak.
 
@@ -705,7 +753,8 @@ wxPrintPreview object to initiate printing or previewing.
 
 \func{}{wxPrintout}{\param{const wxString\& }{title = "Printout"}}
 
-Constructor. Pass an optional title argument (currently unused).
+Constructor. Pass an optional title argument - the curent filename would be a good idea. This will appear in the printing list
+(at least in MSW)
 
 \membersection{wxPrintout::\destruct{wxPrintout}}
 
@@ -736,6 +785,10 @@ it should be designed to take no parameters (other than the self
 reference) and to return a tuple of four integers.
 }
 
+\perlnote{When this method is overridden in a derived class,
+it must not take any parameters, an return a 4-element list.
+}
+
 \membersection{wxPrintout::GetPageSizeMM}\label{wxprintoutgetpagesizemm}
 
 \func{void}{GetPageSizeMM}{\param{int *}{w}, \param{int *}{h}}
@@ -744,6 +797,9 @@ Returns the size of the printer page in millimetres.
 
 \pythonnote{This method returns the output-only parameters as a tuple.}
 
+\perlnote{In wxPerl this method takes no arguments and returns a
+2-element list {\tt ( w, h )}}
+
 \membersection{wxPrintout::GetPageSizePixels}\label{wxprintoutgetpagesizepixels}
 
 \func{void}{GetPageSizePixels}{\param{int *}{w}, \param{int *}{h}}
@@ -757,6 +813,9 @@ previewing is to be supported.
 
 \pythonnote{This method returns the output-only parameters as a tuple.}
 
+\perlnote{In wxPerl this method takes no arguments and returns a
+2-element list {\tt ( w, h )}}
+
 \membersection{wxPrintout::GetPPIPrinter}\label{wxprintoutgetppiprinter}
 
 \func{void}{GetPPIPrinter}{\param{int *}{w}, \param{int *}{h}}
@@ -768,6 +827,9 @@ this by a scaling factor to take the preview DC size into account.
 
 \pythonnote{This method returns the output-only parameters as a tuple.}
 
+\perlnote{In wxPerl this method takes no arguments and returns a
+2-element list {\tt ( w, h )}}
+
 \membersection{wxPrintout::GetPPIScreen}\label{wxprintoutgetppiscreen}
 
 \func{void}{GetPPIScreen}{\param{int *}{w}, \param{int *}{h}}
@@ -777,13 +839,22 @@ Dividing the printer PPI by the screen PPI can give a suitable scaling
 factor for drawing text onto the printer. Remember to multiply
 this by a scaling factor to take the preview DC size into account.
 
+\membersection{wxPrintout::GetTitle}\label{wxprintoutgettitle}
+
+\func{wxString}{GetTitle}{\void}
+
+Returns the title of the printout
+
 \pythonnote{This method returns the output-only parameters as a tuple.}
 
+\perlnote{In wxPerl this method takes no arguments and returns a
+2-element list {\tt ( w, h )}}
+
 \membersection{wxPrintout::HasPage}\label{wxprintouthaspage}
 
 \func{bool}{HasPage}{\param{int}{ pageNum}}
 
-Should be overriden to return TRUE if the document has this page, or FALSE
+Should be overridden to return TRUE if the document has this page, or FALSE
 if not. Returning FALSE signifies the end of the document. By default,
 HasPage behaves as if the document has only one page.
 
@@ -802,11 +873,11 @@ this function cancels the print job. OnBeginDocument is called once for every
 copy printed.
 
 The base wxPrintout::OnBeginDocument {\it must} be called (and the return value
-checked) from within the overriden function, since it calls wxDC::StartDoc.
+checked) from within the overridden function, since it calls wxDC::StartDoc.
 
-\pythonnote{If this method is overriden in a Python class then the
+\pythonnote{If this method is overridden in a Python class then the
 base class version can be called by using the method
-{\tt base_OnBeginDocument(startPage, endPage)}. }
+{\tt base\_OnBeginDocument(startPage, endPage)}. }
 
 \membersection{wxPrintout::OnEndDocument}\label{wxprintoutonenddocument}
 
@@ -816,7 +887,7 @@ Called by the framework at the end of document printing. OnEndDocument
 is called once for every copy printed.
 
 The base wxPrintout::OnEndDocument {\it must} be called
-from within the overriden function, since it calls wxDC::EndDoc.
+from within the overridden function, since it calls wxDC::EndDoc.
 
 \membersection{wxPrintout::OnBeginPrinting}\label{wxprintoutonbeginprinting}
 
@@ -984,6 +1055,10 @@ supplied in the wxPrintPreview constructor.
 Will normally be called by the {\bf Print...} panel item on the
 preview frame's control bar.
 
+Returns FALSE in case of error -- call
+\helpref{wxPrinter::GetLastError}{wxprintergetlasterror} to get detailed
+information about the kind of the error.
+
 \membersection{wxPrintPreview::RenderPage}\label{wxprintpreviewrenderpage}
 
 \func{bool}{RenderPage}{\param{int }{pageNum}}
