- 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 )
-{
- if ( m_err )
- return ;
-
- wxMacClassicPrintData *native = (wxMacClassicPrintData*) dc->GetPrintData().m_nativePrintData ;
-
- PrOpenPage( m_macPrintingPort , NULL ) ;
- dc->m_macLocalOrigin.x = (**native->m_macPrintSettings).rPaper.left ;
- dc->m_macLocalOrigin.y = (**native->m_macPrintSettings).rPaper.top ;
- // m_macPrintingPort is now the current port
- Rect clip = { -32000 , -32000 , 32000 , 32000 } ;
- ::ClipRect( &clip ) ;
- m_err = PrError() ;
- if ( m_err != noErr )
- ::PrCloseDoc( m_macPrintingPort ) ;
-}
-
-void wxMacClassicPrinterDC::EndPage( wxPrinterDC* dc )
-{
- if ( m_err )
- return ;
-
- PrClosePage( m_macPrintingPort ) ;
- m_err = PrError() ;
- if ( m_err != noErr )
- ::PrCloseDoc( m_macPrintingPort ) ;
-}
-
-#endif
-
-wxPrinterDC::wxPrinterDC(const wxPrintData& printdata)
-{
- m_ok = FALSE ;