From c061373dc5ba0ed5e3670af0698154302f1fec2c Mon Sep 17 00:00:00 2001 From: Robert Roebling Date: Sat, 16 Oct 2004 22:11:48 +0000 Subject: [PATCH] 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 --- include/wx/generic/prntdlgg.h | 3 +- include/wx/mac/carbon/printdlg.h | 36 ++++++------- include/wx/msw/printdlg.h | 17 +++---- include/wx/printdlg.h | 68 +++++++++++++++++++++++-- include/wx/prntbase.h | 18 ++++++- src/common/prntbase.cpp | 86 ++++++++++++++++++++++++++++++++ src/generic/prntdlgg.cpp | 29 ++++++----- src/mac/carbon/printdlg.cpp | 18 +++---- src/msw/printdlg.cpp | 33 ++++-------- 9 files changed, 228 insertions(+), 80 deletions(-) diff --git a/include/wx/generic/prntdlgg.h b/include/wx/generic/prntdlgg.h index d0114adf29..889d88e260 100644 --- a/include/wx/generic/prntdlgg.h +++ b/include/wx/generic/prntdlgg.h @@ -23,6 +23,7 @@ #include "wx/dialog.h" #include "wx/cmndata.h" +#include "wx/printdlg.h" #if wxUSE_POSTSCRIPT #include "wx/dcps.h" @@ -76,7 +77,7 @@ enum // ---------------------------------------------------------------------------- #if wxUSE_POSTSCRIPT -class WXDLLEXPORT wxGenericPrintDialog : public wxDialog +class WXDLLEXPORT wxGenericPrintDialog : public wxPrintDialogBase { public: wxGenericPrintDialog(wxWindow *parent, diff --git a/include/wx/mac/carbon/printdlg.h b/include/wx/mac/carbon/printdlg.h index 6bb45dad2f..5714163592 100644 --- a/include/wx/mac/carbon/printdlg.h +++ b/include/wx/mac/carbon/printdlg.h @@ -20,6 +20,7 @@ #include "wx/dialog.h" #include "wx/cmndata.h" +#include "wx/printdlg.h" /* * wxPrinterDialog @@ -27,28 +28,29 @@ */ class WXDLLEXPORT wxDC; -class WXDLLEXPORT wxPrintDialog: public wxDialog +class WXDLLEXPORT wxMacPrintDialog: public wxPrintDialogBase { - DECLARE_DYNAMIC_CLASS(wxPrintDialog) - - public: - wxPrintDialog(); - wxPrintDialog(wxWindow *parent, wxPrintDialogData* data = NULL); - wxPrintDialog(wxWindow *parent, wxPrintData* data ); - ~wxPrintDialog(); +public: + wxMacPrintDialog(); + wxMacPrintDialog(wxWindow *parent, wxPrintDialogData* data = NULL); + wxMacPrintDialog(wxWindow *parent, wxPrintData* data ); + ~wxMacPrintDialog(); bool Create(wxWindow *parent, wxPrintDialogData* data = NULL); - virtual int ShowModal(); + virtual int ShowModal(); - wxPrintDialogData& GetPrintDialogData() { return m_printDialogData; } - wxPrintData& GetPrintData() { return m_printDialogData.GetPrintData(); } - virtual wxDC *GetPrintDC(); + virtual wxPrintDialogData& GetPrintDialogData() { return m_printDialogData; } + virtual wxPrintData& GetPrintData() { return m_printDialogData.GetPrintData(); } + virtual wxDC *GetPrintDC(); - private: - wxPrintDialogData m_printDialogData; - wxDC* m_printerDC; - bool m_destroyDC; - wxWindow* m_dialogParent; +private: + wxPrintDialogData m_printDialogData; + wxDC* m_printerDC; + bool m_destroyDC; + wxWindow* m_dialogParent; + +private: + DECLARE_DYNAMIC_CLASS(wxPrintDialog) }; class WXDLLEXPORT wxPageSetupDialog: public wxDialog diff --git a/include/wx/msw/printdlg.h b/include/wx/msw/printdlg.h index 041b389a8e..a9104dc3eb 100644 --- a/include/wx/msw/printdlg.h +++ b/include/wx/msw/printdlg.h @@ -20,6 +20,7 @@ #include "wx/dialog.h" #include "wx/cmndata.h" +#include "wx/printdlg.h" class WXDLLEXPORT wxDC; @@ -27,15 +28,12 @@ class WXDLLEXPORT wxDC; // wxPrinterDialog: the common dialog for printing. // --------------------------------------------------------------------------- -class WXDLLEXPORT wxPrintDialog : public wxDialog +class WXDLLEXPORT wxWindowsPrintDialog : public wxPrintDialogBase { - DECLARE_DYNAMIC_CLASS(wxPrintDialog) - public: - wxPrintDialog(); - wxPrintDialog(wxWindow *parent, wxPrintDialogData* data = NULL); - wxPrintDialog(wxWindow *parent, wxPrintData* data); - virtual ~wxPrintDialog(); + wxWindowsPrintDialog(wxWindow *parent, wxPrintDialogData* data = NULL); + wxWindowsPrintDialog(wxWindow *parent, wxPrintData* data); + virtual ~wxWindowsPrintDialog(); bool Create(wxWindow *parent, wxPrintDialogData* data = NULL); virtual int ShowModal(); @@ -44,13 +42,14 @@ public: wxPrintData& GetPrintData() { return m_printDialogData.GetPrintData(); } virtual wxDC *GetPrintDC(); -private: wxPrintDialogData m_printDialogData; wxDC* m_printerDC; bool m_destroyDC; wxWindow* m_dialogParent; - DECLARE_NO_COPY_CLASS(wxPrintDialog) +private: + DECLARE_NO_COPY_CLASS(wxWindowsPrintDialog) + DECLARE_CLASS(wxWindowsPrintDialog) }; class WXDLLEXPORT wxPageSetupDialog: public wxDialog diff --git a/include/wx/printdlg.h b/include/wx/printdlg.h index 2ba6f3a2f0..8f54d9afa1 100644 --- a/include/wx/printdlg.h +++ b/include/wx/printdlg.h @@ -1,6 +1,71 @@ #ifndef _WX_PRINTDLG_H_BASE_ #define _WX_PRINTDLG_H_BASE_ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) + #pragma interface "printdlg.h" +#endif + +#include "wx/defs.h" + +#if wxUSE_PRINTING_ARCHITECTURE + +#include "wx/event.h" +#include "wx/dialog.h" +#include "wx/intl.h" +#include "wx/cmndata.h" + + +// --------------------------------------------------------------------------- +// wxPrintDialogBase: interface for the common dialog for printing. +// --------------------------------------------------------------------------- + +class WXDLLEXPORT wxPrintDialogBase : public wxDialog +{ +public: + wxPrintDialogBase() { } + wxPrintDialogBase(wxWindow *parent, wxWindowID id = -1, const wxString &title = _("Print"), + const wxPoint &pos = wxDefaultPosition, + const wxSize &size = wxDefaultSize, + long style = wxDEFAULT_DIALOG_STYLE ); + + virtual int ShowModal() = 0; + + virtual wxPrintDialogData& GetPrintDialogData() = 0; + virtual wxPrintData& GetPrintData() = 0; + virtual wxDC *GetPrintDC() = 0; + +private: + DECLARE_ABSTRACT_CLASS(wxPrintDialogBase) + DECLARE_NO_COPY_CLASS(wxPrintDialogBase) +}; + +// --------------------------------------------------------------------------- +// wxPrintDialog: the common dialog for printing. +// --------------------------------------------------------------------------- + +class WXDLLEXPORT wxPrintDialog : public wxObject +{ +public: + wxPrintDialog(wxWindow *parent, wxPrintDialogData* data = NULL); + wxPrintDialog(wxWindow *parent, wxPrintData* data); + ~wxPrintDialog(); + + virtual int ShowModal(); + + virtual wxPrintDialogData& GetPrintDialogData(); + virtual wxPrintData& GetPrintData(); + virtual wxDC *GetPrintDC(); + +private: + wxPrintDialogBase *m_pimpl; + +private: + DECLARE_DYNAMIC_CLASS(wxPrintDialog) + DECLARE_NO_COPY_CLASS(wxPrintDialog) +}; + +#endif + #if defined(__WXUNIVERSAL__) && (!defined(__WXMSW__) || wxUSE_POSTSCRIPT_ARCHITECTURE_IN_MSW) #include "wx/generic/prntdlgg.h" #elif defined(__WXMSW__) @@ -20,10 +85,7 @@ #endif #if (defined(__WXUNIVERSAL__) && (!defined(__WXMSW__) || wxUSE_POSTSCRIPT_ARCHITECTURE_IN_MSW) ) || (!defined(__WXMSW__) && !defined(__WXMAC__)) -#define wxPrintDialog wxGenericPrintDialog - #define wxPrintSetupDialog wxGenericPrintSetupDialog - #define wxPageSetupDialog wxGenericPageSetupDialog #endif diff --git a/include/wx/prntbase.h b/include/wx/prntbase.h index 05a2284cf3..f567b1bec1 100644 --- a/include/wx/prntbase.h +++ b/include/wx/prntbase.h @@ -33,6 +33,7 @@ class WXDLLEXPORT wxChoice; class WXDLLEXPORT wxPrintout; class WXDLLEXPORT wxPrinterBase; class WXDLLEXPORT wxPrintDialog; +class WXDLLEXPORT wxPrintDialogBase; class WXDLLEXPORT wxPrintPreviewBase; class WXDLLEXPORT wxPreviewCanvas; class WXDLLEXPORT wxPreviewControlBar; @@ -64,12 +65,18 @@ public: virtual bool HasPrintSetupDialog() = 0; virtual wxPrinterBase *CreatePrinter( wxPrintDialogData* data ) = 0; + virtual wxPrintPreviewBase *CreatePrintPreview( wxPrintout *preview, wxPrintout *printout = NULL, wxPrintDialogData *data = NULL ) = 0; virtual wxPrintPreviewBase *CreatePrintPreview( wxPrintout *preview, wxPrintout *printout, wxPrintData *data ) = 0; + + virtual wxPrintDialogBase *CreatePrintDialog( wxWindow *parent, + wxPrintDialogData *data = NULL ) = 0; + virtual wxPrintDialogBase *CreatePrintDialog( wxWindow *parent, + wxPrintData *data ) = 0; static void SetPrintFactory( wxPrintFactory *factory ); static wxPrintFactory *GetFactory(); @@ -85,12 +92,18 @@ public: { return true; } virtual wxPrinterBase *CreatePrinter( wxPrintDialogData *data ); + virtual wxPrintPreviewBase *CreatePrintPreview( wxPrintout *preview, wxPrintout *printout = NULL, wxPrintDialogData *data = NULL ); virtual wxPrintPreviewBase *CreatePrintPreview( wxPrintout *preview, wxPrintout *printout, wxPrintData *data ); + + virtual wxPrintDialogBase *CreatePrintDialog( wxWindow *parent, + wxPrintDialogData *data = NULL ); + virtual wxPrintDialogBase *CreatePrintDialog( wxWindow *parent, + wxPrintData *data ); }; //---------------------------------------------------------------------------- @@ -110,8 +123,7 @@ public: virtual wxWindow *CreateAbortWindow(wxWindow *parent, wxPrintout *printout); virtual void ReportError(wxWindow *parent, wxPrintout *printout, const wxString& message); - wxPrintDialogData& GetPrintDialogData() const - { return (wxPrintDialogData&) m_printDialogData; } + virtual wxPrintDialogData& GetPrintDialogData() const; bool GetAbort() const { return sm_abortIt; } static wxPrinterError GetLastError() { return sm_lastError; } @@ -154,6 +166,8 @@ public: virtual bool Setup(wxWindow *parent); virtual bool Print(wxWindow *parent, wxPrintout *printout, bool prompt = true); virtual wxDC* PrintDialog(wxWindow *parent); + + virtual wxPrintDialogData& GetPrintDialogData() const; protected: wxPrinterBase *m_pimpl; diff --git a/src/common/prntbase.cpp b/src/common/prntbase.cpp index f889e847fd..512ae64a71 100644 --- a/src/common/prntbase.cpp +++ b/src/common/prntbase.cpp @@ -121,6 +121,30 @@ wxPrintPreviewBase *wxNativePrintFactory::CreatePrintPreview( wxPrintout *previe #endif } +wxPrintDialogBase *wxNativePrintFactory::CreatePrintDialog( wxWindow *parent, + wxPrintDialogData *data ) +{ +#if defined(__WXMSW__) && !defined(__WXUNIVERSAL__) + return new wxWindowsPrintDialog( parent, data ); +#elif defined(__WXMAC__) + return new wxMacPrintDialog( parent, data ); +#else + return new wxGenericPrintDialog( parent, data ); +#endif +} + +wxPrintDialogBase *wxNativePrintFactory::CreatePrintDialog( wxWindow *parent, + wxPrintData *data ) +{ +#if defined(__WXMSW__) && !defined(__WXUNIVERSAL__) + return new wxWindowsPrintDialog( parent, data ); +#elif defined(__WXMAC__) + return new wxMacPrintDialog( parent, data ); +#else + return new wxGenericPrintDialog( parent, data ); +#endif +} + //---------------------------------------------------------------------------- // wxPrinterBase //---------------------------------------------------------------------------- @@ -167,6 +191,11 @@ void wxPrinterBase::ReportError(wxWindow *parent, wxPrintout *WXUNUSED(printout) wxMessageBox(message, _("Printing Error"), wxOK, parent); } +wxPrintDialogData& wxPrinterBase::GetPrintDialogData() const +{ + return (wxPrintDialogData&) m_printDialogData; +} + //---------------------------------------------------------------------------- // wxPrinter //---------------------------------------------------------------------------- @@ -208,6 +237,63 @@ wxDC* wxPrinter::PrintDialog(wxWindow *parent) return m_pimpl->PrintDialog( parent ); } +wxPrintDialogData& wxPrinter::GetPrintDialogData() const +{ + return m_pimpl->GetPrintDialogData(); +} + +// --------------------------------------------------------------------------- +// wxPrintDialogBase: the common dialog for printing. +// --------------------------------------------------------------------------- + +IMPLEMENT_ABSTRACT_CLASS(wxPrintDialogBase, wxObject) + +wxPrintDialogBase::wxPrintDialogBase(wxWindow *parent, wxWindowID id, + const wxString &title, const wxPoint &pos, const wxSize &size, long style ) : + wxDialog( parent, id, title, pos, size, style ) +{ +} + +// --------------------------------------------------------------------------- +// wxPrintDialog: the common dialog for printing. +// --------------------------------------------------------------------------- + +IMPLEMENT_CLASS(wxPrintDialog, wxObject) + +wxPrintDialog::wxPrintDialog(wxWindow *parent, wxPrintDialogData* data) +{ + m_pimpl = wxPrintFactory::GetFactory()->CreatePrintDialog( parent, data ); +} + +wxPrintDialog::wxPrintDialog(wxWindow *parent, wxPrintData* data) +{ + m_pimpl = wxPrintFactory::GetFactory()->CreatePrintDialog( parent, data ); +} + +wxPrintDialog::~wxPrintDialog() +{ + delete m_pimpl; +} + +int wxPrintDialog::ShowModal() +{ + return m_pimpl->ShowModal(); +} + +wxPrintDialogData& wxPrintDialog::GetPrintDialogData() +{ + return m_pimpl->GetPrintDialogData(); +} + +wxPrintData& wxPrintDialog::GetPrintData() +{ + return m_pimpl->GetPrintData(); +} +wxDC *wxPrintDialog::GetPrintDC() +{ + return m_pimpl->GetPrintDC(); +} + //---------------------------------------------------------------------------- // wxPrintAbortDialog //---------------------------------------------------------------------------- diff --git a/src/generic/prntdlgg.cpp b/src/generic/prntdlgg.cpp index 2b03bcf839..e2dc8e9920 100644 --- a/src/generic/prntdlgg.cpp +++ b/src/generic/prntdlgg.cpp @@ -73,15 +73,8 @@ #if wxUSE_POSTSCRIPT -IMPLEMENT_CLASS(wxGenericPrintDialog, wxDialog) IMPLEMENT_CLASS(wxGenericPrintSetupDialog, wxDialog) -BEGIN_EVENT_TABLE(wxGenericPrintDialog, wxDialog) - EVT_BUTTON(wxID_OK, wxGenericPrintDialog::OnOK) - EVT_BUTTON(wxPRINTID_SETUP, wxGenericPrintDialog::OnSetup) - EVT_RADIOBOX(wxPRINTID_RANGE, wxGenericPrintDialog::OnRange) -END_EVENT_TABLE() - #endif // wxUSE_POSTSCRIPT IMPLEMENT_CLASS(wxGenericPageSetupDialog, wxDialog) @@ -102,9 +95,17 @@ extern wxPrintPaperDatabase *wxThePrintPaperDatabase; // Generic print dialog for non-Windows printing use. // ---------------------------------------------------------------------------- +IMPLEMENT_CLASS(wxGenericPrintDialog, wxPrintDialogBase) + +BEGIN_EVENT_TABLE(wxGenericPrintDialog, wxPrintDialogBase) + EVT_BUTTON(wxID_OK, wxGenericPrintDialog::OnOK) + EVT_BUTTON(wxPRINTID_SETUP, wxGenericPrintDialog::OnSetup) + EVT_RADIOBOX(wxPRINTID_RANGE, wxGenericPrintDialog::OnRange) +END_EVENT_TABLE() + wxGenericPrintDialog::wxGenericPrintDialog(wxWindow *parent, wxPrintDialogData* data) - : wxDialog(parent, wxID_ANY, _("Print"), + : wxPrintDialogBase(parent, wxID_ANY, _("Print"), wxPoint(0, 0), wxSize(600, 600), wxDEFAULT_DIALOG_STYLE | wxTAB_TRAVERSAL) @@ -117,7 +118,7 @@ wxGenericPrintDialog::wxGenericPrintDialog(wxWindow *parent, wxGenericPrintDialog::wxGenericPrintDialog(wxWindow *parent, wxPrintData* data) - : wxDialog(parent, wxID_ANY, _("Print"), + : wxPrintDialogBase(parent, wxID_ANY, _("Print"), wxPoint(0, 0), wxSize(600, 600), wxDEFAULT_DIALOG_STYLE | wxTAB_TRAVERSAL) @@ -228,7 +229,7 @@ int wxGenericPrintDialog::ShowModal() // Transfer settings to the print dialog's print data. m_printDialogData.GetPrintData() = genericPrintSetupDialog->GetPrintData(); } - genericPrintSetupDialog->Destroy(); + // genericPrintSetupDialog->Destroy(); // Restore the wxPrintData settings again (uncomment if any settings become common // to both dialogs) @@ -575,16 +576,14 @@ void wxGenericPageSetupDialog::OnPrinter(wxCommandEvent& WXUNUSED(event)) wxPrintDialogData data; data = GetPageSetupData().GetPrintData(); data.SetSetupDialog(true); - wxPrintDialog *printDialog = new wxPrintDialog(this, & data); - printDialog->ShowModal(); + wxPrintDialog printDialog(this, & data); + printDialog.ShowModal(); // Transfer the page setup print settings from the page dialog to this dialog again, in case // the page setup dialog changed something. - GetPageSetupData().GetPrintData() = printDialog->GetPrintDialogData().GetPrintData(); + GetPageSetupData().GetPrintData() = printDialog.GetPrintDialogData().GetPrintData(); GetPageSetupData().CalculatePaperSizeFromId(); // Make sure page size reflects the id in wxPrintData - printDialog->Destroy(); - // Now update the dialog in case the page setup dialog changed some of our settings. TransferDataToWindow(); } diff --git a/src/mac/carbon/printdlg.cpp b/src/mac/carbon/printdlg.cpp index 89f2789250..5ea1a82e02 100644 --- a/src/mac/carbon/printdlg.cpp +++ b/src/mac/carbon/printdlg.cpp @@ -21,24 +21,22 @@ // Use generic page setup dialog: use your own native one if one exists. -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxPrintDialog, wxDialog) +IMPLEMENT_DYNAMIC_CLASS(wxMacPrintDialog, wxPrintDialogBase) IMPLEMENT_CLASS(wxPageSetupDialog, wxDialog) -#endif -wxPrintDialog::wxPrintDialog() +wxMacPrintDialog::wxMacPrintDialog() { m_dialogParent = NULL; m_printerDC = NULL; m_destroyDC = TRUE; } -wxPrintDialog::wxPrintDialog(wxWindow *p, wxPrintDialogData* data) +wxMacPrintDialog::wxMacPrintDialog(wxWindow *p, wxPrintDialogData* data) { Create(p, data); } -wxPrintDialog::wxPrintDialog(wxWindow *p, wxPrintData* data) +wxMacPrintDialog::wxMacPrintDialog(wxWindow *p, wxPrintData* data) { wxPrintDialogData data2; if ( data ) @@ -47,7 +45,7 @@ wxPrintDialog::wxPrintDialog(wxWindow *p, wxPrintData* data) Create(p, &data2); } -bool wxPrintDialog::Create(wxWindow *p, wxPrintDialogData* data) +bool wxMacPrintDialog::Create(wxWindow *p, wxPrintDialogData* data) { m_dialogParent = p; m_printerDC = NULL; @@ -59,7 +57,7 @@ bool wxPrintDialog::Create(wxWindow *p, wxPrintDialogData* data) return TRUE; } -wxPrintDialog::~wxPrintDialog() +wxMacPrintDialog::~wxMacPrintDialog() { if (m_destroyDC && m_printerDC) { delete m_printerDC; @@ -67,7 +65,7 @@ wxPrintDialog::~wxPrintDialog() } } -int wxPrintDialog::ShowModal() +int wxMacPrintDialog::ShowModal() { m_printDialogData.ConvertToNative() ; int result = m_printDialogData.GetPrintData().m_nativePrintData->ShowPrintDialog() ; @@ -77,7 +75,7 @@ int wxPrintDialog::ShowModal() return result ; } -wxDC *wxPrintDialog::GetPrintDC() +wxDC *wxMacPrintDialog::GetPrintDC() { return new wxPrinterDC( m_printDialogData.GetPrintData() ) ; } diff --git a/src/msw/printdlg.cpp b/src/msw/printdlg.cpp index a2c894079b..22b2fafd48 100644 --- a/src/msw/printdlg.cpp +++ b/src/msw/printdlg.cpp @@ -36,6 +36,7 @@ #include "wx/app.h" #endif +#include "wx/cmndata.h" #include "wx/printdlg.h" #include "wx/dcprint.h" @@ -49,34 +50,18 @@ #include #endif -// --------------------------------------------------------------------------- -// wxWin macros -// --------------------------------------------------------------------------- - - IMPLEMENT_DYNAMIC_CLASS(wxPrintDialog, wxDialog) - IMPLEMENT_CLASS(wxPageSetupDialog, wxDialog) - -// =========================================================================== -// implementation -// =========================================================================== - // --------------------------------------------------------------------------- // wxPrintDialog // --------------------------------------------------------------------------- -wxPrintDialog::wxPrintDialog() -{ - m_dialogParent = NULL; - m_printerDC = NULL; - m_destroyDC = true; -} +IMPLEMENT_CLASS(wxWindowsPrintDialog, wxPrintDialogBase) -wxPrintDialog::wxPrintDialog(wxWindow *p, wxPrintDialogData* data) +wxWindowsPrintDialog::wxWindowsPrintDialog(wxWindow *p, wxPrintDialogData* data) { Create(p, data); } -wxPrintDialog::wxPrintDialog(wxWindow *p, wxPrintData* data) +wxWindowsPrintDialog::wxWindowsPrintDialog(wxWindow *p, wxPrintData* data) { wxPrintDialogData data2; if ( data ) @@ -85,7 +70,7 @@ wxPrintDialog::wxPrintDialog(wxWindow *p, wxPrintData* data) Create(p, &data2); } -bool wxPrintDialog::Create(wxWindow *p, wxPrintDialogData* data) +bool wxWindowsPrintDialog::Create(wxWindow *p, wxPrintDialogData* data) { m_dialogParent = p; m_printerDC = NULL; @@ -99,13 +84,13 @@ bool wxPrintDialog::Create(wxWindow *p, wxPrintDialogData* data) return true; } -wxPrintDialog::~wxPrintDialog() +wxWindowsPrintDialog::~wxWindowsPrintDialog() { if (m_destroyDC && m_printerDC) delete m_printerDC; } -int wxPrintDialog::ShowModal() +int wxWindowsPrintDialog::ShowModal() { m_printDialogData.ConvertToNative(); @@ -134,7 +119,7 @@ int wxPrintDialog::ShowModal() } } -wxDC *wxPrintDialog::GetPrintDC() +wxDC *wxWindowsPrintDialog::GetPrintDC() { if (m_printerDC) { @@ -149,6 +134,8 @@ wxDC *wxPrintDialog::GetPrintDC() // wxPageSetupDialog // --------------------------------------------------------------------------- +IMPLEMENT_CLASS(wxPageSetupDialog, wxDialog) + wxPageSetupDialog::wxPageSetupDialog() { m_dialogParent = NULL; -- 2.45.2