- PMSessionEndDocument(native->m_macPrintSession);
- }
-}
-
-#else
-
-class wxMacClassicPrinterDC : public wxNativePrinterDC
-{
-public :
- wxMacClassicPrinterDC( wxPrintData* data ) ;
- ~wxMacClassicPrinterDC() ;
- virtual bool StartDoc( wxPrinterDC* dc , const wxString& message ) ;
- virtual void EndDoc( wxPrinterDC* dc ) ;
- virtual void StartPage( wxPrinterDC* dc ) ;
- virtual void EndPage( wxPrinterDC* dc ) ;
- virtual wxCoord GetMaxX() const { return m_maxX ; }
- virtual wxCoord GetMaxY() const { return m_maxY ; }
- virtual wxUint32 GetStatus() const { return m_err ; }
-private :
- GrafPtr m_macPrintFormerPort ;
- TPPrPort m_macPrintingPort ;
- OSErr m_err ;
- long m_maxX ;
- long m_maxY ;
-} ;
-
-wxNativePrinterDC* wxNativePrinterDC::Create(wxPrintData* data)
-{
- return new wxMacClassicPrinterDC(data) ;
-}
-
-wxMacClassicPrinterDC::wxMacClassicPrinterDC(wxPrintData* data)
-{
- ::GetPort( &m_macPrintFormerPort ) ;
- m_err = noErr ;
- ::UMAPrOpen() ;
- m_err = PrError() ;
- if ( m_err != noErr )
- return;
-
- wxMacClassicPrintData *native = (wxMacClassicPrintData*) data->m_nativePrintData ;
-
- 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;
- }