+wxWindow *wxPrinterBase::sm_abortWindow = (wxWindow *) NULL;
+bool wxPrinterBase::sm_abortIt = false;
+wxPrinterError wxPrinterBase::sm_lastError = wxPRINTER_NO_ERROR;
+
+wxPrinterBase::~wxPrinterBase()
+{
+}
+
+wxWindow *wxPrinterBase::CreateAbortWindow(wxWindow *parent, wxPrintout * printout)
+{
+ wxPrintAbortDialog *dialog = new wxPrintAbortDialog(parent, _("Printing ") , wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE);
+
+ wxBoxSizer *button_sizer = new wxBoxSizer( wxVERTICAL );
+ button_sizer->Add( new wxStaticText(dialog, wxID_ANY, _("Please wait while printing\n") + printout->GetTitle() ), 0, wxALL, 10 );
+ button_sizer->Add( new wxButton( dialog, wxID_CANCEL, wxT("Cancel") ), 0, wxALL | wxALIGN_CENTER, 10 );
+
+ dialog->SetAutoLayout( true );
+ dialog->SetSizer( button_sizer );
+
+ button_sizer->Fit(dialog);
+ button_sizer->SetSizeHints (dialog) ;
+
+ return dialog;
+}
+
+void wxPrinterBase::ReportError(wxWindow *parent, wxPrintout *WXUNUSED(printout), const wxString& message)
+{
+ wxMessageBox(message, _("Printing Error"), wxOK, parent);
+}
+
+wxPrintDialogData& wxPrinterBase::GetPrintDialogData() const
+{
+ return (wxPrintDialogData&) m_printDialogData;
+}
+
+//----------------------------------------------------------------------------
+// wxPrinter
+//----------------------------------------------------------------------------
+
+IMPLEMENT_CLASS(wxPrinter, wxPrinterBase)
+
+wxPrinter::wxPrinter(wxPrintDialogData *data)
+{
+ m_pimpl = wxPrintFactory::GetFactory()->CreatePrinter( data );
+}
+
+wxPrinter::~wxPrinter()
+{
+ delete m_pimpl;
+}
+
+wxWindow *wxPrinter::CreateAbortWindow(wxWindow *parent, wxPrintout *printout)
+{
+ return m_pimpl->CreateAbortWindow( parent, printout );
+}
+
+void wxPrinter::ReportError(wxWindow *parent, wxPrintout *printout, const wxString& message)
+{
+ m_pimpl->ReportError( parent, printout, message );
+}
+
+bool wxPrinter::Setup(wxWindow *parent)
+{
+ return m_pimpl->Setup( parent );
+}
+
+bool wxPrinter::Print(wxWindow *parent, wxPrintout *printout, bool prompt)
+{
+ return m_pimpl->Print( parent, printout, prompt );
+}
+
+wxDC* wxPrinter::PrintDialog(wxWindow *parent)
+{
+ return m_pimpl->PrintDialog( parent );
+}
+
+wxPrintDialogData& wxPrinter::GetPrintDialogData() const
+{
+ return m_pimpl->GetPrintDialogData();
+}
+
+// ---------------------------------------------------------------------------
+// wxPrintDialogBase: the dialog for printing.
+// ---------------------------------------------------------------------------
+
+IMPLEMENT_ABSTRACT_CLASS(wxPrintDialogBase, wxDialog)
+
+wxPrintDialogBase::wxPrintDialogBase(wxWindow *parent,
+ wxWindowID id,
+ const wxString &title,
+ const wxPoint &pos,
+ const wxSize &size,
+ long style)
+ : wxDialog( parent, id, title.empty() ? wxString(_("Print")) : title,
+ pos, size, style )
+{
+}
+
+// ---------------------------------------------------------------------------
+// wxPrintDialog: the dialog for printing
+// ---------------------------------------------------------------------------
+
+IMPLEMENT_CLASS(wxPrintDialog, wxObject)
+
+wxPrintDialog::wxPrintDialog(wxWindow *parent, wxPrintDialogData* data)