+#include "wx/dc.h"
+
+class WXDLLIMPEXP_FWD_CORE wxDC;
+class WXDLLIMPEXP_FWD_CORE wxButton;
+class WXDLLIMPEXP_FWD_CORE wxChoice;
+class WXDLLIMPEXP_FWD_CORE wxPrintout;
+class WXDLLIMPEXP_FWD_CORE wxPrinterBase;
+class WXDLLIMPEXP_FWD_CORE wxPrintDialogBase;
+class WXDLLIMPEXP_FWD_CORE wxPrintDialog;
+class WXDLLIMPEXP_FWD_CORE wxPageSetupDialogBase;
+class WXDLLIMPEXP_FWD_CORE wxPageSetupDialog;
+class WXDLLIMPEXP_FWD_CORE wxPrintPreviewBase;
+class WXDLLIMPEXP_FWD_CORE wxPreviewCanvas;
+class WXDLLIMPEXP_FWD_CORE wxPreviewControlBar;
+class WXDLLIMPEXP_FWD_CORE wxPreviewFrame;
+class WXDLLIMPEXP_FWD_CORE wxPrintFactory;
+class WXDLLIMPEXP_FWD_CORE wxPrintNativeDataBase;
+
+//----------------------------------------------------------------------------
+// error consts
+//----------------------------------------------------------------------------
+
+enum wxPrinterError
+{
+ wxPRINTER_NO_ERROR = 0,
+ wxPRINTER_CANCELLED,
+ wxPRINTER_ERROR
+};
+
+//----------------------------------------------------------------------------
+// wxPrintFactory
+//----------------------------------------------------------------------------
+
+class WXDLLIMPEXP_CORE wxPrintFactory
+{
+public:
+ wxPrintFactory() {}
+ virtual ~wxPrintFactory() {}
+
+ 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;
+
+ virtual wxPageSetupDialogBase *CreatePageSetupDialog( wxWindow *parent,
+ wxPageSetupDialogData * data = NULL ) = 0;
+
+ virtual wxDCImpl* CreatePrinterDCImpl( wxPrinterDC *owner, const wxPrintData& data ) = 0;
+
+ // What to do and what to show in the wxPrintDialog
+ // a) Use the generic print setup dialog or a native one?
+ virtual bool HasPrintSetupDialog() = 0;
+ virtual wxDialog *CreatePrintSetupDialog( wxWindow *parent, wxPrintData *data ) = 0;
+ // b) Provide the "print to file" option ourselves or via print setup?
+ virtual bool HasOwnPrintToFile() = 0;
+ // c) Show current printer
+ virtual bool HasPrinterLine() = 0;
+ virtual wxString CreatePrinterLine() = 0;
+ // d) Show Status line for current printer?
+ virtual bool HasStatusLine() = 0;
+ virtual wxString CreateStatusLine() = 0;
+
+
+ virtual wxPrintNativeDataBase *CreatePrintNativeData() = 0;
+
+ static void SetPrintFactory( wxPrintFactory *factory );
+ static wxPrintFactory *GetFactory();
+private:
+ static wxPrintFactory *m_factory;
+};