Commit Graph

74 Commits

Author SHA1 Message Date
Václav Slavík
e7aa9bb7c0 Show progress of printing in wxMSW.
Add the number of the page being printed as well as the total to the
wxMSW printing progress window. Improved the layout and fixed some i18n
issues in the process.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72308 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-09 15:52:15 +00:00
Václav Slavík
446659cac6 Return wxPrintAbortDialog from CreateAbortWindow().
Instead of returning a generic wxWindow*, return the type actually used.
It was part of the public header already, but not used in any publicly
visible way.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72306 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-09 15:52:08 +00:00
Václav Slavík
1a19b3210d Create wxPrintAbortDialog more sensibly.
Instead of having an empty constructor and filling the dialog with
controls from outside, do the work in the constructor.

This changes the meaning of ctor's 'title' argument, but this class'
terrible API made it unusable for direct use anyway, so it doesn't seem
to be harmful.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72305 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-09 15:52:04 +00:00
Vadim Zeitlin
1e5ad6e1d1 Restore wxPreviewFrame::Initialize(void) and add InitializeWithModality().
The changes of r67619 changed the signature of the virtual Initialize() method
and in doing so broke the existing code overriding it. Avoid this problem by
restoring the old method signature and adding a function with a different name
providing the new functionality.

Also notice in the documentation that there is no real need to override
Initialize() in any case (but this doesn't change the fact that there is
existing code that does do it).

See #13108.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68026 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-06-22 22:58:07 +00:00
Vadim Zeitlin
6aacfc7320 Allow showing the print preview frame non modally.
Still show the print preview app modally by default, i.e. disabling all the
other windows, but also allow disabling only the preview parent or nothing at
all.

Closes #13108.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67619 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-04-26 22:57:27 +00:00
Vadim Zeitlin
d7cfeeb49c 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
2011-04-23 10:49:48 +00:00
Vadim Zeitlin
825794618f Improve print preview appearance and functionality.
Allow to directly enter the page number in the print preview itself instead of
opening a separate dialog in order to do it.

Rearrange the buttons in more visually appealing groups and replace the text
arrows in them with the images.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66539 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-01-03 15:57:21 +00:00
Vadim Zeitlin
6c4da6d611 Translate strings used in doc-view printing code.
Simply use _() instead of wxT() for the user-visible strings.

Closes #12110.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64451 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-31 14:59:03 +00:00
Vadim Zeitlin
1bd122ddfa 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
2010-05-05 12:19:59 +00:00
Vadim Zeitlin
c0c133e13b add wx-prefixed and semicolon-requiring versions of DECLARE_NO_{COPY,ASSIGN}_CLASS macros
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58757 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-02-08 11:45:59 +00:00
Vadim Zeitlin
d3b9f782ef don't use annoying and unneeded in C++ casts of NULL to "T *" in all other files neither
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58227 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-01-19 13:55:27 +00:00
Vadim Zeitlin
ca44dbde5f make the preview frame float on parent by default as otherwise it is hidden when the parent is a modal dialog, at least under wxGTK (#10341)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58154 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-01-16 18:49:04 +00:00
Francesco Montorsi
3366d55c57 use wxFrameNameStr where possible instead of 'frame' string (for coherence with all other wxWidgets frame classes)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56705 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-11-08 15:01:00 +00:00
Václav Slavík
40fcf546f6 added wxGetDisplayPPI() convenience function and wxPrintout::SetPPI*() overloads accepting single wxSize argument
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55761 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-09-21 09:35:49 +00:00
Václav Slavík
25a3fca2e5 Implemented high-quality preview for wxMSW (this approach doesn't work
on other platforms). The preview is now accurate representation of printed
page and wxHtmlEasyPrinting preview shows identical layout to what will
be printed.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54264 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-06-16 08:41:51 +00:00
Václav Slavík
88b987876d fixed printing preview to not report errors in infinite loop (bug introduced by r54133)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54261 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-06-16 07:43:59 +00:00
Václav Slavík
b88bf07395 render pages in print preview at idle time, not from OnPaint, to make the UI appear more responsive when preview takes long time to create
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54133 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-06-11 20:56:41 +00:00
Francesco Montorsi
53a2db124c substitute WXDLLEXPORT with WXDLLIMPEXP_CORE and WXDLLEXPORT_DATA with WXDLLIMPEXP_DATA_CORE
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52834 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-03-26 15:06:00 +00:00
Robert Roebling
888dde65f4 DC reorganization
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50348 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-11-30 13:48:22 +00:00
Vadim Zeitlin
043c67059f allow the user to press Esc to close preview frame wherever the focus is, not only if it's on the canvas itself (patch 1719276)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48841 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-09-20 23:11:22 +00:00
Václav Slavík
b5dbe15d0b added WXDLLIMPEXP_FWD_FOO macros in addition to WXDLLIMPEXP_FOO for use with forward declarations (in preparation for GCC visibility support)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47254 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-07-09 10:09:52 +00:00
Włodzimierz Skiba
ce7208d49d Minor header cleaning.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42713 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-10-30 11:56:12 +00:00
Julian Smart
f415cab9ef Robert Lang's patch [ 1583183 ] Fixes printing/print preview inconsistencies
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42522 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-10-27 13:07:40 +00:00
Julian Smart
147bf2639f Added creation of printer DC to printer factory.
Added wxPrintData ctor to wxGnomePrintDC.
Added wxGnomePrintPreview.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42345 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-10-24 15:41:39 +00:00
Vadim Zeitlin
b7cacb43db add IsOk() to all classes having Ok() method (patch 1570985)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41751 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-10-08 21:56:55 +00:00
Vadim Zeitlin
d3c7fc996a mark all dtors which are virtual because base class dtor is virtual explicitly virtual themselves
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41020 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-09-05 20:47:48 +00:00
Julian Smart
d876667522 Fixed zoom problem (Robert J.Lang)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39872 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-06-28 12:56:05 +00:00
Mattia Barbon
33d094d13b Make member variable private.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35678 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-09-25 14:22:16 +00:00
Mart Raudsepp
8907154c1a Nuke #pragma implementation/interface's
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35650 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-09-23 12:56:45 +00:00
Vadim Zeitlin
fb6efdf277 Ctrl+mouse wheel changes zoom factor in print preview (patch 1230919)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34966 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-07-28 22:20:06 +00:00
Włodzimierz Skiba
d0ee33f5c6 '[1219035] cleanup: miscellaneous' and minor source cleaning.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34643 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-06-13 12:19:33 +00:00
Robert Roebling
08680429a2 Made wxPageSetupDialog a pimpl implementation.
Added a few clean-ups.
  Added native GNOME page setup dialog.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30669 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-11-20 14:46:25 +00:00
Robert Roebling
6038ec8eaf Next phase of Print Factory code.
Created a mini interface so that the generic
    wxPrintDialog can show a "printer" and a
    "status" line if the print factory wants
    this to be the case.
    Moved some code (print mode) back from the
    PostScript only print data to the general
    print data since it is sort of general.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30101 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-10-26 19:49:59 +00:00
Robert Roebling
fd64de596c Renamed wxPrintNativeData methods to better match
those of the preexisting wxMac class. This should
    make transition of the wxMac classes to the new
    wxPrintNativeData classes easier.
  Renamed wxWindowsPrintNativeData to a proper name
    that is less confusing (GetNativeData -> GetDevMode).


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29956 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-10-17 23:00:41 +00:00
Robert Roebling
8850cbd3c3 First step at moving the print (dialog) native
data into native dirs and cleaning up the code.
   The native part of wxPrintData is now created
   via the wxPrintFactory. I moved the code for
   PostScript to /src/generic/prntdlgg. and for
   MSW to its the respective dir. I only made
   wxMac compile, but it already has a native
   print data class, which should be easy to
   merge.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29947 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-10-17 17:25:40 +00:00
Robert Roebling
c061373dc5 Began work on print dialogs. Now wxPrintDialog
is a pimpl implementation of the native
    dialog classes, which are created in wxPrintFactory.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29927 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-10-16 22:11:48 +00:00
Robert Roebling
e81e3883b9 Added new wxPrintFactory code and made wxPrinter
and wxPrintPreview make use of it. BIG CHANGE.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29817 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-10-12 21:07:42 +00:00
Włodzimierz Skiba
7e548f6b13 Source cleaning: whitespaces, tabs, -1/wxID_ANY/wxDefaultCoord, TRUE/true, FALSE/false.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29230 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-09-20 11:31:49 +00:00
Vadim Zeitlin
7c9955536a use wxWindowDisabler instead of ShowModal() for showing the print preview frame (patch 832288)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28495 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-07-25 17:09:30 +00:00
Julian Smart
655719367a Use old licence name
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27408 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-05-23 20:53:33 +00:00
Julian Smart
77ffb5937e Name and version changes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27404 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-05-23 14:56:36 +00:00
Vadim Zeitlin
e9cafd4289 use wxFULL_REPAINT_ON_RESIZE only for wxPreviewCanvas, not for the entire wxPreviewFrame -- this eliminates flicker of the control bar, at least
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26537 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-04-01 11:04:33 +00:00
Julian Smart
7c2ba9a1e1 Added wxFULL_REPAINT_ON_RESIZE style
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25081 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-01-07 15:36:54 +00:00
Václav Slavík
1202890513 added support for gcc precompiled headers
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@22722 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-08-09 12:38:21 +00:00
Mattia Barbon
90b6b97467 Compilation fix.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@22281 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-07-24 20:06:02 +00:00
Julian Smart
b38b0d22d7 Fixed preview navigation as per ancient bug report
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@22270 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-07-24 10:07:43 +00:00
Julian Smart
d2b354f9c9 Printing improvements: GetPageInfo() gets called after the DC has
been set and after OnPreparePrinting() has been called so it can
report the number of pages accurately; doesn't try to set
number of pages in print dialog, in common with other Windows apps;
wxHTML easy printing's preview shows number of pages
correctly; preview scrollbars are set correctly; keyboard navigation
improved


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@22263 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-07-23 20:30:19 +00:00
Vadim Zeitlin
fc7a2a602b undisable many warnings for VC++ in defs.h and fixed several thousands of them in the sources
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@22222 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-07-22 00:24:07 +00:00
Julian Smart
a5ae8241de Allow printing objects to be passed a wxWindow, not a wxFrame
(vestigial remains of older wxWin version)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@20735 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-05-26 09:55:28 +00:00
Julian Smart
371a5b4e62 Removed erroneous copyright names and corrected licence spelling
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@19592 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-03-17 10:34:04 +00:00