void wxGenericPageSetupDialog::OnPrinter(wxCommandEvent& WXUNUSED(event)) { // We no longer query GetPrintMode, so we can eliminate the need // to call SetPrintMode. // This has the limitation that we can't explicitly call the PostScript // print setup dialog from the generic Page Setup dialog under Windows, // but since this choice would only happen when trying to do PostScript // printing under Windows (and only in 16-bit Windows which // doesn't have a Windows-specific page setup dialog) it's worth it. // First save the current settings, so the wxPrintData object is up to date. TransferDataFromWindow(); // Transfer the current print settings from this dialog to the page setup dialog. #if 0 // Use print factory later wxPrintDialogData data; data = GetPageSetupData().GetPrintData(); data.SetSetupDialog(true); 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().CalculatePaperSizeFromId(); // Make sure page size reflects the id in wxPrintData // Now update the dialog in case the page setup dialog changed some of our settings. TransferDataToWindow(); #endif }
void wxRichTextPrinting::SetPageSetupData(const wxPageSetupData& pageSetupData) { (*GetPageSetupData()) = pageSetupData; }