1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: private implementation for printing on MacOS
4 // Author: Stefan Csomor
8 // Copyright: (c) Stefan Csomor
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_MAC_PRIVATE_PRINT_H_
13 #define _WX_MAC_PRIVATE_PRINT_H_
15 #include "wx/cmndata.h"
16 #include "wx/mac/private.h"
18 #if TARGET_CARBON && !defined(__DARWIN__)
19 # include <PMApplication.h>
23 # include "Printing.h"
27 #if !PM_USE_SESSION_APIS
28 #error "only Carbon Printing Session API is supported"
32 class wxNativePrintData
35 wxNativePrintData() {}
36 virtual ~wxNativePrintData() {}
38 virtual void TransferFrom( wxPrintData
* ) = 0 ;
39 virtual void TransferTo( wxPrintData
* ) = 0 ;
41 virtual void TransferFrom( wxPageSetupDialogData
* ) = 0 ;
42 virtual void TransferTo( wxPageSetupDialogData
* ) = 0 ;
44 virtual void TransferFrom( wxPrintDialogData
* ) = 0 ;
45 virtual void TransferTo( wxPrintDialogData
* ) = 0 ;
47 virtual void CopyFrom( wxNativePrintData
* ) = 0;
49 virtual int ShowPrintDialog() = 0 ;
50 virtual int ShowPageSetupDialog() = 0 ;
52 static wxNativePrintData
* Create() ;
57 class wxMacCarbonPrintData
: public wxNativePrintData
60 wxMacCarbonPrintData() ;
61 ~wxMacCarbonPrintData() ;
63 virtual void TransferFrom( wxPrintData
* ) ;
64 virtual void TransferTo( wxPrintData
* ) ;
66 virtual void TransferFrom( wxPageSetupDialogData
* ) ;
67 virtual void TransferTo( wxPageSetupDialogData
* ) ;
69 virtual void TransferFrom( wxPrintDialogData
* ) ;
70 virtual void TransferTo( wxPrintDialogData
* ) ;
72 virtual void CopyFrom( wxNativePrintData
* ) ;
73 virtual int ShowPrintDialog() ;
74 virtual int ShowPageSetupDialog() ;
76 virtual void ValidateOrCreate() ;
78 PMPrintSession m_macPrintSession
;
79 PMPageFormat m_macPageFormat
;
80 PMPrintSettings m_macPrintSettings
;
85 class wxMacClassicPrintData
: public wxNativePrintData
88 wxMacClassicPrintData() ;
89 ~wxMacClassicPrintData() ;
90 virtual void TransferFrom( wxPrintData
* ) ;
91 virtual void TransferTo( wxPrintData
* ) ;
92 virtual void TransferFrom( wxPageSetupDialogData
* ) ;
93 virtual void TransferTo( wxPageSetupDialogData
* ) ;
94 virtual void TransferFrom( wxPrintDialogData
* ) ;
95 virtual void TransferTo( wxPrintDialogData
* ) ;
96 virtual void CopyFrom( wxNativePrintData
* ) ;
97 virtual int ShowPrintDialog() ;
98 virtual int ShowPageSetupDialog() ;
100 virtual void ValidateOrCreate() ;
102 THPrint m_macPrintSettings
;