\section{Printing overview}\label{printingoverview}
-Classes: \helpref{wxPrintout}{wxprintout}, \helpref{wxPrinter}{wxprinter},\rtfsp
-\helpref{wxPrintPreview}{wxprintpreview}, \helpref{wxPrinterDC}{wxprinterdc},\rtfsp
-\helpref{wxPrintDialog}{wxprintdialog}.
+Classes: \helpref{wxPrintout}{wxprintout},
+\helpref{wxPrinter}{wxprinter},
+\helpref{wxPrintPreview}{wxprintpreview},
+\helpref{wxPrinterDC}{wxprinterdc},
+\helpref{wxPrintDialog}{wxprintdialog},
+\helpref{wxPrintData}{wxprintdata},
+\helpref{wxPrintDialogData}{wxprintdialogdata},
+\helpref{wxPageSetupDialog}{wxpagesetupdialog},
+\helpref{wxPageSetupDialogData}{wxpagesetupdialogdata}
The printing framework relies on the application to provide classes
whose member functions can respond to particular requests, such
as `print this page' or `does this page exist in the document?'.
-This method allows wxWindows to take over the housekeeping duties of
+This method allows wxWidgets to take over the housekeeping duties of
turning preview pages, calling the print dialog box, creating
the printer device context, and so on: the application can concentrate
on the rendering of the information onto a device context.
-The printing framework is mainly a Windows feature; PostScript
-support under non-Windows platforms is emerging but has not been rigorously tested.
The \helpref{document/view framework}{docviewoverview} creates a default wxPrintout
object for every view, calling wxView::OnDraw to achieve a
it is to initiate printing, previewing and the print setup dialog, once the wxPrintout
functionality has been defined. Notice the use of MyPrintout for
both printing and previewing. All the preview user interface functionality
-is taken care of by wxWindows. For details on how MyPrintout is defined,
+is taken care of by wxWidgets. For details on how MyPrintout is defined,
please look at the printout sample code.
\begin{verbatim}
{
wxPrinter printer;
MyPrintout printout("My printout");
- printer.Print(this, &printout, TRUE);
+ printer.Print(this, &printout, true);
break;
}
case WXPRINT_PREVIEW:
wxPreviewFrame *frame = new wxPreviewFrame(preview, this, "Demo Print Preview", 100, 100, 600, 650);
frame->Centre(wxBOTH);
frame->Initialize();
- frame->Show(TRUE);
+ frame->Show(true);
break;
}
case WXPRINT_PRINT_SETUP:
{
wxPrintDialog printerDialog(this);
- printerDialog.GetPrintData().SetSetupDialog(TRUE);
- printerDialog.Show(TRUE);
+ printerDialog.GetPrintData().SetSetupDialog(true);
+ printerDialog.Show(true);
break;
}
\end{verbatim}