Set page range in the print preview correctly.
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 23 Apr 2011 10:49:48 +0000 (10:49 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 23 Apr 2011 10:49:48 +0000 (10:49 +0000)
commitd7cfeeb49c4c70f9ffdbbe85f8c5a08694dff81c
tree51e885a9ed529b3848941dc9c22c048939905eb1
parenta78d2fbab115b4c6537349fb06275d1610bf4aa0
Set page range in the print preview correctly.

The valid pages range was set too early before, we need to postpone it until
after the OnPreparePrinting() call of the user-defined wxPrintout object as
only it can determine the number of pages (after running the pagination
algorithm) in general.

Set the pages range during the first call to RenderPageIntoDC() to fix this.

Also add wxPrintPageMaxCtrl class for symmetry with the existing
wxPrintPageTextCtrl and use a shared constant MAX_PAGE_NUMBER instead of hard
coded 99999. Slightly improve the layout of wxPrintPageMaxCtrl too.

Closes #12965.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67580 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
include/wx/prntbase.h
src/common/prntbase.cpp