Inheritance diagram for wx.PrintPreview:
Objects of this class manage the print preview process. The object is passed a wx.Printout object, and the wx.PrintPreview object itself is passed to a wx.PreviewFrame object.
Previewing is started by initializing and showing the preview frame. Unlike wx.Printer.Print, flow of control returns to the application immediately after the frame is shown.
See also
wx.PrinterDC, wx.PrintDialog, wx.Printout, wx.Printer, wx.PreviewCanvas, wx.PreviewControlBar, wx.PreviewFrame.
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 not None, a Print... button will be placed on the preview frame so that the user can print directly from the preview interface.
Do not explicitly delete the printout objects once this destructor has been called, since they will be deleted in the wx.PrintPreview constructor. The same does not apply to the data argument.
Test the IsOk member to check whether the wx.PrintPreview object was created correctly. IsOk could return False if there was a problem initializing the printer device context (current printer not set, for example).
Parameters:
Returns:
Parameters:
Parameters:
Returns:
bool
Gets the preview window used for displaying the print preview image.
Returns:
Gets the page currently being previewed.
Returns:
int
Gets the frame used for displaying the print preview canvas and control bar.
Returns:
Returns the maximum page number.
Returns:
int
Returns the minimum page number.
Returns:
int
Gets the preview printout object associated with the wx.PrintPreview object.
Returns:
Gets the printout object to be used for printing from within the preview interface, or None if none exists.
Returns:
Returns True if the wx.PrintPreview is valid, False otherwise. It could return False if there was a problem initializing the printer device context (current printer not set, for example).
Returns:
bool
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.
Parameters:
Returns:
bool
Invokes the print process using the second wx.Printout object supplied in the wx.PrintPreview constructor. Will normally be called by the Print... panel item on the preview frame’s control bar.
Returns False in case of error – call wx.Printer.GetLastError to get detailed information about the kind of the error.
Parameters:
Returns:
bool
Renders a page into a wx.MemoryDC. Used internally by wx.PrintPreview.
Parameters:
Returns:
bool
Sets the window to be used for displaying the print preview image.
Parameters:
Sets the current page to be previewed.
Parameters:
Sets the frame to be used for displaying the print preview canvas and control bar.
Parameters:
Parameters:
Associates a printout object with the wx.PrintPreview object.
Parameters:
Sets the percentage preview zoom, and refreshes the preview canvas accordingly.
Parameters: