]> git.saurik.com Git - wxWidgets.git/commitdiff
Began work on print dialogs. Now wxPrintDialog
authorRobert Roebling <robert@roebling.de>
Sat, 16 Oct 2004 22:11:48 +0000 (22:11 +0000)
committerRobert Roebling <robert@roebling.de>
Sat, 16 Oct 2004 22:11:48 +0000 (22:11 +0000)
    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
include/wx/mac/carbon/printdlg.h
include/wx/msw/printdlg.h
include/wx/printdlg.h
include/wx/prntbase.h
src/common/prntbase.cpp
src/generic/prntdlgg.cpp
src/mac/carbon/printdlg.cpp
src/msw/printdlg.cpp

index d0114adf29bc80b47db4792a6e9f169d1e606141..889d88e260f6bbd195474804e6f56199b60ffda7 100644 (file)
@@ -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,
index 6bb45dad2f485963b446df36e0b6a77918eb88f5..57141635927babc411052a4655c02947ca08ac77 100644 (file)
@@ -20,6 +20,7 @@
 
 #include "wx/dialog.h"
 #include "wx/cmndata.h"
+#include "wx/printdlg.h"
 
 /*
  * wxPrinterDialog
  */
 
 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
index 041b389a8e4ab2a82eb5df40941428c4a2aee046..a9104dc3eb14da6d709f3148fd68ad0493881420 100644 (file)
@@ -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
index 2ba6f3a2f01bd53c55b332c7fbd706d7d44c38a1..8f54d9afa1eb62ac4f78d0630e27ea481ee6cd4d 100644 (file)
@@ -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__)
 #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
 
index 05a2284cf34cde56577b08ba61ba529589306c80..f567b1bec14eff534bc426511c33fd40b1e3e002 100644 (file)
@@ -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;
index f889e847fdd6ecfd0e406fc28523265dea9e82c7..512ae64a7192481f244f17d2aa9d645f4950f660 100644 (file)
@@ -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
 //----------------------------------------------------------------------------
index 2b03bcf839c64a7329cbd8cf3790c2ab984fb994..e2dc8e9920b984580f0463ceebcb6aa07ef752a8 100644 (file)
 
 #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();
 }
index 89f2789250c8d9f300fe459544eb2cb0f546a090..5ea1a82e02ca82c6ec561e6e29c12cc8c647f7c1 100644 (file)
 
 // 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() ) ;
 }
index a2c894079b0cf6adff5827c54bbe33d9839c22e2..22b2fafd48f3a30c41b4b9a008f6b39b5680490e 100644 (file)
@@ -36,6 +36,7 @@
     #include "wx/app.h"
 #endif
 
+#include "wx/cmndata.h"
 #include "wx/printdlg.h"
 #include "wx/dcprint.h"
 
     #include <print.h>
 #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;