#include "wx/msgdlg.h"
#endif
+#include "wx/mac/private.h"
+
#include "wx/mac/printmac.h"
#include "wx/dcprint.h"
#include "wx/printdlg.h"
// Create an abort window
wxBeginBusyCursor();
-/*
wxWindow *win = CreateAbortWindow(parent, printout);
- wxYield();
+ wxSafeYield(win,true);
if (!win)
{
wxEndBusyCursor();
wxMessageBox("Sorry, could not create an abort dialog.", "Print Error", wxOK, parent);
delete dc;
+ return FALSE;
}
sm_abortWindow = win;
sm_abortWindow->Show(TRUE);
- wxYield();
-*/
+ wxSafeYield(win,true);
printout->OnBeginPrinting();
}
else
{
+ GrafPtr thePort ;
+ GetPort( &thePort ) ;
+ wxSafeYield(win,true);
+ SetPort( thePort ) ;
+
dc->StartPage();
keepGoing = printout->OnPrintPage(pn);
dc->EndPage();
m_previewPrintout->SetPPIScreen( 72 , 72 ) ;
m_previewPrintout->SetPPIPrinter( 72 , 72 ) ;
- m_previewPrintout->SetPageSizeMM( 8 * 25.6 , 11 * 25.6 ) ;
+ m_previewPrintout->SetPageSizeMM( (int) (8.0 * 25.6), (int) (11.0 * 25.6) );
m_previewPrintout->SetPageSizePixels( 8 * 72 , 11 * 72 ) ;
m_pageWidth = 8 * 72 ;
m_pageHeight = 11 * 72 ;
m_pageWidth = x ;
m_pageHeight = y ;
m_isOk = true ;
-
+ }
+ else
+ {
+ m_isOk = false ;
}
// At 100%, the page should look about page-size on the screen.
// m_previewScale = (float)((float)screenWidth/(float)printerWidth);