switch to pImpl pattern for mac printing
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@20667 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
		@@ -138,6 +138,12 @@ private:
 | 
				
			|||||||
 * Encapsulates printer information (not printer dialog information)
 | 
					 * Encapsulates printer information (not printer dialog information)
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#ifdef __WXMAC__
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					class wxNativePrintData ;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class WXDLLEXPORT wxPrintData: public wxObject
 | 
					class WXDLLEXPORT wxPrintData: public wxObject
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
public:
 | 
					public:
 | 
				
			||||||
@@ -209,7 +215,6 @@ public:
 | 
				
			|||||||
#elif defined(__WXMAC__)
 | 
					#elif defined(__WXMAC__)
 | 
				
			||||||
  void ConvertToNative();
 | 
					  void ConvertToNative();
 | 
				
			||||||
  void ConvertFromNative();
 | 
					  void ConvertFromNative();
 | 
				
			||||||
  void ValidateOrCreateNative() ;
 | 
					 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
public:
 | 
					public:
 | 
				
			||||||
@@ -217,9 +222,7 @@ public:
 | 
				
			|||||||
    void*           m_devMode;
 | 
					    void*           m_devMode;
 | 
				
			||||||
    void*           m_devNames;
 | 
					    void*           m_devNames;
 | 
				
			||||||
#elif defined(__WXMAC__)
 | 
					#elif defined(__WXMAC__)
 | 
				
			||||||
    void*           m_macPageFormat ;
 | 
					    wxNativePrintData* m_nativePrintData ;
 | 
				
			||||||
    void*           m_macPrintSettings ;
 | 
					 | 
				
			||||||
    void*			m_macPrintSession ;
 | 
					 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
private:
 | 
					private:
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										107
									
								
								include/wx/mac/private/print.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										107
									
								
								include/wx/mac/private/print.h
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,107 @@
 | 
				
			|||||||
 | 
					/////////////////////////////////////////////////////////////////////////////
 | 
				
			||||||
 | 
					// Name:        print.h
 | 
				
			||||||
 | 
					// Purpose:     private implementation for printing on MacOS
 | 
				
			||||||
 | 
					// Author:      Stefan Csomor
 | 
				
			||||||
 | 
					// Modified by:
 | 
				
			||||||
 | 
					// Created:     03/02/99
 | 
				
			||||||
 | 
					// RCS-ID:      $Id: 
 | 
				
			||||||
 | 
					// Copyright:   (c) Stefan Csomor
 | 
				
			||||||
 | 
					// Licence:     wxWindows licence
 | 
				
			||||||
 | 
					/////////////////////////////////////////////////////////////////////////////
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#ifndef _WX_MAC_PRIVATE_PRINT_H_
 | 
				
			||||||
 | 
					#define _WX_MAC_PRIVATE_PRINT_H_
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include "wx/cmndata.h"
 | 
				
			||||||
 | 
					#include "wx/mac/private.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#if TARGET_CARBON && !defined(__DARWIN__)
 | 
				
			||||||
 | 
					#  include <PMApplication.h>
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#ifndef __DARWIN__
 | 
				
			||||||
 | 
					#  include "Printing.h"
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#if TARGET_CARBON 
 | 
				
			||||||
 | 
					#if !PM_USE_SESSION_APIS
 | 
				
			||||||
 | 
					#error "only Carbon Printing Session API is supported"
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					class wxNativePrintData
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					public :
 | 
				
			||||||
 | 
					                            wxNativePrintData() {}
 | 
				
			||||||
 | 
					    virtual                 ~wxNativePrintData() {}
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
 | 
					    virtual void            TransferFrom( wxPrintData * ) = 0 ;
 | 
				
			||||||
 | 
					    virtual void            TransferTo( wxPrintData * ) = 0 ;
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
 | 
					    virtual void            TransferFrom( wxPageSetupDialogData * ) = 0 ;
 | 
				
			||||||
 | 
					    virtual void            TransferTo( wxPageSetupDialogData * ) = 0 ;
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
 | 
					    virtual void            TransferFrom( wxPrintDialogData * ) = 0 ;
 | 
				
			||||||
 | 
					    virtual void            TransferTo( wxPrintDialogData * ) = 0 ;
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
 | 
					    virtual void            CopyFrom( wxNativePrintData * ) = 0;
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					    virtual int             ShowPrintDialog() = 0 ;
 | 
				
			||||||
 | 
					    virtual int             ShowPageSetupDialog() = 0 ;
 | 
				
			||||||
 | 
					   
 | 
				
			||||||
 | 
					    static wxNativePrintData* Create() ;
 | 
				
			||||||
 | 
					} ;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#if TARGET_CARBON
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					class wxMacCarbonPrintData : public wxNativePrintData 
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					public :
 | 
				
			||||||
 | 
					                            wxMacCarbonPrintData() ;
 | 
				
			||||||
 | 
					                            ~wxMacCarbonPrintData() ;
 | 
				
			||||||
 | 
					                            
 | 
				
			||||||
 | 
					    virtual void            TransferFrom( wxPrintData * ) ;
 | 
				
			||||||
 | 
					    virtual void            TransferTo( wxPrintData * )  ;
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
 | 
					    virtual void            TransferFrom( wxPageSetupDialogData * )  ;
 | 
				
			||||||
 | 
					    virtual void            TransferTo( wxPageSetupDialogData * ) ;
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
 | 
					    virtual void            TransferFrom( wxPrintDialogData * )  ;
 | 
				
			||||||
 | 
					    virtual void            TransferTo( wxPrintDialogData * ) ;
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
 | 
					    virtual void            CopyFrom( wxNativePrintData * ) ;
 | 
				
			||||||
 | 
					    virtual int             ShowPrintDialog() ;
 | 
				
			||||||
 | 
					    virtual int             ShowPageSetupDialog() ;
 | 
				
			||||||
 | 
					private :
 | 
				
			||||||
 | 
					    virtual void            ValidateOrCreate() ;
 | 
				
			||||||
 | 
					public :
 | 
				
			||||||
 | 
					    PMPrintSession			m_macPrintSession ;
 | 
				
			||||||
 | 
					    PMPageFormat            m_macPageFormat ;
 | 
				
			||||||
 | 
					    PMPrintSettings         m_macPrintSettings ;
 | 
				
			||||||
 | 
					} ;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#else
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					class wxMacClassicPrintData : public wxNativePrintData
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					public :
 | 
				
			||||||
 | 
					                            wxMacClassicPrintData() ;
 | 
				
			||||||
 | 
					                            ~wxMacClassicPrintData() ;
 | 
				
			||||||
 | 
					    virtual void            TransferFrom( wxPrintData * ) ;
 | 
				
			||||||
 | 
					    virtual void            TransferTo( wxPrintData * )  ;
 | 
				
			||||||
 | 
					    virtual void            TransferFrom( wxPageSetupDialogData * ) ;
 | 
				
			||||||
 | 
					    virtual void            TransferTo( wxPageSetupDialogData * ) ;
 | 
				
			||||||
 | 
					    virtual void            TransferFrom( wxPrintDialogData * )  ;
 | 
				
			||||||
 | 
					    virtual void            TransferTo( wxPrintDialogData * ) ;
 | 
				
			||||||
 | 
					    virtual void            CopyFrom( wxNativePrintData * ) ;
 | 
				
			||||||
 | 
					    virtual int             ShowPrintDialog() ;
 | 
				
			||||||
 | 
					    virtual int             ShowPageSetupDialog() ;
 | 
				
			||||||
 | 
					private :
 | 
				
			||||||
 | 
					    virtual void            ValidateOrCreate() ;
 | 
				
			||||||
 | 
					public :
 | 
				
			||||||
 | 
					    THPrint                 m_macPrintSettings ;
 | 
				
			||||||
 | 
					} ;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
		Reference in New Issue
	
	Block a user