]>
Commit | Line | Data |
---|---|---|
52479aef | 1 | ///////////////////////////////////////////////////////////////////////////// |
1b88201f | 2 | // Name: wx/mac/classic/private/print.h |
52479aef SC |
3 | // Purpose: private implementation for printing on MacOS |
4 | // Author: Stefan Csomor | |
5 | // Modified by: | |
6 | // Created: 03/02/99 | |
1b88201f | 7 | // RCS-ID: $Id$ |
52479aef | 8 | // Copyright: (c) Stefan Csomor |
65571936 | 9 | // Licence: wxWindows licence |
52479aef SC |
10 | ///////////////////////////////////////////////////////////////////////////// |
11 | ||
12 | #ifndef _WX_MAC_PRIVATE_PRINT_H_ | |
13 | #define _WX_MAC_PRIVATE_PRINT_H_ | |
14 | ||
15 | #include "wx/cmndata.h" | |
16 | #include "wx/mac/private.h" | |
17 | ||
18 | #if TARGET_CARBON && !defined(__DARWIN__) | |
19 | # include <PMApplication.h> | |
20 | #endif | |
21 | ||
22 | #ifndef __DARWIN__ | |
23 | # include "Printing.h" | |
24 | #endif | |
25 | ||
1b88201f | 26 | #if TARGET_CARBON |
52479aef SC |
27 | #if !PM_USE_SESSION_APIS |
28 | #error "only Carbon Printing Session API is supported" | |
29 | #endif | |
30 | #endif | |
31 | ||
32 | class wxNativePrintData | |
33 | { | |
34 | public : | |
35 | wxNativePrintData() {} | |
36 | virtual ~wxNativePrintData() {} | |
1b88201f | 37 | |
52479aef SC |
38 | virtual void TransferFrom( wxPrintData * ) = 0 ; |
39 | virtual void TransferTo( wxPrintData * ) = 0 ; | |
1b88201f | 40 | |
52479aef SC |
41 | virtual void TransferFrom( wxPageSetupDialogData * ) = 0 ; |
42 | virtual void TransferTo( wxPageSetupDialogData * ) = 0 ; | |
1b88201f | 43 | |
52479aef SC |
44 | virtual void TransferFrom( wxPrintDialogData * ) = 0 ; |
45 | virtual void TransferTo( wxPrintDialogData * ) = 0 ; | |
1b88201f | 46 | |
52479aef | 47 | virtual void CopyFrom( wxNativePrintData * ) = 0; |
1b88201f | 48 | |
52479aef SC |
49 | virtual int ShowPrintDialog() = 0 ; |
50 | virtual int ShowPageSetupDialog() = 0 ; | |
1b88201f | 51 | |
52479aef SC |
52 | static wxNativePrintData* Create() ; |
53 | } ; | |
54 | ||
55 | #if TARGET_CARBON | |
56 | ||
1b88201f | 57 | class wxMacCarbonPrintData : public wxNativePrintData |
52479aef SC |
58 | { |
59 | public : | |
60 | wxMacCarbonPrintData() ; | |
61 | ~wxMacCarbonPrintData() ; | |
1b88201f | 62 | |
52479aef SC |
63 | virtual void TransferFrom( wxPrintData * ) ; |
64 | virtual void TransferTo( wxPrintData * ) ; | |
1b88201f | 65 | |
52479aef SC |
66 | virtual void TransferFrom( wxPageSetupDialogData * ) ; |
67 | virtual void TransferTo( wxPageSetupDialogData * ) ; | |
1b88201f | 68 | |
52479aef SC |
69 | virtual void TransferFrom( wxPrintDialogData * ) ; |
70 | virtual void TransferTo( wxPrintDialogData * ) ; | |
1b88201f | 71 | |
52479aef SC |
72 | virtual void CopyFrom( wxNativePrintData * ) ; |
73 | virtual int ShowPrintDialog() ; | |
74 | virtual int ShowPageSetupDialog() ; | |
75 | private : | |
76 | virtual void ValidateOrCreate() ; | |
77 | public : | |
1b88201f | 78 | PMPrintSession m_macPrintSession ; |
52479aef SC |
79 | PMPageFormat m_macPageFormat ; |
80 | PMPrintSettings m_macPrintSettings ; | |
81 | } ; | |
82 | ||
83 | #else | |
84 | ||
85 | class wxMacClassicPrintData : public wxNativePrintData | |
86 | { | |
87 | public : | |
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() ; | |
99 | private : | |
100 | virtual void ValidateOrCreate() ; | |
101 | public : | |
102 | THPrint m_macPrintSettings ; | |
103 | } ; | |
104 | ||
105 | #endif | |
106 | ||
107 | #endif | |
1b88201f | 108 | // _WX_MAC_PRIVATE_PRINT_H_ |