From 47dc9f78713d756fe0426a9f747a0f1151323b6a Mon Sep 17 00:00:00 2001 From: Robert Roebling Date: Fri, 13 Sep 2002 22:00:45 +0000 Subject: [PATCH] Further backward comp. changes for printing. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@17165 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/generic/dcpsg.h | 44 +++++++++++++++++++++++++++++++++++ include/wx/generic/printps.h | 10 ++++---- include/wx/generic/prntdlgg.h | 11 ++++----- 3 files changed, 55 insertions(+), 10 deletions(-) diff --git a/include/wx/generic/dcpsg.h b/include/wx/generic/dcpsg.h index d0bf5a34fc..be6dcbfd01 100644 --- a/include/wx/generic/dcpsg.h +++ b/include/wx/generic/dcpsg.h @@ -147,6 +147,50 @@ private: DECLARE_DYNAMIC_CLASS(wxPostScriptDC) }; + +#if WXWIN_COMPATIBILITY_2_2 +// Print Orientation +enum +{ + PS_PORTRAIT = wxPORTRAIT, + PS_LANDSCAPE = wxLANDSCAPE +}; + +// Print Actions +enum +{ + PS_NONE = wxPRINT_MODE_NONE, + PS_PREVIEW = wxPRINT_MODE_PREVIEW, + PS_FILE = wxPRINT_MODE_FILE, + PS_PRINTER = wxPRINT_MODE_PRINTER +}; + +class wxPrintSetupData: public wxPrintData +{ +public: + wxPrintSetupData() {} + + void SetPrinterOrientation( int orient ) + { SetOrientation( orient ); } + void SetPrinterMode( wxPrintMode mode ) + { SetPrintMode( mode ); } + void SetAFMPath( const wxString &path ) + { SetFontMetricPath( path ); } + + void SetPaperName(const wxString& paper) { m_paperName = paper; } + void SetPrinterFile(const wxString& file) { m_printerFile = file; } + wxString GetPaperName() const { return m_paperName; } + wxString GetPrinterFile() const { return m_printerFile; }; + + wxString m_paperName; + wxString m_printerFile; +}; + +WXDLLEXPORT_DATA(extern wxPrintSetupData*) wxThePrintSetupData; +WXDLLEXPORT extern void wxInitializePrintSetupData(bool init = TRUE); +#endif + + #endif // wxUSE_POSTSCRIPT diff --git a/include/wx/generic/printps.h b/include/wx/generic/printps.h index 0921b4b85f..c3d16a02f5 100644 --- a/include/wx/generic/printps.h +++ b/include/wx/generic/printps.h @@ -27,8 +27,6 @@ class WXDLLEXPORT wxPostScriptPrinter : public wxPrinterBase { - DECLARE_DYNAMIC_CLASS(wxPostScriptPrinter) - public: wxPostScriptPrinter(wxPrintDialogData *data = (wxPrintDialogData *) NULL); virtual ~wxPostScriptPrinter(); @@ -36,6 +34,9 @@ public: virtual bool Print(wxWindow *parent, wxPrintout *printout, bool prompt = TRUE); virtual wxDC* PrintDialog(wxWindow *parent); virtual bool Setup(wxWindow *parent); + +private: + DECLARE_DYNAMIC_CLASS(wxPostScriptPrinter) }; // ---------------------------------------------------------------------------- @@ -45,8 +46,6 @@ public: class WXDLLEXPORT wxPostScriptPrintPreview : public wxPrintPreviewBase { - DECLARE_CLASS(wxPostScriptPrintPreview) - public: wxPostScriptPrintPreview(wxPrintout *printout, wxPrintout *printoutForPrinting = (wxPrintout *) NULL, @@ -62,6 +61,9 @@ public: private: void Init(wxPrintout *printout, wxPrintout *printoutForPrinting); + +private: + DECLARE_CLASS(wxPostScriptPrintPreview) }; #endif diff --git a/include/wx/generic/prntdlgg.h b/include/wx/generic/prntdlgg.h index 4cd5d9dadd..f687fb38b6 100644 --- a/include/wx/generic/prntdlgg.h +++ b/include/wx/generic/prntdlgg.h @@ -78,8 +78,6 @@ enum #if wxUSE_POSTSCRIPT class WXDLLEXPORT wxGenericPrintDialog : public wxDialog { - DECLARE_DYNAMIC_CLASS(wxGenericPrintDialog) - public: wxGenericPrintDialog(wxWindow *parent, wxPrintDialogData* data = (wxPrintDialogData*)NULL); @@ -122,12 +120,11 @@ protected: private: DECLARE_EVENT_TABLE() + DECLARE_DYNAMIC_CLASS(wxGenericPrintDialog) }; class WXDLLEXPORT wxGenericPrintSetupDialog : public wxDialog { - DECLARE_CLASS(wxGenericPrintSetupDialog) - public: // There are no configuration options for the dialog, so we // just pass the wxPrintData object (no wxPrintSetupDialogData class needed) @@ -153,14 +150,15 @@ public: wxPrintData m_printData; wxPrintData& GetPrintData() { return m_printData; } #endif // wxUSE_POSTSCRIPT + +private: + DECLARE_CLASS(wxGenericPrintSetupDialog) }; #endif // wxUSE_POSTSCRIPT class WXDLLEXPORT wxGenericPageSetupDialog : public wxDialog { - DECLARE_CLASS(wxGenericPageSetupDialog) - public: wxGenericPageSetupDialog(wxWindow *parent, wxPageSetupData* data = (wxPageSetupData*) NULL); virtual ~wxGenericPageSetupDialog(); @@ -188,6 +186,7 @@ public: private: DECLARE_EVENT_TABLE() + DECLARE_CLASS(wxGenericPageSetupDialog) }; #endif -- 2.45.2