#include <wx/print.h>

Public Member Functions | |
| wxPrintPreview (wxPrintout *printout, wxPrintout *printoutForPrinting=NULL, wxPrintDialogData *data=NULL) | |
| ~wxPrinter () | |
| virtual wxPreviewCanvas * | GetCanvas () const |
| virtual int | GetCurrentPage () const |
| virtual wxFrame * | GetFrame () const |
| virtual int | GetMaxPage () const |
| virtual int | GetMinPage () const |
| virtual wxPrintout * | GetPrintout () const |
| virtual wxPrintout * | GetPrintoutForPrinting () const |
| virtual bool | IsOk () const |
| virtual bool | PaintPage (wxPreviewCanvas *canvas, wxDC &dc) |
| virtual bool | Print (bool prompt) |
| virtual bool | RenderPage (int pageNum) |
| virtual void | SetCanvas (wxPreviewCanvas *window) |
| virtual bool | SetCurrentPage (int pageNum) |
| virtual void | SetFrame (wxFrame *frame) |
| virtual void | SetPrintout (wxPrintout *printout) |
| virtual void | SetZoom (int percent) |
| wxPrintPreview::wxPrintPreview | ( | wxPrintout * | printout, | |
| wxPrintout * | printoutForPrinting = NULL, |
|||
| wxPrintDialogData * | data = NULL | |||
| ) |
Constructor.
Pass a printout object, an optional printout object to be used for actual printing, and the address of an optional block of printer data, which will be copied to the print preview object's print data.
If printoutForPrinting is non-NULL, a "Print..." button will be placed on the preview frame so that the user can print directly from the preview interface.
| wxPrintPreview::~wxPrinter | ( | ) |
Destructor.
Deletes both print preview objects, so do not destroy these objects in your application.
| virtual wxPreviewCanvas* wxPrintPreview::GetCanvas | ( | ) | const [virtual] |
Gets the preview window used for displaying the print preview image.
| virtual int wxPrintPreview::GetCurrentPage | ( | ) | const [virtual] |
Gets the page currently being previewed.
| virtual wxFrame* wxPrintPreview::GetFrame | ( | ) | const [virtual] |
Gets the frame used for displaying the print preview canvas and control bar.
| virtual int wxPrintPreview::GetMaxPage | ( | ) | const [virtual] |
Returns the maximum page number.
| virtual int wxPrintPreview::GetMinPage | ( | ) | const [virtual] |
Returns the minimum page number.
| virtual wxPrintout* wxPrintPreview::GetPrintout | ( | ) | const [virtual] |
Gets the preview printout object associated with the wxPrintPreview object.
| virtual wxPrintout* wxPrintPreview::GetPrintoutForPrinting | ( | ) | const [virtual] |
Gets the printout object to be used for printing from within the preview interface, or NULL if none exists.
| virtual bool wxPrintPreview::IsOk | ( | ) | const [virtual] |
Returns true if the wxPrintPreview is valid, false otherwise.
It could return false if there was a problem initializing the printer device context (current printer not set, for example).
| virtual bool wxPrintPreview::PaintPage | ( | wxPreviewCanvas * | canvas, | |
| wxDC & | dc | |||
| ) | [virtual] |
This refreshes the preview window with the preview image. It must be called from the preview window's OnPaint member.
The implementation simply blits the preview bitmap onto the canvas, creating a new preview bitmap if none exists.
| virtual bool wxPrintPreview::Print | ( | bool | prompt | ) | [virtual] |
Invokes the print process using the second wxPrintout object supplied in the wxPrintPreview constructor. Will normally be called by the Print... panel item on the preview frame's control bar.
Returns false in case of error -- call wxPrinter::GetLastError() to get detailed information about the kind of the error.
| virtual bool wxPrintPreview::RenderPage | ( | int | pageNum | ) | [virtual] |
Renders a page into a wxMemoryDC. Used internally by wxPrintPreview.
| virtual void wxPrintPreview::SetCanvas | ( | wxPreviewCanvas * | window | ) | [virtual] |
Sets the window to be used for displaying the print preview image.
| virtual bool wxPrintPreview::SetCurrentPage | ( | int | pageNum | ) | [virtual] |
Sets the current page to be previewed.
| virtual void wxPrintPreview::SetFrame | ( | wxFrame * | frame | ) | [virtual] |
Sets the frame to be used for displaying the print preview canvas and control bar.
| virtual void wxPrintPreview::SetPrintout | ( | wxPrintout * | printout | ) | [virtual] |
Associates a printout object with the wxPrintPreview object.
| virtual void wxPrintPreview::SetZoom | ( | int | percent | ) | [virtual] |
Sets the percentage preview zoom, and refreshes the preview canvas accordingly.
|
[ top ] |