- if ( ::PrValidate( native->m_macPrintSettings ) )
- {
- // the driver has changed in the mean time, should we pop up a page setup dialog ?
- if ( !::PrStlDialog( native->m_macPrintSettings ) )
- {
- m_err = -1 ;
- return;
- }
- }
- m_err = PrError() ;
-
- if ( m_err == noErr )
- {
- m_maxX = (**native->m_macPrintSettings).prInfo.rPage.right - (**native->m_macPrintSettings).prInfo.rPage.left ;
- m_maxY = (**native->m_macPrintSettings).prInfo.rPage.bottom - (**native->m_macPrintSettings).prInfo.rPage.top ;
- }
-}
-
-wxMacClassicPrinterDC::~wxMacClassicPrinterDC()
-{
- ::UMAPrClose() ;
- ::SetPort( LMGetWMgrPort() ) ;
-}
-
-bool wxMacClassicPrinterDC::StartDoc( wxPrinterDC* dc , const wxString& WXUNUSED(message) )
-{
- if ( m_err )
- return false ;
-
- wxMacClassicPrintData *native = (wxMacClassicPrintData*) dc->GetPrintData().m_nativePrintData ;
- m_macPrintingPort = ::PrOpenDoc( native->m_macPrintSettings , NULL , NULL ) ;
- m_err = PrError() ;
- if ( m_err )
- return false ;
-
- // sets current port
- dc->m_macPort = (GrafPtr ) m_macPrintingPort ;
- m_maxX = (**native->m_macPrintSettings).prInfo.rPage.right - (**native->m_macPrintSettings).prInfo.rPage.left ;
- m_maxY = (**native->m_macPrintSettings).prInfo.rPage.bottom - (**native->m_macPrintSettings).prInfo.rPage.top ;
- return true ;
-}
-
-void wxMacClassicPrinterDC::EndDoc( wxPrinterDC* dc )
-{
- if ( m_err )
- return ;
-
- PrCloseDoc( m_macPrintingPort ) ;
- m_err = PrError() ;
-}
-
-void wxMacClassicPrinterDC::StartPage( wxPrinterDC* dc )