]> git.saurik.com Git - wxWidgets.git/blame - include/wx/mac/private/print.h
Reverted part of patch #876969 ("Fixes to Borland warnings"), resulted in bugs when...
[wxWidgets.git] / include / wx / mac / private / print.h
CommitLineData
8a5b9f08
SC
1/////////////////////////////////////////////////////////////////////////////
2// Name: print.h
3// Purpose: private implementation for printing on MacOS
4// Author: Stefan Csomor
5// Modified by:
6// Created: 03/02/99
7// RCS-ID: $Id:
8// Copyright: (c) Stefan Csomor
9// Licence: wxWindows licence
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
26#if TARGET_CARBON
27#if !PM_USE_SESSION_APIS
28#error "only Carbon Printing Session API is supported"
29#endif
30#endif
31
32class wxNativePrintData
33{
34public :
35 wxNativePrintData() {}
36 virtual ~wxNativePrintData() {}
37
38 virtual void TransferFrom( wxPrintData * ) = 0 ;
39 virtual void TransferTo( wxPrintData * ) = 0 ;
40
41 virtual void TransferFrom( wxPageSetupDialogData * ) = 0 ;
42 virtual void TransferTo( wxPageSetupDialogData * ) = 0 ;
43
44 virtual void TransferFrom( wxPrintDialogData * ) = 0 ;
45 virtual void TransferTo( wxPrintDialogData * ) = 0 ;
46
47 virtual void CopyFrom( wxNativePrintData * ) = 0;
48
49 virtual int ShowPrintDialog() = 0 ;
50 virtual int ShowPageSetupDialog() = 0 ;
51
52 static wxNativePrintData* Create() ;
53} ;
54
55#if TARGET_CARBON
56
57class wxMacCarbonPrintData : public wxNativePrintData
58{
59public :
60 wxMacCarbonPrintData() ;
61 ~wxMacCarbonPrintData() ;
62
63 virtual void TransferFrom( wxPrintData * ) ;
64 virtual void TransferTo( wxPrintData * ) ;
65
66 virtual void TransferFrom( wxPageSetupDialogData * ) ;
67 virtual void TransferTo( wxPageSetupDialogData * ) ;
68
69 virtual void TransferFrom( wxPrintDialogData * ) ;
70 virtual void TransferTo( wxPrintDialogData * ) ;
71
72 virtual void CopyFrom( wxNativePrintData * ) ;
73 virtual int ShowPrintDialog() ;
74 virtual int ShowPageSetupDialog() ;
75private :
76 virtual void ValidateOrCreate() ;
77public :
78 PMPrintSession m_macPrintSession ;
79 PMPageFormat m_macPageFormat ;
80 PMPrintSettings m_macPrintSettings ;
81} ;
82
83#else
84
85class wxMacClassicPrintData : public wxNativePrintData
86{
87public :
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() ;
99private :
100 virtual void ValidateOrCreate() ;
101public :
102 THPrint m_macPrintSettings ;
103} ;
104
105#endif
106
107#endif