+void wxPrintData::SetPrinterScaleX(double WXUNUSED_WITHOUT_PS(x))
+{
+#if wxUSE_POSTSCRIPT
+ if (m_nativeData && wxIsKindOf(m_nativeData,wxPostScriptPrintNativeData))
+ ((wxPostScriptPrintNativeData*)m_nativeData)->SetPrinterScaleX( x );
+#endif
+}
+
+void wxPrintData::SetPrinterScaleY(double WXUNUSED_WITHOUT_PS(y))
+{
+#if wxUSE_POSTSCRIPT
+ if (m_nativeData && wxIsKindOf(m_nativeData,wxPostScriptPrintNativeData))
+ ((wxPostScriptPrintNativeData*)m_nativeData)->SetPrinterScaleY( y );
+#endif
+}
+
+void wxPrintData::SetPrinterScaling(double WXUNUSED_WITHOUT_PS(x), double WXUNUSED_WITHOUT_PS(y))
+{
+#if wxUSE_POSTSCRIPT
+ if (m_nativeData && wxIsKindOf(m_nativeData,wxPostScriptPrintNativeData))
+ ((wxPostScriptPrintNativeData*)m_nativeData)->SetPrinterScaling( x, y );
+#endif
+}
+
+void wxPrintData::SetPrinterTranslateX(long WXUNUSED_WITHOUT_PS(x))
+{
+#if wxUSE_POSTSCRIPT
+ if (m_nativeData && wxIsKindOf(m_nativeData,wxPostScriptPrintNativeData))
+ ((wxPostScriptPrintNativeData*)m_nativeData)->SetPrinterTranslateX( x );
+#endif
+}
+
+void wxPrintData::SetPrinterTranslateY(long WXUNUSED_WITHOUT_PS(y))
+{
+#if wxUSE_POSTSCRIPT
+ if (m_nativeData && wxIsKindOf(m_nativeData,wxPostScriptPrintNativeData))
+ ((wxPostScriptPrintNativeData*)m_nativeData)->SetPrinterTranslateY( y );
+#endif
+}
+
+void wxPrintData::SetPrinterTranslation(long WXUNUSED_WITHOUT_PS(x), long WXUNUSED_WITHOUT_PS(y))
+{
+#if wxUSE_POSTSCRIPT
+ if (m_nativeData && wxIsKindOf(m_nativeData,wxPostScriptPrintNativeData))
+ ((wxPostScriptPrintNativeData*)m_nativeData)->SetPrinterTranslation( x, y );
+#endif
+}
+#endif
+
+// ----------------------------------------------------------------------------
+// Print dialog data
+// ----------------------------------------------------------------------------
+
+wxPrintDialogData::wxPrintDialogData()
+{
+ m_printFromPage = 0;
+ m_printToPage = 0;
+ m_printMinPage = 0;
+ m_printMaxPage = 0;
+ m_printNoCopies = 1;
+ m_printAllPages = false;
+ m_printCollate = false;
+ m_printToFile = false;
+ m_printSelection = false;
+ m_printEnableSelection = false;
+ m_printEnablePageNumbers = true;
+
+ wxPrintFactory* factory = wxPrintFactory::GetFactory();
+ m_printEnablePrintToFile = ! factory->HasOwnPrintToFile();
+
+ m_printEnableHelp = false;
+#if WXWIN_COMPATIBILITY_2_4
+ m_printSetupDialog = false;
+#endif
+}
+
+wxPrintDialogData::wxPrintDialogData(const wxPrintDialogData& dialogData)
+ : wxObject()
+{
+ (*this) = dialogData;
+}
+
+wxPrintDialogData::wxPrintDialogData(const wxPrintData& printData)
+{
+ m_printFromPage = 1;
+ m_printToPage = 0;
+ m_printMinPage = 1;
+ m_printMaxPage = 9999;
+ m_printNoCopies = 1;
+ m_printAllPages = false;
+ m_printCollate = false;
+ m_printToFile = false;
+ m_printSelection = false;
+ m_printEnableSelection = false;
+ m_printEnablePageNumbers = true;
+ m_printEnablePrintToFile = true;
+ m_printEnableHelp = false;
+#if WXWIN_COMPATIBILITY_2_4
+ m_printSetupDialog = false;
+#endif
+ m_printData = printData;
+}
+
+wxPrintDialogData::~wxPrintDialogData()
+{
+}
+
+void wxPrintDialogData::operator=(const wxPrintDialogData& data)
+{
+ m_printFromPage = data.m_printFromPage;
+ m_printToPage = data.m_printToPage;
+ m_printMinPage = data.m_printMinPage;
+ m_printMaxPage = data.m_printMaxPage;
+ m_printNoCopies = data.m_printNoCopies;
+ m_printAllPages = data.m_printAllPages;
+ m_printCollate = data.m_printCollate;
+ m_printToFile = data.m_printToFile;
+ m_printSelection = data.m_printSelection;
+ m_printEnableSelection = data.m_printEnableSelection;
+ m_printEnablePageNumbers = data.m_printEnablePageNumbers;
+ m_printEnableHelp = data.m_printEnableHelp;
+ m_printEnablePrintToFile = data.m_printEnablePrintToFile;
+#if WXWIN_COMPATIBILITY_2_4
+ m_printSetupDialog = data.m_printSetupDialog;
+#endif
+ m_printData = data.m_printData;
+}
+
+void wxPrintDialogData::operator=(const wxPrintData& data)
+{
+ m_printData = data;
+}
+
+// ----------------------------------------------------------------------------
+// wxPageSetupDialogData
+// ----------------------------------------------------------------------------
+
+wxPageSetupDialogData::wxPageSetupDialogData()
+{
+ m_paperSize = wxSize(0,0);
+
+ CalculatePaperSizeFromId();
+
+ m_minMarginTopLeft =
+ m_minMarginBottomRight =
+ m_marginTopLeft =
+ m_marginBottomRight = wxPoint(0,0);
+
+ // Flags
+ m_defaultMinMargins = false;
+ m_enableMargins = true;
+ m_enableOrientation = true;
+ m_enablePaper = true;
+ m_enablePrinter = true;
+ m_enableHelp = false;
+ m_getDefaultInfo = false;
+}
+
+wxPageSetupDialogData::wxPageSetupDialogData(const wxPageSetupDialogData& dialogData)
+ : wxObject()
+{
+ (*this) = dialogData;
+}
+
+wxPageSetupDialogData::wxPageSetupDialogData(const wxPrintData& printData)
+{
+ m_paperSize = wxSize(0,0);
+ m_minMarginTopLeft =
+ m_minMarginBottomRight =
+ m_marginTopLeft =
+ m_marginBottomRight = wxPoint(0,0);
+
+ // Flags
+ m_defaultMinMargins = false;
+ m_enableMargins = true;
+ m_enableOrientation = true;
+ m_enablePaper = true;
+ m_enablePrinter = true;
+ m_enableHelp = false;
+ m_getDefaultInfo = false;
+
+ m_printData = printData;
+
+ // The wxPrintData paper size overrides these values, unless the size cannot
+ // be found.
+ CalculatePaperSizeFromId();
+}
+
+wxPageSetupDialogData::~wxPageSetupDialogData()
+{
+}
+
+wxPageSetupDialogData& wxPageSetupDialogData::operator=(const wxPageSetupDialogData& data)
+{
+ m_paperSize = data.m_paperSize;
+ m_minMarginTopLeft = data.m_minMarginTopLeft;
+ m_minMarginBottomRight = data.m_minMarginBottomRight;
+ m_marginTopLeft = data.m_marginTopLeft;
+ m_marginBottomRight = data.m_marginBottomRight;
+ m_defaultMinMargins = data.m_defaultMinMargins;
+ m_enableMargins = data.m_enableMargins;
+ m_enableOrientation = data.m_enableOrientation;
+ m_enablePaper = data.m_enablePaper;
+ m_enablePrinter = data.m_enablePrinter;
+ m_getDefaultInfo = data.m_getDefaultInfo;
+ m_enableHelp = data.m_enableHelp;
+
+ m_printData = data.m_printData;
+
+ return *this;
+}
+
+wxPageSetupDialogData& wxPageSetupDialogData::operator=(const wxPrintData& data)
+{
+ m_printData = data;
+ CalculatePaperSizeFromId();
+
+ return *this;
+}
+
+// If a corresponding paper type is found in the paper database, will set the m_printData
+// paper size id member as well.
+void wxPageSetupDialogData::SetPaperSize(const wxSize& sz)
+{
+ m_paperSize = sz;
+
+ CalculateIdFromPaperSize();
+}
+
+// Sets the wxPrintData id, plus the paper width/height if found in the paper database.
+void wxPageSetupDialogData::SetPaperSize(wxPaperSize id)
+{
+ m_printData.SetPaperId(id);
+
+ CalculatePaperSizeFromId();