Replace wxPrintout::SetIsPreview() with SetPreview().

Unlike the old function just indicating whether a printout is being used for
previewing, the new one associates the preview object with it. This can be
useful if we need to access the window used for the preview, for example.

Also remove a bunch of apparently unnecessary SetIsPreview(false) calls as
printing (and not previewing) is already the default.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64212 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2010-05-05 12:19:59 +00:00
parent 5009cb6acc
commit 1bd122ddfa
8 changed files with 26 additions and 19 deletions

View File

@@ -708,9 +708,26 @@ public:
/**
Returns @true if the printout is currently being used for previewing.
@see GetPreview()
*/
virtual bool IsPreview() const;
/**
Returns the associated preview object if any.
If this printout object is used for previewing, returns the associated
wxPrintPreview. Otherwise returns @NULL.
The returned pointer is not owned by the printout and must not be
deleted.
@see IsPreview()
@since 2.9.1.
*/
wxPrintPreview *GetPreview() const;
/**
Set the user scale and device origin of the wxDC associated with this wxPrintout
so that one screen pixel maps to one device pixel on the DC.